Package org.biojava.bio.chromatogram
Interface Chromatogram
-
- All Known Implementing Classes:
ABIFChromatogram
,AbstractChromatogram
,SCF
,SimpleChromatogram
public interface Chromatogram
Encapsulates the basic information you would want from a chromatogram. Read-only.- Since:
- 1.3
- Author:
- Rhett Sutphin (UI CBCB), Matthew Pocock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Alignment
getBaseCalls()
Returns an alignment that describes the base calls for this chromatogram.int
getMax()
Gets the max intensity from all the traces.int
getMax(AtomicSymbol nucleotide)
Gets the max intensity on the trace for the specified nucleotide.int
getSequenceLength()
Returns the number of bases called by whatever base-calling software analyzed the chromatogram as loaded.int
getSignificantBits()
Returns the number of bits of the traces which are significant.int[]
getTrace(AtomicSymbol nucleotide)
Returns an array containing the intensities of the sampled waveform representing the chromatogram trace for basenucleotide
.int
getTraceLength()
Returns the length of the trace of the Chromatogram.Chromatogram
reverseComplement()
Returns a newChromatogram
representing the reverse complement of this one.
-
-
-
Field Detail
-
DNA
static final String DNA
The sequence label for the list of called bases.- See Also:
- Constant Field Values
-
OFFSETS
static final String OFFSETS
The sequence label for the trace offsets of the called bases.- See Also:
- Constant Field Values
-
-
Method Detail
-
getMax
int getMax()
Gets the max intensity from all the traces. Must be equivalent to the max of callinggetMax(AtomicSymbol)
on each of the four non-ambiguous DNA nucleotides.- Returns:
- the max intensity
-
getMax
int getMax(AtomicSymbol nucleotide) throws IllegalSymbolException
Gets the max intensity on the trace for the specified nucleotide.- Parameters:
nucleotide
- the trace to examine. Must be a concrete (non-ambiguous) nucleotide from the DNA alphabet- Returns:
- the max intensity
- Throws:
IllegalSymbolException
- when the nucleotide isn't from the DNA alphabet
-
getTraceLength
int getTraceLength()
Returns the length of the trace of the Chromatogram.- Returns:
- the number of samples in the trace
- See Also:
getTrace(AtomicSymbol)
-
getTrace
int[] getTrace(AtomicSymbol nucleotide) throws IllegalSymbolException
Returns an array containing the intensities of the sampled waveform representing the chromatogram trace for basenucleotide
. This may be a reference the actual internal representation of the samples, so callers must not modify it.The resulting array for each nucleotide must be
getTraceLength()
int
s long.- Parameters:
nucleotide
- the trace to examine. Must be the symbol for A, C, G, or T as provided byDNATools
- Returns:
- an array of integers representing the values of a particular chromatogram trace.
- Throws:
IllegalSymbolException
- ifnucleotide
isn't in the DNA alphabet
-
getSignificantBits
int getSignificantBits()
Returns the number of bits of the traces which are significant. For instance, if the chromatogram were originally encoded with a single byte per trace sample, this method must return 8.- Returns:
- the number of significant bits
-
getBaseCalls
Alignment getBaseCalls()
Returns an alignment that describes the base calls for this chromatogram. All of theSymbolList
s in this alignment must be the same length and that length must equalgetSequenceLength()
.The alignment must contain, at the least, two sequences:
- A sequence containing the called bases. The alphabet of this list
must be
DNATools.getDNA()
. The label for this list in the alignment must beChromatogram.DNA
- A sequence containing the trace offsets at which the called bases
were called. The alphabet of this list must be an
IntegerAlphabet
or aIntegerAlphabet.SubIntegerAlphabet
. The label for this list in the alignment must beChromatogram.OFFSETS
.
Implementors may provide other sequences as they see fit.
- Returns:
- an alignment of at least two sequences, as described above.
- A sequence containing the called bases. The alphabet of this list
must be
-
getSequenceLength
int getSequenceLength()
Returns the number of bases called by whatever base-calling software analyzed the chromatogram as loaded. Must equal
.getBaseCalls()
.length()- Returns:
- the number of bases
-
reverseComplement
Chromatogram reverseComplement()
Returns a newChromatogram
representing the reverse complement of this one.Implementors should copy the metadata about the chromatogram (i.e., base calls) as is appropriate to their formats.
- Returns:
- a new chromatogram that is the reverse complement of this one
-
-