-
- Type Parameters:
S- each element of the alignment profile is of type SC- each element of anSequenceis aCompoundof type C
- All Known Implementing Classes:
MultipleSequenceAlignment
public interface LightweightProfile<S extends Sequence<C>,C extends Compound>
Defines a minimal data structure for reading and writing a sequence alignment. The fullProfiledata structure in the alignment module provides additional functionality.- Author:
- Mark Chapman
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLightweightProfile.StringFormatList of output formats.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SgetAlignedSequence(int listIndex)ReturnsSequenceat given index.List<S>getAlignedSequences()List<C>getCompoundsAt(int alignmentIndex)CompoundSet<C>getCompoundSet()ReturnsCompoundSetof allSequencesintgetLength()Returns the number of columns in the alignment profile.intgetSize()Returns the number of rows in this profile.StringtoString()Returns a simple view of the alignment profile.StringtoString(int width)Returns a formatted view of the alignment profile.StringtoString(LightweightProfile.StringFormat format)Returns a formatted view of the alignment profile.
-
-
-
Method Detail
-
getAlignedSequence
S getAlignedSequence(int listIndex)
ReturnsSequenceat given index.- Parameters:
listIndex- index of sequence in profile- Returns:
- desired sequence
- Throws:
IndexOutOfBoundsException- if listIndex < 1 or listIndex > number of sequences
-
getAlignedSequences
List<S> getAlignedSequences()
- Returns:
- list of aligned sequences
-
getCompoundsAt
List<C> getCompoundsAt(int alignmentIndex)
- Parameters:
alignmentIndex- column index within an alignment- Returns:
- the sequence elements
- Throws:
IndexOutOfBoundsException- if alignmentIndex < 1 or alignmentIndex >getLength()
-
getCompoundSet
CompoundSet<C> getCompoundSet()
ReturnsCompoundSetof allSequences- Returns:
- set of
Compounds in contained sequences
-
getLength
int getLength()
Returns the number of columns in the alignment profile.- Returns:
- the number of columns
-
getSize
int getSize()
Returns the number of rows in this profile. If anySequences are circular and overlap within the alignment, the returned size will be greater than the number of sequences, otherwise the numbers will be equal.- Returns:
- number of rows
-
toString
String toString()
Returns a simple view of the alignment profile. This shows each sequence on a separate line (or multiple lines, if circular) and nothing more. This should result ingetSize()lines withgetLength()Compounds per line.
-
toString
String toString(int width)
Returns a formatted view of the alignment profile. This shows the start and end indices of the profile for each group of lines of the given width. Each line may also be labeled.- Parameters:
width- limit on the line length- Returns:
- a formatted view of the alignment profile
-
toString
String toString(LightweightProfile.StringFormat format)
Returns a formatted view of the alignment profile. Details depend on the format given.- Parameters:
format- output format- Returns:
- a formatted view of the alignment profile
-
-