Changeset 572


Ignore:
Timestamp:
Feb 6, 2008, 3:46:20 PM (13 years ago)
Author:
Martin Svensson
Message:

References #89 Change names, ids and variables according to README

Location:
trunk/net/sf/basedb/illumina
Files:
4 edited
2 moved

Legend:

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

    r566 r572  
    1414    <hasconfigurations>yes</hasconfigurations>
    1515    </pluginclass>
    16   <pluginclass classname="net.sf.basedb.illumina.plugins.ScanDataImporter">
     16  <pluginclass classname="net.sf.basedb.illumina.plugins.BeadSummaryImporter">
    1717    <minbaseversion>2.6</minbaseversion>
    1818    <hasconfigurations>yes</hasconfigurations>
  • trunk/net/sf/basedb/illumina/config/illumina-raw-data-types.xml

    r549 r572  
    88<raw-data-types>
    99  <raw-data-type
    10     id="illumina_scandata"
     10    id="illumina_bead_summary"
    1111    channels="1"
    12     name="Illumina scandata"
    13     table="IlluminaScandata"
     12    name="Illumina Bead Summary (IBS)"
     13    table="IlluminaBeadSummary"
    1414    >
    1515    <property
  • trunk/net/sf/basedb/illumina/src/net/sf/basedb/illumina/Illumina.java

    r569 r572  
    6565    <code>PlatformVariant.getByExternalId(dc, Illumina.SNP_VARIANT_ID)<code>
    6666    to load this item.
     67  *//*TODO
     68  public static final String SNP_VARIANT_ID = "illumina.snp";
    6769  */
    68   public static final String SNP_VARIANT_ID = "illumina.snp";
    6970 
    7071  /**
    71     The ID of the raw data type used to hold scandata raw data.
    72     Use {@link #getScanDataType()} to get the raw data type object.
     72    The ID of the raw data type used to hold Illumina Bead Summary raw data.
     73    Use {@link #getBeadSummaryType()} to get the raw data type object.
    7374  */
    74   public static final String SCANDATA_ID = "illumina_scandata";
     75  public static final String BEAD_SUMMARY_ID = "illumina_bead_summary";
    7576 
    7677  /**
     
    8889 
    8990  /**
    90     Get the {@link RawDataType} representing the scandata
     91    Get the {@link RawDataType} representing the Illumina Bead Summary
    9192    raw data type.
    9293    @return A raw data type (null if this type is not present)
    9394  */
    94   public static final RawDataType getScanDataType()
     95  public static final RawDataType getBeadSummaryType()
    9596  {
    96     return RawDataTypes.getRawDataType(SCANDATA_ID);
     97    return RawDataTypes.getRawDataType(BEAD_SUMMARY_ID);
    9798  }
    9899 
  • trunk/net/sf/basedb/illumina/src/net/sf/basedb/illumina/install/Install.java

    r569 r572  
    7373 
    7474  <ul>
     75  <li>Register the following data file types:
     76    <ul>
     77      <li>Illumina Sentrix® Array binary manifest(BGX).
     78      <li>Illumina Bead Summary(IBS).
     79 
    7580  <li>Create the <code>Illumina</code> platform with three
    7681    variants <code>Expression1</code>, <code>Expression2</code>
    77     and <code>SNP</code>.
    78    
    79   <li>Register the following data file types:
    80     <ul>
    81       <li>BGX
    82       <li>ScanData
    83       <li>SNP-files...?? 
    84  
    85   <li>Add reporter annotations
    86  
    87   <li>Register plug-ins
     82    and <code>SNP</code>. These variants is then set to require one
     83    BGX data file type and at least one IBS data file type. The amount of
     84    IBS files depends on how many strips there are on one array slide.
    8885  </ul>
    8986*/
     
    111108 
    112109  private static final Set<Permissions> permissions = new HashSet<Permissions>();
    113  
     110
     111  /*TODO
    114112  private static final PluginParameter<Boolean> installSnpVariantParameter = new PluginParameter<Boolean>
    115113    (
     
    118116      "TRUE if he SNP variant of Illumina should be installed, FALSE otherwise.",
    119117      new BooleanParameterType(true, true)
    120     );   
     118    );
     119  */   
    121120  private static final PluginParameter<Boolean> installExp1VariantParameter = new PluginParameter<Boolean>
    122121  (
    123122    "installExp1",
    124123    "Expression 1",
    125     "TRUE if the Expression 1 variant of Illumina should be installed, FALSE otherwise.",
     124    "TRUE if the Expression 1 variant of Illumina should be installed, FALSE otherwise.\n" +
     125    "Expression 1 has one strip on each array.",
    126126    new BooleanParameterType(true, true)
    127127  ); 
     
    130130    "installExp2",
    131131    "Expression2",
    132     "TRUE if the Expression 2 variant of Illumina should be installed, FALSE otherwise",
     132    "TRUE if the Expression 2 variant of Illumina should be installed, FALSE otherwise.\n" +
     133    "Expression 2 has two strips on each array.",
    133134    new BooleanParameterType(true, true)
    134135  );
     
    138139 
    139140  private static final String BGX_FILEYTPE_EXTENSION = "bgx";
    140   private static final String SCANDATA_FILETYPE_EXTENSION = ""; //TODO
    141   private static final String SNP_FILETYPE_EXTENSION = ""; //TODO
    142  
     141  private static final String BEAD_SUMMARY_FILETYPE_EXTENSION = "csv";
     142  /*
     143  TODO
     144  private static final String SNP_FILETYPE_EXTENSION = "";
     145  */
    143146  private static final PluginParameter<String> alreadyInstalledErrorParameter = new PluginParameter<String>(
    144147    "alreadyInstalledError",
     
    197200      try
    198201      {
     202        /*TODO SNP
    199203        boolean installSnp = (Boolean)job.getValue("installSnp");
     204        */
    200205        boolean installExp1 = (Boolean)job.getValue("installExp1");
    201206        boolean installExp2 = (Boolean)job.getValue("installExp2");
     
    206211        if (installExp2) expressionTypes.add(2);
    207212       
    208         installIlluminaItems(installSnp, expressionTypes, alreadyExistingItem.equals(SKIP_OPTION), progress);
     213        installIlluminaItems(null, expressionTypes, alreadyExistingItem.equals(SKIP_OPTION), progress);
    209214      }
    210215      catch(Throwable ex)
     
    239244        message = "Can only be used when this is the selected plug-in.";
    240245      }
    241       RawDataType scanDataType = Illumina.getScanDataType();
    242       if (scanDataType == null)
    243       {
    244         throw new InvalidDataException("The '" + Illumina.SCANDATA_ID + "' raw data type is " +
    245             "missing. This must exist before the items can be installed, see the " +
     246      RawDataType beadSummaryType = Illumina.getBeadSummaryType();
     247      if (beadSummaryType == null)
     248      {
     249        throw new InvalidDataException("The '" + Illumina.BEAD_SUMMARY_ID + "' raw data type is " +
     250            "missing. It must be added to BASE before running this plug-in, see the " +
    246251            "Illumina plug-in manual.");
    247252      }
     
    271276      storeValue(job, request, installExp1VariantParameter);
    272277      storeValue(job, request, installExp2VariantParameter);
     278      /*TODO SNP
    273279      storeValue(job, request, installSnpVariantParameter);
     280      */
    274281     
    275282      response.setDone("The job configuration is complete.");
     
    295302  /**
    296303    Creates items that are required when working with the Illumina platform in BASE.
    297     The items get the following external ids:
    298     <ul>
    299      
     304
    300305    This method gives options on which platform variants to create and how already
    301306    existing items should be handled.
     
    307312    @throws ItemAlreadyExistsException If ignoreInstalledItems = FALSE and one of the
    308313   */
    309   public void installIlluminaItems(boolean installSNP, Set<Integer> expressionTypes, boolean ignoreExistingItems, ProgressReporter progress)
     314  public void installIlluminaItems(Boolean installSNP, Set<Integer> expressionTypes, boolean ignoreExistingItems, ProgressReporter progress)
    310315    throws ItemAlreadyExistsException
    311316  {   
    312     RawDataType scanDataType = Illumina.getScanDataType();
    313     if (scanDataType == null)
    314     {
    315       throw new InvalidDataException("Raw data type[" + Illumina.SCANDATA_ID + "] is " +
     317    RawDataType beadSummaryType = Illumina.getBeadSummaryType();
     318    if (beadSummaryType == null)
     319    {
     320      throw new InvalidDataException("Raw data type[" + Illumina.BEAD_SUMMARY_ID + "] is " +
    316321          "missing. This must exist before the items can be installed, see the " +
    317322          "Illumina plug-in manual.");
     
    319324    DbControl dc = null;
    320325    int largestNumOfStrips = 0;
    321     //external ids.
    322     //String snpVariantExternalId = "illumina.snp";
     326   
     327    /*TODO SNP
     328    String snpVariantExternalId = "illumina.snp";
     329    */
    323330    String expExternalIdPrefix = "illumina.exp";
    324     String scandataFileTypePrefix = "illlumina.scandata.";
     331    String beadSummaryTypePrefix = "illlumina.ibs.";
    325332   
    326333    FileType reporterMapType = null;
     
    344351     
    345352      DataFileType bgx = createDataFileType(dc,
    346         Illumina.BGX_FILE_ID, "BGX file", "Illumina BGX file",
     353        Illumina.BGX_FILE_ID, "BGX file", "Illumina Sentrix Array binary manifest file",
    347354        Item.ARRAYDESIGN, BGX_FILEYTPE_EXTENSION, reporterMapType, ignoreExistingItems);
    348355      bgx.setValidatorClass(Illumina.BGX_VALIDATOR_METADATAREADER);
     
    351358      for (int i = 1; i <= largestNumOfStrips; i++ )
    352359      {
    353         String name = "Scandata " + i; 
     360        String name = "Illumina Bead Summary file " + i; 
    354361        DataFileType dft = createDataFileType(dc,
    355           scandataFileTypePrefix + i, name, "Illumina scandata file for strip #" + i + " in the array.",
    356           Item.RAWBIOASSAY, SCANDATA_FILETYPE_EXTENSION, rawDataType, ignoreExistingItems);
     362          beadSummaryTypePrefix + i, name,
     363          "Illumina Bead Summary file for strip #" + i + " in an array.",
     364          Item.RAWBIOASSAY, BEAD_SUMMARY_FILETYPE_EXTENSION, rawDataType, ignoreExistingItems);
    357365        dataFileTypes.put(dft.getExternalId(), dft);
    358366      }
     
    370378      {
    371379        PlatformVariant pfv = createPlatformVariant(dc, expExternalIdPrefix + type, namePrefix + type,
    372             illuminaPlatform, scanDataType, ignoreExistingItems);
    373         if (pfv.getDescription() == null || pfv.getDescription().equals("")) pfv.setDescription("Platform variant to use with Illumina expression containing " + type + " strip(s)/array");
     380            illuminaPlatform, beadSummaryType, ignoreExistingItems);
     381        if (pfv.getDescription() == null || pfv.getDescription().equals(""))
     382        {
     383          pfv.setDescription("Platform variant to use with Illumina expression containing " + type + " strip(s)/array");
     384        }
    374385        pfv.addFileType(bgx, true);
    375386        for (int i = 1; i <= type; i++)
    376387        {
    377           pfv.addFileType(dataFileTypes.get(scandataFileTypePrefix+i), true);
     388          pfv.addFileType(dataFileTypes.get(beadSummaryTypePrefix+i), true);
    378389        }
    379390        platformVariants.add(pfv);       
    380391      }
    381       if (installSNP)
     392     
     393      /*TODO SNP
     394      if (installSNP != null && installSNP)
    382395      {
    383396        PlatformVariant pfv = createPlatformVariant(dc, Illumina.SNP_VARIANT_ID,
     
    389402        //TODO Add data file types to the SNP variant.
    390403        platformVariants.add(pfv);       
    391       }     
     404      }
     405      */     
    392406      dc.commit();
    393407    }
     
    406420    {
    407421      List<PluginParameter<?>> parameters = new ArrayList<PluginParameter<?>>();
     422      /*TODO SNP
    408423      parameters.add(installSnpVariantParameter);
     424      */
    409425      parameters.add(installExp1VariantParameter);
    410426      parameters.add(installExp2VariantParameter);
     
    481497      }
    482498      String message = null;
    483       if (platform.getRawDataType() != null) message = "The already existing platform has a raw data type that can't be used with " + name + "[" + externalId + "]";
     499      if (platform.getRawDataType() != null)
     500      {
     501        message = "The already existing platform has a raw data type that can't be used with " + name + "[" + externalId + "]";
     502      }
    484503      if (message != null) throw new ItemAlreadyExistsException(message);
    485       //TODO Check that existing platform can be used with the rest of the items.
    486504    }
    487505    catch (ItemNotFoundException infex)
     
    509527      }
    510528      String message = null;
    511       if (variant.isFileOnly()) message = "Platform variant " + variant.getExternalId() + " already exists but is file-only";
     529      if (variant.isFileOnly())
     530      {
     531        message = "Platform variant " + variant.getExternalId() + " already exists but is file-only";
     532      }
    512533      else if (variant.getRawDataType() != null && !variant.getRawDataType().equals(rawDataType))
    513534      {
    514535        message = "Platform variant " + variant.getExternalId() + " already exists but has not the right raw data type";
    515536      }
    516       else if (!variant.getPlatform().equals(illuminaPlatform)) message = "Platform variant " + variant.getExternalId() + " already exists for another platform.";
     537      else if (!variant.getPlatform().equals(illuminaPlatform))
     538      {
     539        message = "Platform variant " + variant.getExternalId() + " already exists for another platform.";
     540      }
    517541      if (message != null) throw new ItemAlreadyExistsException(message);
    518542     
     
    528552
    529553  /*
    530     Creates file-only platform variants
    531    */
     554    TODO SNP
     555    Creates file-only platform variants, eg. SNP
     556   *
    532557  private PlatformVariant createPlatformVariant(DbControl dc, String externalId,
    533558      String name, Platform platform, int channels, boolean ignoreExistingItems)
     
    554579    }
    555580    return variant;
    556   }
     581  }*/
    557582}
  • trunk/net/sf/basedb/illumina/src/net/sf/basedb/illumina/plugins/BeadSummaryImporter.java

    r569 r572  
    8989
    9090/**
    91   Plug-in that import raw scandata files. This plug-in support one or more
     91  Plug-in that import raw Illumina bead summary files. This plug-in support one or more
    9292  files each one containing data from one stripe on the glass. If more
    9393  than one file is given the data for spots with the same Illumicode (=Array_Address_Id)
     
    9696  for the formula used to merg of the variance.
    9797  <p>
    98   The format of the scandata files MUST be of this form:
     98  The format of the bead summary files MUST be of this form:
    9999  <pre class="code">
    100100Illumicode,N,Mean GRN,Dev GRN
     
    110110  @author nicklas
    111111*/
    112 public class ScanDataImporter
     112public class BeadSummaryImporter
    113113  extends AbstractPlugin
    114114  implements InteractivePlugin, SignalTarget
     
    116116
    117117  private static final About about = new AboutImpl(
    118     "Illumina Scandata importer",
    119     "Raw data importer for Illumina scandata files. This plug-in can import data from one " +
    120     "or more related scandata files that are part of the same array but different stripes.",
     118    "Illumina Bead Summary importer",
     119    "Raw data importer for Illumina bead summary files. This plug-in can import data from one " +
     120    "or more related bead summary files that are part of the same array but different stripes.",
    121121    Illumina.VERSION,
    122122    Illumina.COPYRIGHT,
     
    169169
    170170 
    171   public ScanDataImporter()
     171  public BeadSummaryImporter()
    172172  {}
    173173 
     
    314314    <ul>
    315315    <li>The item is a {@link RawBioAssay} using the
    316       {@link Illumina#SCANDATA_ID} raw data type (warning)
     316      {@link Illumina#BEAD_SUMMARY_ID} raw data type (warning)
    317317    <li>The raw bioassay doesn't already have spots (error)
    318318    <li>The raw bioassay is connected to an array design that has features (error)
     
    336336      RawBioAssay rba = (RawBioAssay)item;
    337337      ArrayDesign design = rba.getArrayDesign();
    338       RawDataType scanData = Illumina.getScanDataType();
     338      RawDataType beadSummary = Illumina.getBeadSummaryType();
    339339      RawDataType rdt = rba.getRawDataType();
    340       if (rdt != scanData)
     340      if (rdt != beadSummary)
    341341      {
    342342        message = "Unsupported raw data type: " + rdt.getName();
     
    389389        "rawBioAssay",
    390390        "Raw bioassay",
    391         "The raw bioassay to import raw data to. It must be of the Illumina scandata " +
     391        "The raw bioassay to import raw data to. It must be of the Illumina bead summary " +
    392392        "raw data type and shouldn't have any spots already.",
    393393        rawBioAssayType
     
    480480    // in 'rawdata'
    481481    FlatFileParser ffp = createFlatFileParser();
    482     Map<String, ScandataSpot> rawdata = new HashMap<String, ScandataSpot>();
     482    Map<String, BeadSummarySpot> rawdata = new HashMap<String, BeadSummarySpot>();
    483483    for (File file : files)
    484484    {
     
    524524            int dev = Integer.parseInt(data.get(3));
    525525           
    526             ScandataSpot spot = rawdata.get(featureId);
     526            BeadSummarySpot spot = rawdata.get(featureId);
    527527            if (spot == null)
    528528            {
    529               spot = new ScandataSpot(featureId, n, mean, dev);
     529              spot = new BeadSummarySpot(featureId, n, mean, dev);
    530530              rawdata.put(featureId, spot);
    531531            }
     
    566566    try
    567567    {
    568       for (ScandataSpot spot : rawdata.values())
     568      for (BeadSummarySpot spot : rawdata.values())
    569569      {
    570570        currentFeatureId = spot.getFeatureId();
     
    643643  /**
    644644    Initialise the error handling system. This method must be called before starting the
    645     import with {@link #importScandata(RawBioAssay, List, ProgressReporter).
     645    import with {@link #importBeadSummary(RawBioAssay, List, ProgressReporter).
    646646    A subclass may override this method to add specific
    647647    error handlers. If <code>super.setUpErrorHandling()</code> isn't called
     
    691691    }
    692692    return handler;
    693   }
    694  
     693  }
    695694}
    696 
    697 
    698 
    699 
  • trunk/net/sf/basedb/illumina/src/net/sf/basedb/illumina/plugins/BeadSummarySpot.java

    r569 r572  
    3030  @author nicklas
    3131*/
    32 public class ScandataSpot
     32public class BeadSummarySpot
    3333{
    3434 
     
    3838  private double dev;
    3939 
    40   public ScandataSpot(String featureId, int n, double mean, double dev)
     40  public BeadSummarySpot(String featureId, int n, double mean, double dev)
    4141  {
    4242    this.featureId = featureId;
Note: See TracChangeset for help on using the changeset viewer.