Changeset 623


Ignore:
Timestamp:
Mar 10, 2008, 9:20:51 AM (13 years ago)
Author:
Martin Svensson
Message:

Fixes #100. Add Illumina SNP platform to the installation program

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/install/Install.java

    r590 r623  
    7474
    7575  Installation program for the Illumina plug-ins package. The installation
    76   will perform the following steps:
     76  will perform the following steps, which most of them are optional:
    7777 
    7878  <ul>
     
    8181      <li>Illumina Sentrix® Array binary manifest(BGX).
    8282      <li>Illumina Bead Summary(IBS).
     83      <li>Illumina SNP manifest file (CVS)
     84      <li>Illumina SNP data file
     85      <li>Illumina SNP split data file
    8386 
    8487  <li>Create the <code>Illumina</code> platform with three
    8588    variants <code>Expression1</code>, <code>Expression2</code>
    86     and <code>SNP</code>. These variants is then set to require one
     89    and <code>SNP</code>. The first two variants is then set to require one
    8790    BGX data file type and at least one IBS data file type. The amount of
    88     IBS files depends on how many strips there are on one array slide.
     91    IBS files depends on how many strips there are on one array slide.<br>
     92    The SNP variant is set to require the manifest file and split data file.
     93    Original SNP data file is set to be optional.
     94 
     95  <li>Hardwares, softwares and other items, that in some way are associated with
     96    one or more of the variants, will be created next.
    8997  </ul>
    9098*/
     
    228236        if (installExp1) expressionTypes.add(1);
    229237        if (installExp2) expressionTypes.add(2);
    230        
    231         Map<String, Object> scannerProperties = null;
    232         if (installScanner)
    233         {
    234           scannerProperties = new HashMap<String, Object>();
    235           scannerProperties.put("name", (String)job.getValue("scannerName"));
    236           scannerProperties.put("version", (String)job.getValue("scannerVersion"));
    237           scannerProperties.put("description", "The Illumina BeadArray Reader is a " +
    238               "scanner that can read arrays including Illumina Sentrix BeadChips and " +
    239               "Sentrix Array Matrices (SAMs).");
    240         }
    241        
     238               
    242239        installIlluminaItems(dc, installSnp, expressionTypes, ignoreExisingItems, progress);
    243240        if (installScanner)
     
    436433    }
    437434   
    438     //TODO Define each filetype's validatorclass, metadatareaderclass.
    439435    DataFileType snpManifestType = createDataFileType(dc,
    440436        Illumina.SNP_MANIFEST_FILE_ID, "SNP manifest file", "Manifest file for Illumina SNP",
     
    689685  */
    690686  private DataFileType createDataFileType(DbControl dc, String externalId, String name,
    691     String description, Item itemType, String extension, FileType genericType,
    692     String validatorClass, String metadataReaderClass, String jarPath,
    693     boolean ignoreExistingItem)
     687      String description, Item itemType, String extension, FileType genericType,
     688      String validatorClass, String metadataReaderClass, String jarPath,  boolean ignoreExistingItem)
    694689    throws ItemAlreadyExistsException
    695   {
    696    
     690  {   
    697691    DataFileType dft = null;
    698692    try
     
    704698        throw new ItemAlreadyExistsException(dft.getExternalId());
    705699      }
     700     
    706701      dft = DataFileType.getByExternalId(dc, externalId);
    707       if (!dft.getExtension().equals(extension)) message = dft.getName() + " has invalid extension";
    708       if (!dft.getItemType().equals(itemType)) message = dft.getName() + " has invalid item type"; 
    709       if (dft.getMetadataReaderJarPath() == null)
    710       {
    711         dft.setMetadataReaderJarPath(jarPath);         
    712       }
    713       if (dft.getValidatorJarPath() == null)
    714       {
    715         dft.setValidatorJarPath(jarPath);   
    716       }
    717       if (!dft.getValidatorJarPath().equals(jarPath) || !dft.getMetadataReaderJarPath().equals(jarPath))
    718       {
    719         message = dft.getName() + " has invalid jar path.";
    720       }
    721       if (message != null) throw new ItemAlreadyExistsException(message + ". This can not be used.");
    722      
     702      if (extension != null && !extension.equals(dft.getExtension())) message += dft.getName() + " has invalid extension.\n";
     703      if (!itemType.equals(dft.getItemType())) message += dft.getName() + " has invalid item type.\n";
     704      if (jarPath != null)
     705      {
     706        if (dft.getMetadataReaderJarPath() == null)
     707        {
     708          dft.setMetadataReaderJarPath(jarPath);         
     709        }
     710        if (dft.getValidatorJarPath() == null)
     711        {
     712          dft.setValidatorJarPath(jarPath);   
     713        }
     714        if (!jarPath.equals(dft.getValidatorJarPath()) || !jarPath.equals(dft.getMetadataReaderJarPath()))
     715        {
     716          message += dft.getName() + " has invalid jar path.\n";
     717        }
     718      }
     719      if (message != null) throw new ItemAlreadyExistsException(message + " This datafiletype can not be used.");
    723720    }
    724721    catch (ItemNotFoundException infe)
     
    751748      if (platform.getRawDataType() != null)
    752749      {
    753         message = "The already existing platform has a raw data type that can't be used with " + name + "[" + externalId + "]";
     750        message = "Existing platform has a raw data type that can't be used with " + name + "[" + externalId + "]";
    754751      }
    755752      if (message != null) throw new ItemAlreadyExistsException(message);
Note: See TracChangeset for help on using the changeset viewer.