public class MappedDiscreteSequence extends SimpleDiscreteSequence
Sequence to an new Sequence using some DiscreteAlphabetMappings.Sequence.CompositeSequence<T>, Sequence.RecursiveSequence<T>, Sequence.SubSequence<T>| Modifier and Type | Field and Description |
|---|---|
protected SimpleDiscreteSequence |
original
The original
Sequence. |
protected AlphabetContainer |
originalAlphabetContainer
The original
AlphabetContainer. |
protected DiscreteAlphabetMapping[] |
transformation
The
DiscreteAlphabetMappings used for mapping the original Sequence. |
alphabetCon, annotation, rc| Modifier | Constructor and Description |
|---|---|
protected |
MappedDiscreteSequence(AlphabetContainer originalAlphabetContainer,
SequenceAnnotation[] seqAn,
DiscreteAlphabetMapping... transformation)
This method allows to create an empty
MappedDiscreteSequence. |
|
MappedDiscreteSequence(SimpleDiscreteSequence original,
DiscreteAlphabetMapping... transformation)
This method allows to create a
MappedDiscreteSequence from a given Sequence and some given DiscreteAlphabetMappings. |
| Modifier and Type | Method and Description |
|---|---|
int |
discreteVal(int pos)
Returns the discrete value at position
pos of the
Sequence. |
void |
fillContainer(int[] container,
int pos)
The method fills the content of a specific position in to the container.
|
protected MappedDiscreteSequence |
flatCloneWithoutAnnotation()
Works in analogy to
Object.clone(), but does not clone the
annotation. |
int[] |
getEmptyContainer()
The method returns a container that can be used for accessing the symbols for each position.
|
int |
getLength()
Returns the length of the
Sequence. |
double |
getLogNumberOfPossibleOriginalSequences()
|
double |
getLogNumberOfPossibleOriginalSequences(int start,
int end)
|
static AlphabetContainer |
getNewAlphabetContainer(AlphabetContainer original,
DiscreteAlphabetMapping... transformation)
This method allows to create a new
AlphabetContainer given an old AlphabetContainer and some DiscreteAlphabetMappings. |
addToRepresentation, compareTo, continuousVal, getEmptyRepresentation, getStringRepresentation, hashCodeForPos, isMultiDimensionalannotate, 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, toStringprotected SimpleDiscreteSequence original
Sequence.protected AlphabetContainer originalAlphabetContainer
AlphabetContainer.protected DiscreteAlphabetMapping[] transformation
DiscreteAlphabetMappings used for mapping the original Sequence.protected MappedDiscreteSequence(AlphabetContainer originalAlphabetContainer, SequenceAnnotation[] seqAn, DiscreteAlphabetMapping... transformation) throws WrongAlphabetException
MappedDiscreteSequence. That is a MappedDiscreteSequence that contains no original Sequence.originalAlphabetContainer - the original AlphabetContainerseqAn - the SequenceAnnotations for the MappedDiscreteSequencetransformation - the DiscreteAlphabetMapping defining the mappingWrongAlphabetException - if the mapped AlphabetContainer is not discrete (should never happen)public MappedDiscreteSequence(SimpleDiscreteSequence original, DiscreteAlphabetMapping... transformation) throws WrongAlphabetException
MappedDiscreteSequence from a given Sequence and some given DiscreteAlphabetMappings.original - the original Sequencetransformation - the DiscreteAlphabetMapping defining the mappingWrongAlphabetException - if the mapped AlphabetContainer is not discrete (should never happen)public static final AlphabetContainer getNewAlphabetContainer(AlphabetContainer original, DiscreteAlphabetMapping... transformation)
AlphabetContainer given an old AlphabetContainer and some DiscreteAlphabetMappings.original - the original AlphabetContainertransformation - the DiscreteAlphabetMappings defining the mappingAlphabetContainerpublic int discreteVal(int pos)
Sequencepos of the
Sequence.discreteVal in class Sequence<int[]>pos - the position of the Sequencepos of the
Sequenceprotected MappedDiscreteSequence flatCloneWithoutAnnotation()
SequenceObject.clone(), but does not clone the
annotation. This method is used in
Sequence.annotate(boolean, SequenceAnnotation...).flatCloneWithoutAnnotation in class Sequence<int[]>Sequence without annotationpublic int getLength()
SequenceSequence.public double getLogNumberOfPossibleOriginalSequences()
public double getLogNumberOfPossibleOriginalSequences(int start,
int end)
public final int[] getEmptyContainer()
SequencegetEmptyContainer in class SimpleDiscreteSequenceSequence.fillContainer(Object, int),
Sequence.isMultiDimensional()public final void fillContainer(int[] container,
int pos)
SequencefillContainer in class SimpleDiscreteSequencecontainer - the container which is used for filling the content.pos - the positionSequence.getEmptyContainer(),
Sequence.isMultiDimensional()