de.jstacs.data
Class Sequence.CompositeSequence<T>
java.lang.Object
de.jstacs.data.Sequence<T>
de.jstacs.data.Sequence.RecursiveSequence<T>
de.jstacs.data.Sequence.CompositeSequence<T>
- Type Parameters:
T - the type of each position
- All Implemented Interfaces:
- Comparable<Sequence<T>>
- Enclosing class:
- Sequence<T>
protected static class Sequence.CompositeSequence<T>
- extends Sequence.RecursiveSequence<T>
The class handles composite Sequences. A
Sequence.CompositeSequence consists of several (partial) Sequence
s. A biological example are promoters like in eukaryotes (-10 and -35
box).
- Author:
- Jens Keilwagen
| Methods inherited from class de.jstacs.data.Sequence |
annotate, compareTo, complement, complement, create, create, create, equals, getAlphabetContainer, getAnnotation, getCompositeSequence, getCompositeSequence, getHammingDistance, getNumberOfSequenceAnnotationsByType, getSequenceAnnotationByType, getSequenceAnnotationByTypeAndIdentifier, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, matches, reverse, reverse, reverseComplement, reverseComplement, toDiscrete, toString, toString, toString, toString |
Sequence.CompositeSequence
public Sequence.CompositeSequence(Sequence seq,
int[] starts,
int[] lengths)
- This is a very efficient way to create a
Sequence.CompositeSequence
for Sequences with a simple AlphabetContainer.
- Parameters:
seq - the original Sequencestarts - the start positions of the junkslengths - the length of each junk
Sequence.CompositeSequence
public Sequence.CompositeSequence(AlphabetContainer abc,
Sequence<T> seq,
int[] starts,
int[] lengths)
- This constructor should be used if one wants to create a
Sample of Sequence.CompositeSequences. With this constructor
you are enabled to create a Sample where every
Sequence has the same AlphabetContainer instance.
Internally it is checked that the AlphabetContainer matches
with the one of the subsequence.
- Parameters:
abc - the new AlphabetContainerseq - the original Sequencestarts - the start positions of the junkslengths - the length of each junk
getIndex
protected int getIndex(int pos)
- Description copied from class:
Sequence.RecursiveSequence
- Returns the index in the internal sequence.
- Specified by:
getIndex in class Sequence.RecursiveSequence<T>
- 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<T>
- Returns:
- the length of the
Sequence
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<T>
- Returns:
- the cloned
Sequence without annotation