AFLPcore
Class ABI3x00Filter

java.lang.Object
  |
  +--AFLPcore.Operation
        |
        +--AFLPcore.ImportFilter
              |
              +--AFLPcore.ABI3x00Filter

public class ABI3x00Filter
extends ImportFilter

This class reads data from a ABI 3100 and a 3700 capillary machine. As far as the program is concerned, a capilary is identical to a lane in a gel. The file format for the file is nearly identical to the format for the ABI 377 (the ABILaneFilter class), and the description will not be duplicated here. The major difference is that the LANS data does not always seem to be present. This means that the color of the size standard must be selected by the user.

See Also:
ABILaneFilter

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
ABI3x00Filter()
          Creates a new filter to read in ABI 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

YELLOW

public static final int YELLOW
color channel

RED

public static final int RED
color channel

BLUE

public static final int BLUE
color channel

GREEN

public static final int GREEN
color channel

ALL

public static final int ALL
Constructor Detail

ABI3x00Filter

public ABI3x00Filter()
Creates a new filter to read in ABI files.
Method Detail

getName

public java.lang.String getName()
Access the name of the filter.
Overrides:
getName in class Operation
Returns:
name of the import filter

getFileType

public int getFileType()
Returns the type of input file supported by this filter In this case ImportFilter.LANE, since the filter reads in lane data.
Overrides:
getFileType in class ImportFilter
Returns:
constant LANE.

getDescription

public java.lang.String getDescription()
Retrieves a short, approximately one sentence, description of the filter.
Overrides:
getDescription in class Operation
Returns:
the description

getHelpFile

public java.lang.String getHelpFile()
The help file describes which files the filter reads and the options that this filter accepts.
Overrides:
getHelpFile in class Operation
Returns:
File that contains the help information, either html or plaintext.

getOptions

public Option[] getOptions()
Returns the options for this filter, which includes the color of the data, the size function to use, and the size standard. The first option is the color to read, which can be one of four possilbe values: Red, Blue, Green, or Yellow. The color choice is given as a Option of type CHOICE. The second option allows the color of the size standard to be selected. The third 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.
Overrides:
getOptions in class Operation
Returns:
an array containing the options described above.
See Also:
Option, FeatureList, SizeFunction, SizeStandard

setOptions

public void setOptions(Option[] opts)
Sets the parameters for the filter to the specified values, including color. The color must be set before this filter can run. The option representing the color should have a string value naming the color. The size function must also be set for the filter to work. It must contain the name of a valid 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.
Overrides:
setOptions in class Operation
Parameters:
opts - an array of length 4 which contains the options mentioned above and described in getOptions() The order must be: color, size function, size standard.
Throws:
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.

readLane

public Lane[] readLane(java.io.File inputFile)
                throws java.io.IOException
This is the method that is called to preform the actual reading of the file. The data in the file represents data from a single lane. The options/parameters required for the filter should be set using setOptions, and if they are not, an exception will be thrown.
Overrides:
readLane in class ImportFilter
Parameters:
inputFile - The file that contains the lane data.
Returns:
a Lane object with all of the appropriate information.
Throws:
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 thrown

readGel

public Gel readGel(java.io.File inputFile)
            throws java.io.IOException
This filter does not read gels.
Overrides:
readGel in class ImportFilter
Returns:
Always null

readPeak

public Peak readPeak(java.io.RandomAccessFile in)
              throws java.io.IOException
Read in a peak from the file. A peak in the ABI file is 96 bytes long. The first 4 bytes are used to store the scan number as 32-bit integer. This scan number is different than the one displayed by the ABI programs. It is 1000 less, but the number 1000 could vary. 1000 is also the value stored in OFFS. The next two bytes are the height, as a 16-bit integer. I don't know what the next 12 bytes are. After that, the peak area is stored as a 32-bit integer. Skip four bytes again. we then have the size of the peak, in bp. This is a IEEE 754 single precision float.
   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
 
Parameters:
in - the input source
Returns:
a peak, with the size/location and height read from the file and the area set as the scan number, not the area.
Throws:
java.io.IOException - occurs if the file cannot be read.