Package jebl.evolution.alignments
Class BasicAlignment
java.lang.Object
jebl.evolution.alignments.BasicAlignment
A basic implementation of the Alignment interface.
- Version:
- $Id: BasicAlignment.java 1007 2009-07-17 16:01:47Z rambaut $
- Author:
- Andrew Rambaut, Alexei Drummond
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a basic alignment with no sequences.BasicAlignment
(Collection<? extends Sequence> sequences) Constructs a basic alignment from a collection of sequences.BasicAlignment
(Sequence[] sequences) Constructs a basic alignment from an array of sequences. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSequence
(Sequence sequence) Adds a sequence to this alignmentint
int
Get a list of all the patternsgetSequence
(Taxon taxon) int
getTaxa()
-
Constructor Details
-
BasicAlignment
public BasicAlignment()Constructs a basic alignment with no sequences. -
BasicAlignment
Constructs a basic alignment from a collection of sequences. The sequence objects are not copied.- Parameters:
sequences
-
-
BasicAlignment
Constructs a basic alignment from an array of sequences. The sequence objects are not copied.- Parameters:
sequences
-
-
-
Method Details
-
getSequences
- Specified by:
getSequences
in interfaceSequences
- Returns:
- a set containing all the sequences in this alignment.
-
getSequenceList
- Specified by:
getSequenceList
in interfaceAlignment
-
getSequenceType
- Specified by:
getSequenceType
in interfacePatterns
- Returns:
- the data type of the states in these site patterns.
-
getSequence
- Specified by:
getSequence
in interfaceSequences
-
getSiteCount
public int getSiteCount()- Specified by:
getSiteCount
in interfaceAlignment
-
getPatternCount
public int getPatternCount()- Specified by:
getPatternCount
in interfacePatterns
-
getPatternLength
public int getPatternLength()- Specified by:
getPatternLength
in interfacePatterns
-
getPatterns
Description copied from interface:Patterns
Get a list of all the patterns- Specified by:
getPatterns
in interfacePatterns
- Returns:
- the list
-
getTaxa
-
addSequence
Adds a sequence to this alignment- Parameters:
sequence
- the new sequence.
-