T
- the type of each positionprotected static class Sequence.CompositeSequence<T> extends Sequence.RecursiveSequence<T>
Sequence
s. A
Sequence.CompositeSequence
consists of several (partial) Sequence
s. A biological example are promoters like in eukaryotes (-10 and -35
box).Sequence.CompositeSequence<T>, Sequence.RecursiveSequence<T>, Sequence.SubSequence<T>
content
alphabetCon, annotation, rc
Constructor and Description |
---|
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. |
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 . |
Modifier and Type | Method and Description |
---|---|
protected Sequence |
flatCloneWithoutAnnotation()
Works in analogy to
Object.clone() , but does not clone the
annotation. |
protected int |
getIndex(int pos)
Returns the index in the internal sequence.
|
int |
getLength()
Returns the length of the
Sequence . |
addToRepresentation, compareTo, continuousVal, discreteVal, fillContainer, getEmptyContainer, getEmptyRepresentation, getStringRepresentation, hashCodeForPos, isMultiDimensional
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
public CompositeSequence(Sequence seq, int[] starts, int[] lengths)
Sequence.CompositeSequence
for Sequence
s with a simple AlphabetContainer
.seq
- the original Sequence
starts
- the start positions of the junkslengths
- the length of each junkpublic CompositeSequence(AlphabetContainer abc, Sequence<T> seq, int[] starts, int[] lengths)
DataSet
of Sequence.CompositeSequence
s. With this constructor
you are enabled to create a DataSet
where every
Sequence
has the same AlphabetContainer
instance.
AlphabetContainer
matches
with the one of the subsequence.abc
- the new AlphabetContainer
seq
- the original Sequence
starts
- the start positions of the junkslengths
- the length of each junkprotected int getIndex(int pos)
Sequence.RecursiveSequence
getIndex
in class Sequence.RecursiveSequence<T>
pos
- the index in the external sequencepublic int getLength()
Sequence
Sequence
.protected Sequence flatCloneWithoutAnnotation()
Sequence
Object.clone()
, but does not clone the
annotation. This method is used in
Sequence.annotate(boolean, SequenceAnnotation...)
.flatCloneWithoutAnnotation
in class Sequence<T>
Sequence
without annotation