de.jstacs.data
Class Sequence.CompositeSequence
java.lang.Object
de.jstacs.data.Sequence
de.jstacs.data.sequences.RecursiveSequence
de.jstacs.data.Sequence.CompositeSequence
- All Implemented Interfaces:
- Comparable<Sequence>
- Enclosing class:
- Sequence
protected static class Sequence.CompositeSequence
- extends RecursiveSequence
The class handles composite sequences. A composite sequence consists of several (partial) sequences. A biological
example are promoters like in eucaryots (-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, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, reverse, reverse, reverseComplement, reverseComplement, toDiscrete, toString, toString, toString, toString |
Sequence.CompositeSequence
public Sequence.CompositeSequence(Sequence seq,
int[] starts,
int[] lengths)
- This is an very effient way to create a composite sequence for sequences with a simple AlphabetContainer.
- Parameters:
seq
- the original sequencestarts
- the index of the start positionlengths
- the length of the new sequence
Sequence.CompositeSequence
public Sequence.CompositeSequence(AlphabetContainer abc,
Sequence seq,
int[] starts,
int[] lengths)
- This constructor should be used if one wants to create a sample of composite sequences. 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 subsequence.
- Parameters:
abc
- the new AlphabetContainerseq
- the original sequencestarts
- the array of indices of the start positionlengths
- the array of (sub)length of the new sequence
getIndex
protected int getIndex(int pos)
- Description copied from class:
RecursiveSequence
- Return 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