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> extends Iterable<AlignedSequence<S,C>>
List
returned is unmodifiable unless
the class implements the subinterface MutableProfile
.Modifier and Type | Interface and Description |
---|---|
static class |
Profile.StringFormat
List of output formats.
|
Modifier and Type | Method and Description |
---|---|
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)
|
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()
|
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.
|
forEach, iterator, spliterator
AlignedSequence<S,C> getAlignedSequence(int listIndex)
AlignedSequence
at given index.listIndex
- index of sequence in profileIndexOutOfBoundsException
- 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 profileList<AlignedSequence<S,C>> getAlignedSequences(S... sequences)
List
containing some of the individual AlignedSequence
s of this alignment.sequences
- original Sequence
sC 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 alignmentIndexOutOfBoundsException
- 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 alignmentIndexOutOfBoundsException
- 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 alignmentIndexOutOfBoundsException
- 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 countIndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
List<C> getCompoundsAt(int alignmentIndex)
alignmentIndex
- column index within an alignmentIndexOutOfBoundsException
- if alignmentIndex < 1 or alignmentIndex > getLength()
CompoundSet<C> getCompoundSet()
CompoundSet
of all AlignedSequence
sCompound
s in contained sequencesfloat[] getCompoundWeightsAt(int alignmentIndex)
Compound
in the given column for all compounds in CompoundSet
.alignmentIndex
- column index within an alignmentIndexOutOfBoundsException
- 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 countIndexOutOfBoundsException
- 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 alignmentIndexOutOfBoundsException
- 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 elementint 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 elementint getLength()
List<S> getOriginalSequences()
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 viewIllegalArgumentException
- if location is invalidboolean hasGap(int alignmentIndex)
AlignedSequence
has a gap at the given index.alignmentIndex
- column index within an alignmentAlignedSequence
has a gap at the given indexIndexOutOfBoundsException
- 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.String toString(int width)
width
- limit on the line lengthString toString(Profile.StringFormat format)
format
- output formatCopyright © 2000–2018 BioJava. All rights reserved.