public interface AlignedSequence<S extends Sequence<C>,C extends Compound> extends Sequence<C>
Sequence
within an alignment.Modifier and Type | Interface and Description |
---|---|
static class |
AlignedSequence.Step
Defines an alignment step in order to pass alignment information from an
Aligner to a constructor. |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Nullifies cached arrays/objects.
|
int[] |
getAlignmentFromSequence()
Returns the alignment.
|
int |
getAlignmentIndexAt(int sequenceIndex)
Returns the column index within an alignment corresponding to the given index in the original
Sequence . |
double |
getCoverage()
Returns the coverage, as a fraction between 0 and 1, of this
AlignedSequence with respect to the original sequence. |
Point |
getEnd()
|
Location |
getLocationInAlignment()
|
int |
getNumGapPositions()
Returns number of gap positions (gap openings and extensions) in the sequence.
|
int |
getNumGaps()
Returns number of gaps (gap openings) in the sequence.
|
S |
getOriginalSequence()
Returns the original
Sequence before alignment. |
int |
getOverlapCount()
Returns the maximum number of elements contributed to a column of an alignment by this
Sequence . |
int[] |
getSequenceFromAlignment()
Returns the sequence positions at each alignment index
|
int |
getSequenceIndexAt(int alignmentIndex)
Returns the index in the original
Sequence corresponding to the given index within an alignment. |
Point |
getStart()
|
boolean |
isCircular()
Returns true if this
Sequence wraps around from the last alignment column back to the first. |
boolean |
isGap(int alignmentIndex)
Returns true if this
Sequence has a gap at a particular alignment column. |
countCompounds, getAsList, getCompoundAt, getCompoundSet, getIndexOf, getInverse, getLastIndexOf, getLength, getSequenceAsString, getSubSequence
forEach, iterator, spliterator
getAccession
void clearCache()
int[] getAlignmentFromSequence()
int[] getSequenceFromAlignment()
int getAlignmentIndexAt(int sequenceIndex)
Sequence
.
Both indices are 1-indexed and inclusive.sequenceIndex
- index in the original Sequence
IndexOutOfBoundsException
- if sequenceIndex < 1 or sequenceIndex >
getOriginalSequence()
.Sequence.getLength()
Location getLocationInAlignment()
Location
of the original Sequence
within an alignment. This provides access to
additional substructure beyond start and end points.int getNumGaps()
Location
information or from
gap Compound
s, which may not necessarily result in the same number.int getNumGapPositions()
Location
information or from gap Compound
s, which may not necessarily result in the same number.double getCoverage()
AlignedSequence
with respect to the original sequence.
This is equivalent to (Sequence.getLength()
- getNumGapPositions()
) / getOriginalSequence().getLength().S getOriginalSequence()
Sequence
before alignment.int getOverlapCount()
Sequence
. If
this Sequence
is circular, this number is >= 1. If not, this overlap count is definitely 1.int getSequenceIndexAt(int alignmentIndex)
Sequence
corresponding to the given index within an alignment. Both
indices are 1-indexed and inclusive.alignmentIndex
- column index within an alignmentSequence
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > Sequence.getLength()
boolean isCircular()
Sequence
wraps around from the last alignment column back to the first. This makes
overlap possible, but does not require an overlap count > 1.boolean isGap(int alignmentIndex)
Sequence
has a gap at a particular alignment column.alignmentIndex
- column index within an alignmentIndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > Sequence.getLength()
Copyright © 2000–2018 BioJava. All rights reserved.