public class BioJavaPherogramProvider extends java.lang.Object implements PherogramProvider
Chromatogram from BioJava 1
as a PherogramProvider.
You can use this class together with ChromatogramFactory to load ABI or SCF files into LibrAlign.
Note that base call indices in LibrAlign start with 0 whereas the BioJava indices in the underlying
Chromatogram instance start with 1. (This class converts the indices accordingly.)
Trace indices (x-values) start with 0 in LibrAlign and in BioJava.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
QUALITY_LABEL_PREFIX |
LABEL_OVERCALL_PROBABILITY, LABEL_SUBSTITUTION_PROBABILITY, LABEL_UNDERCALL_PROBABILITY, PROBABILITY_LABELS, TRACE_CURVE_NUCLEOTIDES| Constructor and Description |
|---|
BioJavaPherogramProvider(Chromatogram chromatogram)
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAnnotation(java.lang.String label,
int baseIndex)
Returns the specified annotation (e.g.
|
char |
getBaseCall(int baseIndex)
Returns a base from the DNA sequence associated with the stored trace.
|
int |
getBaseCallPosition(int baseIndex)
Returns the position in the trace where the base at the specified index was observed.
|
double |
getMaxTraceValue(char nucleotide)
Returns the maximum trace value the specified curve contains.
|
int |
getQuality(char nucleotide,
int baseIndex)
Returns the quality score associated with the specified nucleotide.
|
int |
getSequenceLength()
Returns the length of the sequence associated with the stored trace.
|
int |
getTraceLength()
Returns the length of the stored trace.
|
double |
getTraceValue(char nucleotide,
int x)
Returns the y value of the specified trace curve at the specified position.
|
PherogramProvider |
reverseComplement()
Returns a new instance of this class which uses the reverse complemented version of the underlying BioJava 1
chromatogram.
|
public static final java.lang.String QUALITY_LABEL_PREFIX
public BioJavaPherogramProvider(Chromatogram chromatogram)
chromatogram - the BioJava pherogram instancepublic double getTraceValue(char nucleotide, int x)
PherogramProvidergetTraceValue in interface PherogramProvidernucleotide - the type of trace curve (A, T, C or G)x - the x position of the curve (The first position is 0 and the last is
PherogramProvider.getTraceLength()- 1.)public int getTraceLength()
PherogramProvidergetTraceLength in interface PherogramProviderpublic double getMaxTraceValue(char nucleotide)
PherogramProvider#getTraceValue(TraceCurve, int).)getMaxTraceValue in interface PherogramProvidernucleotide - the type of trace curve (A, T, C or G)public char getBaseCall(int baseIndex)
PherogramProvidergetBaseCall in interface PherogramProviderbaseIndex - the index of the base in the pherogram (base call) sequence (This might differ
from the index of the base in the associated sequence in the alignment. Indices start with 0.)public int getBaseCallPosition(int baseIndex)
PherogramProvidergetBaseCallPosition in interface PherogramProviderbaseIndex - the index of the base in the pherogram (base call) sequence (This might differ
from the index of the base in the associated sequence in the alignment. Indices start with 0.)PherogramProvider.getTraceLength()- 1public int getQuality(char nucleotide, int baseIndex)
PherogramProvidergetQuality in interface PherogramProvidernucleotide - the nucleotide identifying the trace curve for the quality scorebaseIndex - the index of the base call position to which the quality score belongs (Indices start with 0.)public int getAnnotation(java.lang.String label, int baseIndex)
PherogramProvidergetAnnotation in interface PherogramProviderlabel - the name of the attachment to be returnedbaseIndex - the index of base call to which the returned attachment score belongs (Indices start with 0.)public int getSequenceLength()
PherogramProvidergetSequenceLength in interface PherogramProviderpublic PherogramProvider reverseComplement()
reverseComplement in interface PherogramProvider