de.jstacs.data.sequences
Class Sequence.CompositeSequence<T>
java.lang.Object
de.jstacs.data.sequences.Sequence<T>
de.jstacs.data.sequences.Sequence.RecursiveSequence<T>
de.jstacs.data.sequences.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 Sequence
s. 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.sequences.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 Sequence
s with a simple AlphabetContainer
.
- Parameters:
seq
- the original Sequence
starts
- 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
DataSet
of Sequence.CompositeSequence
s. With this constructor
you are enabled to create a DataSet
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 AlphabetContainer
seq
- the original Sequence
starts
- 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