de.jstacs.data.sequences
Class PermutedSequence
java.lang.Object
de.jstacs.data.Sequence
de.jstacs.data.sequences.RecursiveSequence
de.jstacs.data.sequences.PermutedSequence
- All Implemented Interfaces:
- Comparable<Sequence>
public class PermutedSequence
- extends RecursiveSequence
Class for a permuted sequence.
- Author:
- Jan Grau
| Methods inherited from class de.jstacs.data.Sequence |
annotate, compareTo, complement, complement, create, create, create, equals, getAlphabetContainer, getAnnotation, getCompositeSequence, getCompositeSequence, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, reverse, reverse, reverseComplement, reverseComplement, toDiscrete, toString, toString, toString, toString |
PermutedSequence
public PermutedSequence(Sequence seq)
throws WrongAlphabetException
- This constructor creates an instance by shuffling the symbols.
- Parameters:
seq - the initial sequence
- Throws:
WrongAlphabetException - if the alphabet container is not simple
getIndex
protected int getIndex(int pos)
- Description copied from class:
RecursiveSequence
- Returns the index in the internal sequence.
- Specified by:
getIndex in class RecursiveSequence
- Parameters:
pos - the index in the external sequence
- Returns:
- the index in the internal sequence
getLength
public int getLength()
- Description copied from class:
Sequence
- Returns the length of the sequence
- Specified by:
getLength in class Sequence
- Returns:
- the length
flatCloneWithoutAnnotation
protected Sequence flatCloneWithoutAnnotation()
- Description copied from class:
Sequence
- Works in analogy to
Object.clone(), but does not clone the annotation. This method is used in Sequence.annotate(boolean, SequenceAnnotation...).
- Specified by:
flatCloneWithoutAnnotation in class Sequence
- Returns:
- the cloned
Sequence.CompositeSequence without annotation