Class ExtraFloatParser

java.lang.Object
net.sf.basedb.util.importer.spotdata.ExtraFloatParser

public class ExtraFloatParser extends Object
Parser that is responsible for extracting extra float values from the 'spot' section in a BASEfile. Extra value parsers are created in the first pass and used in the second pass.
Version:
2.14
Author:
Nicklas
Last modified
$Date: 2019-03-20 14:31:03 +0100 (ons, 20 mars 2019) $
  • Field Details

    • id

      private final String id
    • valueIndex

      private final int valueIndex
  • Constructor Details

    • ExtraFloatParser

      public ExtraFloatParser(String id, int valueIndex)
      Creates a new extra value parser.
      Parameters:
      id - The external id of the extra value type
      valueIndex - The index of the extra value column relative the first column of assay data
  • Method Details

    • getId

      public String getId()
      Get the external id of the extra value type.
    • getValue

      public float getValue(FlatFileParser.Data data, int firstIndex)
      Get the extra value from the data. If the section contains data for multiple bioassays (eg. a matrix BASEfile) this method is called multiple times (with different 'firstIndex' value) for each row.
      Parameters:
      data - The current data line
      firstIndex - The index of the first data column that contains data for the current bioassay
      Returns:
      The extracted float value, or Float.NaN if the value is invalid (results in not inserting it)