org.biojava.bio.program.abi
Class ABIFChromatogram

java.lang.Object
  extended by org.biojava.bio.chromatogram.AbstractChromatogram
      extended by org.biojava.bio.program.abi.ABIFChromatogram
All Implemented Interfaces:
java.io.Serializable, Chromatogram

public class ABIFChromatogram
extends AbstractChromatogram
implements java.io.Serializable

An implementation of Chromatogram to encapulsulate chromatogram data extracted from the files produced by ABI sequencers, such as the the 377 and the 3700. The format was described by Clark Tibbetts in his paper "Raw Data File Formats, and the Digital and Analog Raw Data Streams of the ABI PRISM 377 DNA Sequencer." Available online http://www-2.cs.cmu.edu/afs/cs/project/genome/WWW/Papers/clark.html

Author:
Rhett Sutphin (UI CBCB), Richard Holland
See Also:
ABIFParser, Serialized Form

Nested Class Summary
protected  class ABIFChromatogram.Parser
          An extension of ABIFParser that reads the particular fields from the ABIF that contain the chromatogram data and initializes the fields in its enclosing ABIFChromatogram instance.
 
Field Summary
 
Fields inherited from interface org.biojava.bio.chromatogram.Chromatogram
DNA, OFFSETS
 
Constructor Summary
ABIFChromatogram()
           
 
Method Summary
static ABIFChromatogram create(java.io.File f)
          Create a new ABIF object from a file.
static ABIFChromatogram create(java.io.InputStream in)
          Create a new ABIF object from a stream of bytes.
protected  ABIFChromatogram load(java.io.File f)
           
protected  ABIFChromatogram load(java.io.InputStream in)
           
protected  AbstractChromatogram reverseComplementInstance()
          Returns a new instance of this AbstractChromatogram subclass for use in AbstractChromatogram.reverseComplement().
 
Methods inherited from class org.biojava.bio.chromatogram.AbstractChromatogram
clearTraces, createImmutableAlignment, createImmutableSymbolList, getBaseCalls, getMax, getMax, getSequenceLength, getSignificantBits, getTrace, getTraceLength, reverse, reverseComplement, reverseComplementBaseCallList, reverseComplementBaseCalls, setBaseCallAlignment, setBits, setTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ABIFChromatogram

public ABIFChromatogram()
Method Detail

create

public static ABIFChromatogram create(java.io.File f)
                               throws java.io.IOException,
                                      UnsupportedChromatogramFormatException
Create a new ABIF object from a file.

This method is more efficent than create(InputStream).

Throws:
java.io.IOException
UnsupportedChromatogramFormatException

create

public static ABIFChromatogram create(java.io.InputStream in)
                               throws java.io.IOException,
                                      UnsupportedChromatogramFormatException
Create a new ABIF object from a stream of bytes.

Due to the non-single-pass design of the ABI format, this method will wrap the InputStream in an CachingInputStream. For this reason, create(File) should be preferred.

Parameters:
in - the stream from which to read
Returns:
a new ABIFChromatogram object
Throws:
java.io.IOException - if there is a problem with the underlying stream
UnsupportedChromatogramFormatException

load

protected ABIFChromatogram load(java.io.File f)
                         throws java.io.IOException,
                                UnsupportedChromatogramFormatException
Throws:
java.io.IOException
UnsupportedChromatogramFormatException

load

protected ABIFChromatogram load(java.io.InputStream in)
                         throws java.io.IOException,
                                UnsupportedChromatogramFormatException
Throws:
java.io.IOException
UnsupportedChromatogramFormatException

reverseComplementInstance

protected AbstractChromatogram reverseComplementInstance()
Description copied from class: AbstractChromatogram
Returns a new instance of this AbstractChromatogram subclass for use in AbstractChromatogram.reverseComplement().

Specified by:
reverseComplementInstance in class AbstractChromatogram
Returns:
a reverse-complemented AbstractChromatogram