|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AFLPcore.Operation | +--AFLPcore.ImportFilter | +--AFLPcore.ABILaneFilter
This class reads data from a lane file produced by extracting lanes from a gel run on an ABI377. It has been tested with lanes extracted by GeneScan 2.0. It will probably work on with the ABI373 as well, but this has not been tested. This class reads in the processed data, so the lane must be processed as well as simply extracted. Also, it relies on the ABI software to find the peaks in the size standard.
It will extract the following pieces of information from the file:
This information will be stored in a Lane
object,
which is used by the program. The peaks read in will be passed to
a SizeFunction
which will use them to calculate the sizing
information for the data. Since the ABI software also calls peaks that
are not part of the size standard, the program compares all of the
peaks to an internal SizeStandard
and use only the sizes
it finds in that internal size standard. For example, the peaks with
locations of 50.00, 100.00, and 150.00 bp would be used, but 54.23 would
not. (Unless 54.23 was defined as part of the size standard, which can't
really happen since the size standard must contian whole values.)
The filter has three options that must be set before it can run
getOptions()
and
setOptions(Option[])
. All three options are a list of
choices, one of which must be selected. The possible values for the
color option are red, blue, green, and yellow. The size function and
the size standard can be the name of any size function/standard known
to the program. This class uses the FeatureList
class to
retrieve the known functions. Once the options have been set, the
readLane
method can be called to read the actual file.
The first 4 bytes contains the value of "ABIF" which indicates that the file is an ABI Lane file (I think). The file contains a record structure. Each record is 28 bytes long. The number of records is given in a 32-bit integer at byte 18 (indexed to 0), and the offset from the beginning of the file to the start of the first record is given as a 32-bit integer at byte 26. A record has the following structure:
struct{ byte[4] name; Four ASCII character name, like "DATA" int tagNumber; Distinguishes fields with the same name for example: DATA1, DATA2, ... , DATA12 short data_type; Denotes the type of data 4 = integer 7 = float, 10 = mm/dd/yy 11 = hh/mm/ss 18 = pascal string, 1024 = some sort of structure SHORT elementSize; The size of each element. int numElements; The number of elements. int recordLength; The length of the whole record. int dataOffset; The offset from the beginning of the file to the start of the record, unless the recordLength is less than 4, in which case it contains the actual data. int unknown; Usually 0, but seems to change with the editing of the file. }Most of this information was obtained from Clark Tibbetts paper. ( Tibbetts, Clark. "Raw Data File Formats and the Digital and Analog Raw Data Streams of the ABI PRISM DNA Sequencer(c)." 1995.)
The following records are of interest:
9 + colorNumber
.
stdColor
, the standard
trace is in DATA(9+stdColor) and PEAK(stdColor) contains the size
standard peaks.
Value Start Length(bytes) Type scan 0 4 integer (1000 + this value) height 4 2 integer area 18 4 integer size 26 4 IEEE 754 single-percision float
SizeFunction
,
SizeStandard
Field Summary | |
static int |
ALL
|
static int |
BLUE
color channel |
static int |
GREEN
color channel |
static int |
RED
color channel |
static int |
YELLOW
color channel |
Fields inherited from class AFLPcore.ImportFilter |
filetype, GEL, LANE |
Fields inherited from class AFLPcore.Operation |
descript, helpFile, name, options |
Constructor Summary | |
ABILaneFilter()
Creates a new filter to read in ABI lane files. |
Method Summary | |
java.lang.String |
getDescription()
Retrieves a short, approximately one sentence, description of the filter. |
int |
getFileType()
Returns the type of input file supported by this filter In this case ImportFilter.LANE , since the filter reads in lane data. |
java.lang.String |
getHelpFile()
The help file describes which files the filter reads and the options that this filter accepts. |
java.lang.String |
getName()
Access the name of the filter. |
Option[] |
getOptions()
Returns the options for this filter, which includes the color of the data, the size function to use, and the size standard. |
Gel |
readGel(java.io.File inputFile)
This filter does not read gels. |
Lane[] |
readLane(java.io.File inputFile)
This is the method that is called to preform the actual reading of the file. |
Peak |
readPeak(java.io.RandomAccessFile in)
Read in a peak from the file. |
void |
setOptions(Option[] opts)
Sets the parameters for the filter to the specified values, including color. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int YELLOW
public static final int RED
public static final int BLUE
public static final int GREEN
public static final int ALL
Constructor Detail |
public ABILaneFilter()
Method Detail |
public java.lang.String getName()
getName
in class Operation
public int getFileType()
ImportFilter.LANE
, since the filter reads in lane data.getFileType
in class ImportFilter
public java.lang.String getDescription()
getDescription
in class Operation
public java.lang.String getHelpFile()
getHelpFile
in class Operation
public Option[] getOptions()
Option
of type CHOICE
. The second
option is also of type CHOICE
. It tells which size
method should be used to compute the size of the fragements. Please
see the help files and the code for the size functions for a
description of how the work. The third option describes the size
standard to use. This simply gives the program a list of values.
These are stored in a file called "standards.cfg" Possible values
for all of these options are read in from the
FeatureList
class.getOptions
in class Operation
Option
,
FeatureList
,
SizeFunction
,
SizeStandard
public void setOptions(Option[] opts)
SizeFunction
. Note that
the name is not the class name of the SizeFunction
, but
the name each SizeFunction
stores internally. The
third option must also be set.setOptions
in class Operation
opts
- an array of length 3 which contains the options
mentioned above and described in getOptions()
The order must be: color, size function, size standard.MissingParameterError
- occurs when the filter fails to
extract a string from the first option in opts
.java.lang.IllegalArgumentException
- occurs when a string is found but
cannot be matched to one of the colors: Red, Blue, Green, or Yellow.
Or if an array with length not equal to 3 is given as
opts
, or if the specified size function, the second
option, could not be matched to a defined size function.public Lane[] readLane(java.io.File inputFile) throws java.io.IOException
setOptions
, and if they are not, an exception will be
thrown.readLane
in class ImportFilter
inputFile
- The file that contains the lane data.MissingParameterError
- occurs if the options are not
set. Since this includes the required color, the filter cannot
read in the lane.java.io.IOException
- If an error is encountered in the file,
then this exception will be thrownpublic Gel readGel(java.io.File inputFile) throws java.io.IOException
readGel
in class ImportFilter
null
public Peak readPeak(java.io.RandomAccessFile in) throws java.io.IOException
Value Start Length(bytes) Type scan 0 4 integer (1000 + this value) height 4 2 integer area 18 4 integer size 26 4 IEEE 754 single-percision float
in
- the input sourcejava.io.IOException
- occurs if the file cannot be read.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |