Class GenericIntensityParser
java.lang.Object
net.sf.basedb.util.importer.spotdata.GenericIntensityParser
- All Implemented Interfaces:
SpotIntensityParser
Generic spot intensity parser implementation that
looks for 'intensity1', ..., 'intensityN' data columns for any
number of channels.
- Version:
- 2.14
- Author:
- Nicklas
- Last modified
- $Date: 2019-03-20 14:31:03 +0100 (ons, 20 mars 2019) $
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGenericIntensityParser
(int channels) Creates a new parser for the specified number of channels. -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginSection
(BaseFileParser parser, FlatFileParser ffp, List<String> assayFields) Prepare for parsing the data section.boolean
hasRequiredAssayFields
(BaseFileParser parser, FlatFileParser ffp, List<String> assayFields) Check the list of assay fields to see if all columns that are required are present or not.boolean
setIntensities
(FlatFileParser.Data data, float[] intensities, int firstIndex) Extract the intensity values from the current data line for a single bioassay.
-
Field Details
-
channels
private final int channels -
index
private int[] index
-
-
Constructor Details
-
GenericIntensityParser
public GenericIntensityParser(int channels) Creates a new parser for the specified number of channels.
-
-
Method Details
-
hasRequiredAssayFields
public boolean hasRequiredAssayFields(BaseFileParser parser, FlatFileParser ffp, List<String> assayFields) Description copied from interface:SpotIntensityParser
Check the list of assay fields to see if all columns that are required are present or not. This method is called in the first pass to decide which spot intensity parser that should be used in the second pass.- Specified by:
hasRequiredAssayFields
in interfaceSpotIntensityParser
- Parameters:
parser
- The master BASEfile parserffp
- The flat file parser that parses the current fileassayFields
- The list of assay fields- Returns:
- TRUE if all required fields are present, FALSE otherwise
-
beginSection
Description copied from interface:SpotIntensityParser
Prepare for parsing the data section. Preparations typically include extracting the column indexes of the data columns. This method is called in the second pass before starting to parse data for a 'spot' section. NOTE! The same object instance may be used to parse more than one section in a serial BASEfile.- Specified by:
beginSection
in interfaceSpotIntensityParser
- Parameters:
parser
- The master BASEfile parserffp
- The flat file parser that parses the current fileassayFields
- The list of assay fields
-
setIntensities
Description copied from interface:SpotIntensityParser
Extract the intensity values from the current data line for a single bioassay. 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.- Specified by:
setIntensities
in interfaceSpotIntensityParser
- Parameters:
data
- The current data lineintensities
- An array that should be populate with intensity valuesfirstIndex
- The index of the first data column that contains data for the current bioassay- Returns:
- TRUE if the values could be set correctly, FALSE otherwise (which means that the spot data will not be inserted)
-