|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
S
- each element of the alignment Profile
is of type SC
- each element of an AlignedSequence
is a Compound
of type Cpublic interface Profile<S extends Sequence<C>,C extends Compound>
Defines a data structure for the results of sequence alignment. Every List
returned is unmodifiable unless
the class implements the subinterface MutableProfile
.
Nested Class Summary | |
---|---|
static class |
Profile.StringFormat
List of output formats. |
Method Summary | |
---|---|
AlignedSequence<S,C> |
getAlignedSequence(int listIndex)
Returns AlignedSequence at given index. |
AlignedSequence<S,C> |
getAlignedSequence(S sequence)
Searches for the given Sequence within this alignment profile. |
List<AlignedSequence<S,C>> |
getAlignedSequences()
Returns a List containing the individual AlignedSequence s of this alignment. |
List<AlignedSequence<S,C>> |
getAlignedSequences(int... listIndices)
Returns a List containing some of the individual AlignedSequence s of this alignment. |
List<AlignedSequence<S,C>> |
getAlignedSequences(S... sequences)
Returns a List containing some of the individual AlignedSequence s of this alignment. |
C |
getCompoundAt(int listIndex,
int alignmentIndex)
Returns the Compound at row of given sequence and column of alignment index. |
C |
getCompoundAt(S sequence,
int alignmentIndex)
Returns the Compound at row of given sequence and column of alignment index. |
int[] |
getCompoundCountsAt(int alignmentIndex)
Returns the number of each Compound in the given column for all compounds in CompoundSet . |
int[] |
getCompoundCountsAt(int alignmentIndex,
List<C> compounds)
Returns the number of each Compound in the given column only for compounds in the given list. |
List<C> |
getCompoundsAt(int alignmentIndex)
Returns the Compound elements of the original Sequence s at the given column. |
CompoundSet<C> |
getCompoundSet()
Returns CompoundSet of all AlignedSequence s |
float[] |
getCompoundWeightsAt(int alignmentIndex)
Returns the fraction of each Compound in the given column for all compounds in CompoundSet . |
float[] |
getCompoundWeightsAt(int alignmentIndex,
List<C> compounds)
Returns the fraction of each Compound in the given column only for compounds in the given list. |
int |
getIndexOf(C compound)
Searches for the given Compound within this alignment profile. |
int[] |
getIndicesAt(int alignmentIndex)
Returns the indices in the original Sequence s corresponding to the given column. |
int |
getLastIndexOf(C compound)
Searches for the given Compound within this alignment profile. |
int |
getLength()
Returns the number of columns in the alignment profile. |
List<S> |
getOriginalSequences()
Returns a List containing the original Sequence s used for alignment. |
int |
getSize()
Returns the number of rows in this profile. |
ProfileView<S,C> |
getSubProfile(Location location)
Returns a ProfileView windowed to contain only the given Location . |
boolean |
hasGap(int alignmentIndex)
Returns true if any AlignedSequence has a gap at the given index. |
boolean |
isCircular()
Returns true if any AlignedSequence is circular. |
String |
toString()
Returns a simple view of the alignment profile. |
String |
toString(int width)
Returns a formatted view of the alignment profile. |
String |
toString(Profile.StringFormat format)
Returns a formatted view of the alignment profile. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
AlignedSequence<S,C> getAlignedSequence(int listIndex)
AlignedSequence
at given index.
listIndex
- index of sequence in profile
IndexOutOfBoundsException
- if listIndex < 1 or listIndex > number of sequencesAlignedSequence<S,C> getAlignedSequence(S sequence)
Sequence
within this alignment profile. Returns the corresponding
AlignedSequence
.
sequence
- an original Sequence
AlignedSequence
List<AlignedSequence<S,C>> getAlignedSequences()
List
containing the individual AlignedSequence
s of this alignment.
List<AlignedSequence<S,C>> getAlignedSequences(int... listIndices)
List
containing some of the individual AlignedSequence
s of this alignment.
listIndices
- indices of sequences in profile
List<AlignedSequence<S,C>> getAlignedSequences(S... sequences)
List
containing some of the individual AlignedSequence
s of this alignment.
sequences
- original Sequence
s
C getCompoundAt(int listIndex, int alignmentIndex)
Compound
at row of given sequence and column of alignment index. If the given sequence has
overlap, this will return the Compound
from the top row of the sequence.
listIndex
- index of sequence in profilealignmentIndex
- column index within an alignment
IndexOutOfBoundsException
- if listIndex < 1, listIndex > number of sequences, alignmentIndex < 1, or
alignmentIndex > getLength()
C getCompoundAt(S sequence, int alignmentIndex)
Compound
at row of given sequence and column of alignment index. If the given sequence has
overlap, this will return the Compound
from the top row of the sequence.
sequence
- either an AlignedSequence
or an original Sequence
alignmentIndex
- column index within an alignment
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
int[] getCompoundCountsAt(int alignmentIndex)
Compound
in the given column for all compounds in CompoundSet
.
alignmentIndex
- column index within an alignment
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
int[] getCompoundCountsAt(int alignmentIndex, List<C> compounds)
Compound
in the given column only for compounds in the given list.
alignmentIndex
- column index within an alignmentcompounds
- list of compounds to count
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
List<C> getCompoundsAt(int alignmentIndex)
Compound
elements of the original Sequence
s at the given column.
alignmentIndex
- column index within an alignment
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
CompoundSet<C> getCompoundSet()
CompoundSet
of all AlignedSequence
s
Compound
s in contained sequencesfloat[] getCompoundWeightsAt(int alignmentIndex)
Compound
in the given column for all compounds in CompoundSet
.
alignmentIndex
- column index within an alignment
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
float[] getCompoundWeightsAt(int alignmentIndex, List<C> compounds)
Compound
in the given column only for compounds in the given list.
alignmentIndex
- column index within an alignmentcompounds
- list of compounds to count
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
int[] getIndicesAt(int alignmentIndex)
Sequence
s corresponding to the given column. All indices are
1-indexed and inclusive.
alignmentIndex
- column index within an alignment
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
int getIndexOf(C compound)
Compound
within this alignment profile. Returns column index nearest to the
start of the alignment profile, or -1 if not found.
compound
- search element
int getLastIndexOf(C compound)
Compound
within this alignment profile. Returns column index nearest to the end
of the alignment profile, or -1 if not found.
compound
- search element
int getLength()
List<S> getOriginalSequences()
List
containing the original Sequence
s used for alignment.
int getSize()
AlignedSequence
s are circular and overlap within the
alignment, the returned size will be greater than the number of sequences, otherwise the numbers will be equal.
ProfileView<S,C> getSubProfile(Location location)
ProfileView
windowed to contain only the given Location
. This only includes the
AlignedSequence
s which overlap the location.
location
- portion of profile to view
IllegalArgumentException
- if location is invalidboolean hasGap(int alignmentIndex)
AlignedSequence
has a gap at the given index.
alignmentIndex
- column index within an alignment
AlignedSequence
has a gap at the given index
IndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
boolean isCircular()
AlignedSequence
is circular. If so, sequences may simply wrap around from the end
to the start of the alignment or they may contribute multiple overlapping lines to the profile.
AlignedSequence
is circularString toString()
getSize()
lines with getLength()
Compound
s per line.
toString
in class Object
String toString(int width)
width
- limit on the line length
String toString(Profile.StringFormat format)
format
- output format
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |