jebl.evolution.alignments
public abstract class ConsensusSequence extends java.lang.Object implements Sequence
Attributable.Utils
Constructor and Description |
---|
ConsensusSequence(Taxon taxon,
Alignment source)
Creates a FilteredSequence wrapper to the given source sequence.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Sequences are compared by their taxa
|
static State[] |
constructConsensus(Alignment source) |
java.lang.Object |
getAttribute(java.lang.String name) |
java.util.Set<java.lang.String> |
getAttributeNames() |
int |
getLength()
Returns the length of the sequence
|
SequenceType |
getSequenceType() |
State |
getState(int site) |
byte[] |
getStateIndices() |
State[] |
getStates() |
java.lang.String |
getString() |
Taxon |
getTaxon() |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets an named attribute for this object.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttributeMap, removeAttribute
public SequenceType getSequenceType()
getSequenceType
in interface Sequence
public java.lang.String getString()
public State[] getStates()
public byte[] getStateIndices()
getStateIndices
in interface Sequence
public State getState(int site)
public int getLength()
public Taxon getTaxon()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- another sequencepublic void setAttribute(java.lang.String name, java.lang.Object value)
Attributable
setAttribute
in interface Attributable
name
- the name of the attribute.value
- the new value of the attribute.public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface Attributable
name
- the name of the attribute of interest, or null if the attribute doesn't exist.public java.util.Set<java.lang.String> getAttributeNames()
getAttributeNames
in interface Attributable
http://code.google.com/p/jebl2/