- 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
Defines a minimal data structure for reading and writing a sequence alignment. The full
Profile
data structure in the alignment module provides additional functionality.- Author:
- Mark Chapman
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
List of output formats. -
Method Summary
Modifier and TypeMethodDescriptiongetAlignedSequence
(int listIndex) ReturnsSequence
at given index.getCompoundsAt
(int alignmentIndex) ReturnsCompoundSet
of allSequence
sint
Returns the number of columns in the alignment profile.int
getSize()
Returns the number of rows in this profile.toString()
Returns a simple view of the alignment profile.toString
(int width) Returns a formatted view of the alignment profile.Returns a formatted view of the alignment profile.
-
Method Details
-
getAlignedSequence
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
- Returns:
- list of aligned sequences
-
getCompoundsAt
- 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
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
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
-