Package org.biojava3.core.sequence
Class MultipleSequenceAlignment<S extends Sequence<C>,C extends Compound>
java.lang.Object
org.biojava3.core.sequence.MultipleSequenceAlignment<S,C>
- All Implemented Interfaces:
LightweightProfile<S,C>
public class MultipleSequenceAlignment<S extends Sequence<C>,C extends Compound>
extends Object
implements LightweightProfile<S,C>
Implements a minimal data structure for reading and writing a sequence alignment. The full
Profile data structure in the alignment module provides additional functionality.- Author:
- Scooter Willis, Mark Chapman
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojava3.core.sequence.template.LightweightProfile
LightweightProfile.StringFormat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlignedSequence(S sequence) A sequence that has been aligned to other sequences will have inserts.getAlignedSequence(int listIndex) Uses bioIndex starting at 1 instead of 0Get the list of sequencesgetCompoundsAt(int alignmentIndex) Get a list of compounds at a sequence positionGet the Compounds defined in the first sequenceintGet the length of the MSA where it is assumed that all sequence positionintgetSize()Get the number of sequences in the MSAbooleanremoveAlignedSequence(S sequence) Remove a sequencetoString()String representation of the MSAtoString(int width) Get a string representation of the MSA with a fixed widthSupport for different MSA formats
-
Constructor Details
-
MultipleSequenceAlignment
public MultipleSequenceAlignment()
-
-
Method Details
-
addAlignedSequence
A sequence that has been aligned to other sequences will have inserts.- Parameters:
sequence-
-
removeAlignedSequence
Remove a sequence- Parameters:
sequence-- Returns:
- flag
-
getAlignedSequence
Uses bioIndex starting at 1 instead of 0- Specified by:
getAlignedSequencein interfaceLightweightProfile<S extends Sequence<C>,C extends Compound> - Parameters:
listIndex-- Returns:
- sequence
-
getAlignedSequences
Get the list of sequences- Specified by:
getAlignedSequencesin interfaceLightweightProfile<S extends Sequence<C>,C extends Compound> - Returns:
- list of sequences
-
getCompoundsAt
Get a list of compounds at a sequence position- Specified by:
getCompoundsAtin interfaceLightweightProfile<S extends Sequence<C>,C extends Compound> - Parameters:
alignmentIndex-- Returns:
- compounds
-
getCompoundSet
Get the Compounds defined in the first sequence- Specified by:
getCompoundSetin interfaceLightweightProfile<S extends Sequence<C>,C extends Compound> - Returns:
- get compound set
-
getLength
public int getLength()Get the length of the MSA where it is assumed that all sequence position -
getSize
public int getSize()Get the number of sequences in the MSA -
toString
Get a string representation of the MSA with a fixed width -
toString
Support for different MSA formats -
toString
String representation of the MSA
-