|
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.BfsImporter
public class BfsImporter
Imports spot data from a serial or matrix BFS. Before it can be used various configuration properties must be set.
setDbControl(DbControl)
setTransformation(Transformation)
setMetadataParser(MetadataParser)
setInputStreamLocator(InputStreamLocator)
The import is started with doImport()
. This will start by parsing the
metadata file. Additional files that are referenced in the [files] section
are opened via the InputStreamLocator
. File entries that start with 'x-'
are considered to be extra files that should be attached to the child bioassay
set. But this is only done if an ExtraFileImporter
has been specified.
The section [settings] is used to control some aspects of the parsing. If the data is going into the same datacube the section is not needed. If a new datacube is needed the importer needs to know how to map the spot data to positions/reporters and to assays. We support three cases:
A new datacube is created by including a new-data-cube
entry in the settings section. Multiple parents per assay is enabled
by including a multi-assay-parents
entry.
The child bioassay set is by default assumed to use the same IntensityTransform
as the parent bioassay set. If the imported data uses a different transform
this should be specified by the transform
setting. Allowed
values are those defined by the IntensityTransform enumeration
(NONE
, LOG2
or LOG10
).
The importer needs 'rdata' and 'pdata' files in all cases. The ID column in the rdata file should be the position number. If the data is using the same datacube (case 1) no more columns are needed. The order of the positions doesn't matter as long as it matches the spot data files. All positions must be unique. If the data needs a new datacube (case 2 and 3) the rdata file also needs one of 'External ID' or 'Internal ID' columns which are used to map positions to reporters.
The meaning of the ID column in the pdata file depends on the case. In case 1 and 2 the ID is the internal ID of the parent assay. No more columns are needed. In case 3, the ID column is just a unique positive integer. In this case, the pdata file also needs a second column 'Parent ID', which should be a comma-separated list of the internal assay ID values of the parent assays.
The [sdata] section lists all spot data columns. The importer is looking for entries of the form 'Ch N' where N is 1, 2, ... etc. Exactly one entry for each channel is required.
Nested Class Summary | |
---|---|
(package private) static class |
BfsImporter.ProgressEventHandler
|
Field Summary | |
---|---|
private boolean |
autoCloseParsers
|
private DbControl |
dc
|
private ExtraFileImporter |
extraFileImporter
|
private InputStreamLocator |
locator
|
private MetadataParser |
metadataParser
|
private ProgressReporter |
progress
|
private Transformation |
transformation
|
Constructor Summary | |
---|---|
BfsImporter()
Create a new importer object. |
Method Summary | |
---|---|
protected void |
checkInterrupted()
Deprecated. In 2.16, use ThreadSignalHandler.checkInterrupted() instead |
BioAssaySet |
doImport()
Start the import. |
DbControl |
getDbControl()
Get the current DbControl. |
MetadataParser |
getMetadataParser()
|
ProgressReporter |
getProgressReporter()
Get the progress reporter. |
Transformation |
getTransformation()
Get the destination transformation. |
void |
setAutoCloseParsers(boolean autoClose)
If this option is set then all parsers are automatically closed when all data has been read to them. |
void |
setDbControl(DbControl dc)
Set's the DbControl that should be used to get data from the database. |
void |
setExtraFileImporter(ExtraFileImporter extraFileImporter)
|
void |
setInputStreamLocator(InputStreamLocator locator)
Set the input stream locator that is responsible for opening files that are referenced from the metadata file. |
void |
setMetadataParser(MetadataParser parser)
Set the metadata file parser. |
protected void |
setProgress(int percent,
String message)
Update the progress of the export. |
void |
setProgressReporter(ProgressReporter progress)
Set the progress reporter that is used to report progress. |
void |
setTransformation(Transformation transformation)
Set the destination transformation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean autoCloseParsers
private DbControl dc
private ProgressReporter progress
private MetadataParser metadataParser
private Transformation transformation
private InputStreamLocator locator
private ExtraFileImporter extraFileImporter
Constructor Detail |
---|
public BfsImporter()
Method Detail |
---|
public void setAutoCloseParsers(boolean autoClose)
public void setDbControl(DbControl dc)
public DbControl getDbControl()
public void setProgressReporter(ProgressReporter progress)
setProgress(int, String)
to update the current status.
public ProgressReporter getProgressReporter()
public void setTransformation(Transformation transformation)
transformation
- The transformationpublic Transformation getTransformation()
public void setMetadataParser(MetadataParser parser)
public MetadataParser getMetadataParser()
public void setInputStreamLocator(InputStreamLocator locator)
public void setExtraFileImporter(ExtraFileImporter extraFileImporter)
@Deprecated protected void checkInterrupted()
ThreadSignalHandler.checkInterrupted()
instead
SignalException
if it has.
protected void setProgress(int percent, String message)
ProgressReporter
public BioAssaySet doImport() throws IOException
IOException
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |