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 TypeMethodDescriptionvoidaddSequence(Sequence sequence) Adds a sequence to this alignmentintintGet a list of all the patternsgetSequence(Taxon taxon) intgetTaxa()
-
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:
getSequencesin interfaceSequences- Returns:
- a set containing all the sequences in this alignment.
-
getSequenceList
- Specified by:
getSequenceListin interfaceAlignment
-
getSequenceType
- Specified by:
getSequenceTypein interfacePatterns- Returns:
- the data type of the states in these site patterns.
-
getSequence
- Specified by:
getSequencein interfaceSequences
-
getSiteCount
public int getSiteCount()- Specified by:
getSiteCountin interfaceAlignment
-
getPatternCount
public int getPatternCount()- Specified by:
getPatternCountin interfacePatterns
-
getPatternLength
public int getPatternLength()- Specified by:
getPatternLengthin interfacePatterns
-
getPatterns
Description copied from interface:PatternsGet a list of all the patterns- Specified by:
getPatternsin interfacePatterns- Returns:
- the list
-
getTaxa
-
addSequence
Adds a sequence to this alignment- Parameters:
sequence- the new sequence.
-