Changeset 579


Ignore:
Timestamp:
Feb 8, 2008, 2:52:54 PM (15 years ago)
Author:
Martin Svensson
Message:

Fixes #98 Implement validator and metadata extractor plug-in for BGX files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/net/sf/basedb/illumina/src/net/sf/basedb/illumina/filehandler/BgxFileHandler.java

    r569 r579  
    9797  }
    9898
    99   /* 
    100       @see net.sf.basedb.core.filehandler.DataFileMetadataReader#extractMetadata(net.sf.basedb.core.DbControl)
     99  /**   
     100      Extracts the number of controls that is defined in the [HEADINGS] section.
     101      @param dc DbControl used when accessing the database.
    101102   */
    102103  @Override
     
    119120  }
    120121
    121   /*
    122       @see net.sf.basedb.core.filehandler.DataFileMetadataReader#resetMetadata(net.sf.basedb.core.DbControl)
     122  /**
     123      Sets the number of features in file to '0'
     124      @param dc DbControl used when accessing the database.
    123125   */
    124126  @Override
     
    130132 
    131133  /*
    132     Gets a right type of input stream depending on if
    133     it comes from a packed or unpacked file.
     134    Gets the right type of input stream depending if it comes
     135    from a compressed file(GZIP) or none-compressed file.
    134136   */
    135137  private InputStream wrapInputStream (InputStream in)
     
    152154    Takes a file, packed(gzip) or not packed and parse certain amount of lines.
    153155    Parsed heading lines will be stored in a list.
    154     If one of [Probes] or [Controls] section is found, the next line in file will
    155     be checked.
    156     It must contain required (by the feature importer and reporter importer) columns.
     156    The file considers to be valid if the [Probes] section is found and next line
     157    contains of at least the columns: Probe_Id and Array_Address_Id.
    157158   */
    158159  private List<String> parseHeadings(File bgxFile, int range)
     
    186187        line = reader.readLine();
    187188        headings.add(line);
    188         if (line.matches("\\[Probes\\]") || line.matches("\\[Controls\\]"))
     189        if (line.matches("\\[Probes\\]"))
    189190        {
    190191          line = reader.readLine();
     
    208209  }
    209210 
     211  /*
     212    Gets the number of controls - defined in the headings section.
     213   */
    210214  private int getNumFeatures(List<String> headings)
    211215  {
    212216    int numControls = 0;
    213     if (headings != null && !(headings.size()<1))
     217    if (headings != null && !(headings.size() < 1))
    214218    {   
    215219      for (String s : headings)
Note: See TracChangeset for help on using the changeset viewer.