|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.importer.spotdata.FirstPassSectionSpotsParser
public class FirstPassSectionSpotsParser
Parses a 'spots' section of a BASEfile with bioassay set spot data. This section is optional but can also appear more than once (eg. serial BASEfile). The section must have an 'assays' header that contains the id:s of the bioassays that have spot data in this section. The id values should either reference an id from the 'assays' section or the id of an existing bioassay in the database.
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.
Field Summary | |
---|---|
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 Summary | |
---|---|
FirstPassSectionSpotsParser(DbControl dc,
BaseFileInfo info,
BioAssaySet parent)
Creates a new 'section spot' parser for the first pass. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
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 setMethod Detail |
---|
public 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 data
IOException
- If there is a problem reading the datapublic void addSpotIntensityParser(SpotIntensityParser parser)
GenericIntensityParser
,
MAParser
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |