Changeset 1159


Ignore:
Timestamp:
Sep 15, 2009, 1:22:43 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #241: Add MeV Analysis file as a file type for bioassay sets

Added an "Installation" plug-in that is used to register data file types needed by the MeV package. Updated the installation instructions. This should complete this ticket, but I want to do some more tests.

Location:
extensions/net.sf.basedb.mev/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.mev/trunk/META-INF/base-plugins.xml

    r1082 r1159  
    1010    <hasconfigurations/>
    1111  </pluginclass>
     12  <pluginclass classname="net.sf.basedb.mev.install.Install">
     13    <minbaseversion>2.12</minbaseversion>
     14    <hasconfigurations/>
     15  </pluginclass>
    1216</plugins>
  • extensions/net.sf.basedb.mev/trunk/README

    r1145 r1159  
    2828    the 'Extensions directory' is selected. Install all plug-ins found in
    2929    the mev-launcher.jar file.
    30  6. The 'MeV CGH exporter' requires that an admin configures the reporter
    31     annotations that corresponds to the CGH file columns. Go to the
     30 6. Run the 'MeV package installer' plug-in. Find this plug-in on the
     31    'Administrate -> Plugins -> Definitions' page, click on it, and then
     32    on the 'Run plugin' button. Complete the installation wizard. This will
     33    install required items, eg. data file types, that are required by MeV.
     34 7. The 'MeV CGH exporter' plug-in requires that an admin configures the
     35    reporter annotations that corresponds to the CGH file columns. Go to the
    3236    'Administrate -> Plugins -> Definitions' page and click on the
    3337    'MeV CGH exporter' plug-in. Click on 'New configuration...' and
     
    3539    configure' and select the corresponding reporter annotation columns
    3640    for the four CGH file columns (chromosome, start, end and description).
    37     Finish the configuration. Note! This step will also register a file
    38     type for CGH. Make sure the logged in user has enough permissions to
    39     create new file types.
    40  7. Done.
     41    Finish the configuration.
     42 8. Done.
    4143 
    4244 The MeV Launcher appears as an action in the "Tools" column when
  • extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/plugin/CghExporterPlugin.java

    r1083 r1159  
    1414import net.sf.basedb.core.BooleanParameterType;
    1515import net.sf.basedb.core.Config;
    16 import net.sf.basedb.core.DataFileType;
    1716import net.sf.basedb.core.DbControl;
    1817import net.sf.basedb.core.ExtendedProperties;
     
    2120import net.sf.basedb.core.FileSetMember;
    2221import net.sf.basedb.core.FileStoreUtil;
    23 import net.sf.basedb.core.FileType;
    2422import net.sf.basedb.core.Item;
    25 import net.sf.basedb.core.ItemNotFoundException;
    2623import net.sf.basedb.core.ItemParameterType;
    2724import net.sf.basedb.core.Job;
    2825import net.sf.basedb.core.Path;
    29 import net.sf.basedb.core.Permission;
    3026import net.sf.basedb.core.PluginDefinition;
    3127import net.sf.basedb.core.PluginParameter;
     
    3329import net.sf.basedb.core.RequestInformation;
    3430import net.sf.basedb.core.StringParameterType;
    35 import net.sf.basedb.core.SystemItems;
    3631import net.sf.basedb.core.plugin.About;
    3732import net.sf.basedb.core.plugin.AboutImpl;
     
    361356          Config.getCharset()));
    362357      parameters.add(getOverwriteParameter(null, null));
    363       if (checkCghFileType(dc) != null)
    364       {
    365         parameters.add(new PluginParameter<Boolean>(
    366             "attachToBioAssaySet",
    367             "Attach file to bioassay set",
    368             "Deselect this option if you don't want the generated file to " +
    369             "become attached to the current bioassay set. This option is ignored " +
    370             "if the file isn't saved in the BASE file system.",
    371             new BooleanParameterType(true, false)
    372           ));
    373       }
     358      parameters.add(new PluginParameter<Boolean>(
     359          "attachToBioAssaySet",
     360          "Attach file to bioassay set",
     361          "Deselect this option if you don't want the generated file to " +
     362          "become attached to the current bioassay set. This option is ignored " +
     363          "if the file isn't saved in the BASE file system.",
     364          new BooleanParameterType(true, false)
     365        ));
    374366      dc.commit();
    375367
     
    391383  private RequestInformation getConfigurePluginParameters(GuiContext context)
    392384  {
    393     if (configurePlugin != null) return configurePlugin;
    394    
    395     // Check/create MeV CGH file type
    396     DbControl dc = null;
    397     try
    398     {
    399       dc = sc.newDbControl();
    400       checkCghFileType(dc);
    401       dc.commit();
    402     }
    403     finally
    404     {
    405       if (dc != null) dc.close();
    406     }
    407    
     385    if (configurePlugin != null) return configurePlugin;   
    408386    List<PluginParameter<?>> parameters = new ArrayList<PluginParameter<?>>();
    409387
     
    467445    return configurePlugin;
    468446  }
    469 
    470   public DataFileType checkCghFileType(DbControl dc)
    471   {
    472     DataFileType cgh = null;
    473     try
    474     {
    475       cgh = DataFileType.getByExternalId(dc, Mev.CGH_FILE);
    476     }
    477     catch (ItemNotFoundException ex)
    478     {
    479       if (dc.getSessionControl().hasPermission(Permission.CREATE, Item.DATAFILETYPE))
    480       {
    481         cgh = DataFileType.getNew(dc, Mev.CGH_FILE, Item.BIOASSAYSET);
    482         cgh.setName("MeV CGH");
    483         cgh.setDescription("A MeV Comparative Genomic Hybridization file");
    484         cgh.setGenericType(FileType.getById(dc, SystemItems.getId(FileType.SPOT_DATA)));
    485         dc.saveItem(cgh);
    486       }
    487     }
    488     catch (Exception ex)
    489     {}
    490     return cgh;
    491   }
    492  
    493447}
Note: See TracChangeset for help on using the changeset viewer.