-
- Type Parameters:
S
- each element of the alignment profile is of type SC
- each element of anSequence
is aCompound
of 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 fullProfile
data structure in the alignment module provides additional functionality.- Author:
- Mark Chapman
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
LightweightProfile.StringFormat
List of output formats.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description S
getAlignedSequence(int listIndex)
ReturnsSequence
at given index.List<S>
getAlignedSequences()
List<C>
getCompoundsAt(int alignmentIndex)
CompoundSet<C>
getCompoundSet()
ReturnsCompoundSet
of allSequence
sint
getLength()
Returns the number of columns in the alignment profile.int
getSize()
Returns the number of rows in this profile.String
toString()
Returns a simple view of the alignment profile.String
toString(int width)
Returns a formatted view of the alignment profile.String
toString(LightweightProfile.StringFormat format)
Returns a formatted view of the alignment profile.
-
-
-
Method Detail
-
getAlignedSequence
S getAlignedSequence(int listIndex)
ReturnsSequence
at 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()
ReturnsCompoundSet
of allSequence
s- Returns:
- set of
Compound
s 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 anySequence
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.- 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()
Compound
s 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
-
-