Interface Sequence
- All Superinterfaces:
Attributable, Comparable
- All Known Implementing Classes:
BasicSequence, CanonicalSequence, CodonSequence, ConsensusSequence, FilteredSequence, GaplessSequence, TranslatedSequence
A biomolecular sequence.
- Version:
- $Id: Sequence.java 365 2006-06-28 07:34:56Z pepster $
- Author:
- Andrew Rambaut, Alexei Drummond
-
Nested Class Summary
Nested classes/interfaces inherited from interface Attributable
Attributable.Utils -
Method Summary
Modifier and TypeMethodDescriptionstatic SequenceappendSequences(Sequence sequence1, Sequence sequence2) Append two sequences together to create a new sequence object.intGet the length of the sequencegetState(int site) static intgetStateCount(Sequence sequence, State state) Counts the number of occurances of a statebyte[]State[]static SequencegetSubSequence(Sequence sequence, int from, int to) Returns a sub-sequence for states from, to (inclusive).getTaxon()static SequencereplaceStates(Sequence sequence, List<State> searchStates, State replaceState) Searchers and replaces a sequence of any states givenstatic SequenceStrips a sequence of gapsstatic SequencestripStates(Sequence sequence, List<State> stripStates) Strips a sequence of any states givenstatic SequencetrimSequence(Sequence sequence, List<State> trimStates) Methods inherited from interface Attributable
getAttribute, getAttributeMap, getAttributeNames, removeAttribute, setAttributeMethods inherited from interface Comparable
compareTo
-
Method Details
-
getTaxon
Taxon getTaxon()- Returns:
- the taxon that this sequence represents (primarily used to match sequences with tree nodes)
-
getSequenceType
SequenceType getSequenceType()- Returns:
- the type of symbols that this sequence is made up of.
-
getString
String getString()- Returns:
- a string representing the sequence of symbols.
-
getStates
State[] getStates()- Returns:
- an array of state objects.
-
getStateIndices
byte[] getStateIndices()- Returns:
- an array of state indices.
-
getState
- Returns:
- the state at site.
-
getLength
int getLength()Get the length of the sequence- Returns:
- the length
-
appendSequences
-
getSubSequence
-
trimSequence
-
stripGaps
-
stripStates
-
replaceStates
-
getStateCount
-