public abstract static class SequenceGraph.SequencePropertyRetriever extends Object
SequenceGraph.getSequencePropertyRetriever
(the sequence viewer sets it as a gettable property immediately after creating the graph).
A property retriever is supplied to sequence viewer extension plugins when they are created via SequenceViewerExtension.Factory.createSequenceViewerExtension
or SequenceViewerExtension.StatisticsFactory.createStatistics.
Plugins that wish to write test cases can instantiate a property retriever using forAlignment or forSequences.| Constructor and Description |
|---|
SequenceGraph.SequencePropertyRetriever() |
| Modifier and Type | Method and Description |
|---|---|
static SequenceGraph.SequencePropertyRetriever |
forAlignment(SequenceAlignmentDocument alignment)
Creates a SequencePropertyRetriever for this alignment.
|
abstract SequenceDocument.Alphabet |
getAlphabet()
Get the alphabet of the sequence(s)
|
int |
getCircularAlignmentLength() |
abstract EndGapsManager |
getEndGapsManager()
If this graph is on an alignment, gets an end gaps manager for quickly finding sequences that intersect a given base number, ignoring end gaps.
|
abstract int |
getLeadingTrimLength(int sequenceIndex)
Get the length (if any) of the leading trimmed region of this sequence
|
int |
getMappingQuality(int sequenceIndex) |
int |
getMaximumSequenceLength() |
abstract ExtendedNucleotideGraph |
getNucleotideGraph(int sequenceIndex)
Get the nucleotide graph (chromatogram) for the sequence at the specified index.
|
int |
getNumberOfMappedLocations(int sequenceIndex) |
int |
getNumberOfSequences()
Get the number of sequences.
|
abstract int |
getReferenceSequenceIndex()
Get the index of the reference sequence in this alignment (if any)
|
abstract SequenceCharSequence |
getSequenceCharSequence(int sequenceIndex)
Get the SequenceCharSequence for the sequence at the specified index.
|
SequenceListSummary |
getSequenceListSummary()
Gets a summary of all the sequences in a sequence list, or all the non-reference sequences in an alignment.
|
abstract String |
getSequenceName(int sequenceIndex)
Gets the name of the specified sequence.
|
abstract int |
getTrailingTrimLength(int sequenceIndex)
Get the length (if any) of the traling trimmed region of this sequence
|
boolean |
isCircularSequence(int sequenceIndex)
Returns true if this sequence is circular
|
boolean |
isFreeEndGapAlignment() |
abstract boolean |
isReferenceSequnece(int sequenceIndex)
Get whether or not the specified sequence is a reference sequence in an alignment or contig.
|
boolean |
isReversedSequence(int sequenceIndex)
Get the direction of the specified sequence.
|
abstract boolean |
isTrimmed(int sequenceIndex,
int residueIndex)
Get whether or not the specified position in the specified sequence is trimmed or not
|
public SequenceGraph.SequencePropertyRetriever()
public boolean isReversedSequence(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence to get the name of. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.public abstract String getSequenceName(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence to get the name of. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.public abstract boolean isReferenceSequnece(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.public abstract int getReferenceSequenceIndex()
public abstract boolean isTrimmed(int sequenceIndex,
int residueIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.residueIndex - the 0-based index of the residue in the sequence.public abstract int getLeadingTrimLength(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.public abstract int getTrailingTrimLength(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.public abstract ExtendedNucleotideGraph getNucleotideGraph(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.sequenceIndex or null if the sequence does not have a nucleotide graphpublic abstract SequenceDocument.Alphabet getAlphabet()
public abstract EndGapsManager getEndGapsManager()
public abstract SequenceCharSequence getSequenceCharSequence(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.sequenceIndexpublic int getNumberOfSequences()
public static SequenceGraph.SequencePropertyRetriever forAlignment(SequenceAlignmentDocument alignment)
alignment - the alignment to create a properties retriever for.public SequenceListSummary getSequenceListSummary()
public int getMaximumSequenceLength()
public boolean isCircularSequence(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.SequenceDocument.isCircular())public int getCircularAlignmentLength()
SequenceAlignmentDocument.getCircularLength()public int getNumberOfMappedLocations(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.DocumentField.NUMBER_OF_MAPPED_LOCATIONS. For sequences without this field, 1 will be returned.public int getMappingQuality(int sequenceIndex)
sequenceIndex - the 0-based index of the sequence. This is only applicable on alignment based graphs. This must be 0 on sequence based graphs.DocumentField.MAPPING_QUALITYpublic boolean isFreeEndGapAlignment()
SequenceAlignmentDocument.isFreeEndGapAlignment()