Interface SpotIntensityParser
- All Known Implementing Classes:
GenericIntensityParser
,MAParser
public interface SpotIntensityParser
A spot intensity parser is responsible for parsing and extracting
spot intensity data on a row-by-row basis from a BASEfile.
After parsing the headers of a 'spot' section each registered
spot intensity parser will be asked if the section contains
all needed data columns
hasRequiredAssayFields(BaseFileParser, FlatFileParser, List)
.
The first parser that gives a positive response will be used to
parse the spot intensity data for that section.
The actual parsing is done in the second pass.
- Version:
- 2.14
- Author:
- Nicklas
- See Also:
- Last modified
- $Date: 2009-09-14 08:29:17 +0200 (må, 14 sep 2009) $
-
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.
-
Method Details
-
hasRequiredAssayFields
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.- 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
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.- Parameters:
parser
- The master BASEfile parserffp
- The flat file parser that parses the current fileassayFields
- The list of assay fields
-
setIntensities
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.- 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)
-