public class FirstPassSectionSpotsParser extends Object implements BaseFileSectionParser
The section must also contain a 'columns' header that includes at least 'position', 'reporter' and 'assayData' columns. The 'assayData' is a meta column that expands to the columns defined by the required 'assayFields' header. This header must define as many 'intensityN' columns as there are channels in the experiment. For two-channel data, it may instead optionally use M (l2ratio1_2) and A (l10intgmean1_2). Columns with extra values can be defined by including a 'setExtraFloats' header. This header just enumerates the extra columns. A macthing column must also be presen in the 'assayFields' header.
NOTE! Column names can be redefined by calling
BaseFileParser.setRedefinedColumnName(String, String, String)
.
Here is an example of the headers and the first data line of a matrix BASEfile which has two two-channel assays and one extra value column.
section spots assays 101 102 columns position reporter assayData assayFields intensity1 intensity2 extra1 setExtraFloats extra1 % 1 1 1.0 2.0 0.5 2.0 3.0 0.2The first pass will check the headers and extract position/reporter mappings. This is important because we need to know if the child bioassay set has the same or a different position/reporter mapping than the parent bioassay set.
Modifier and Type | Field and Description |
---|---|
private DbControl |
dc |
private BaseFileInfo |
info |
private boolean |
mapZeroToNull |
private long |
nextProgressReport |
private BioAssaySet |
parent |
private long |
progressReportInterval |
static String |
SECTION
The section of the BASEfile this parser can parse, eg.
|
private int |
sectionCount |
private List<SpotIntensityParser> |
spotIntensityParsers |
private String |
totalBytes |
Constructor and Description |
---|
FirstPassSectionSpotsParser(DbControl dc,
BaseFileInfo info,
BioAssaySet parent)
Creates a new 'section spot' parser for the first pass.
|
Modifier and Type | Method and Description |
---|---|
void |
addSpotIntensityParser(SpotIntensityParser parser)
Adds a spot intensity parser to the list of used parsers.
|
void |
parseSection(BaseFileParser parser,
FlatFileParser ffp)
Parse the current section.
|
public static final String SECTION
private final DbControl dc
private final BaseFileInfo info
private final BioAssaySet parent
private final String totalBytes
private final long progressReportInterval
private long nextProgressReport
private int sectionCount
private boolean mapZeroToNull
private List<SpotIntensityParser> spotIntensityParsers
public FirstPassSectionSpotsParser(DbControl dc, BaseFileInfo info, BioAssaySet parent)
dc
- A DbControl to use for database accessinfo
- Information about the file we are parsingparent
- The parent bioassay setpublic void parseSection(BaseFileParser parser, FlatFileParser ffp) throws IOException
BaseFileSectionParser
FlatFileParser.parseHeaders()
must be called. Use
FlatFileParser.nextData()
to parse data lines.parseSection
in interface BaseFileSectionParser
parser
- The master BASEfile parser (can be used for
reporting progress, checking for interrupts, etc.)ffp
- The actual file parser, use this to get the dataIOException
- If there is a problem reading the datapublic void addSpotIntensityParser(SpotIntensityParser parser)
GenericIntensityParser
,
MAParser