de.jstacs.data.sequences
Class MultiDimensionalDiscreteSequence
java.lang.Object
de.jstacs.data.sequences.Sequence<T>
de.jstacs.data.sequences.MultiDimensionalSequence<int[]>
de.jstacs.data.sequences.MultiDimensionalDiscreteSequence
- All Implemented Interfaces:
- Comparable<Sequence<int[]>>
public class MultiDimensionalDiscreteSequence
- extends MultiDimensionalSequence<int[]>
This class is for multidimensional discrete sequences that can be used, for instance, for phylogenetic footprinting.
- Author:
- Jens Keilwagen
Methods inherited from class de.jstacs.data.sequences.MultiDimensionalSequence |
addToRepresentation, complement, continuousVal, discreteVal, flatCloneWithoutAnnotation, getAnnotations, getEmptyRepresentation, getLength, getNumberOfSequences, getSequence, getStringRepresentation, hashCodeForPos, isMultiDimensional, reverseComplement |
Methods inherited from class de.jstacs.data.sequences.Sequence |
annotate, compareTo, complement, create, create, create, equals, getAlphabetContainer, getAnnotation, getCompositeSequence, getCompositeSequence, getHammingDistance, getNumberOfSequenceAnnotationsByType, getSequenceAnnotationByType, getSequenceAnnotationByTypeAndIdentifier, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, matches, reverse, reverse, reverseComplement, toDiscrete, toString, toString, toString, toString |
MultiDimensionalDiscreteSequence
public MultiDimensionalDiscreteSequence(SequenceAnnotation[] seqAn,
SimpleDiscreteSequence... sequence)
throws WrongLengthException,
WrongAlphabetException
- This constructor creates an
MultiDimensionalDiscreteSequence
from a set of individual Sequence
s.
- Parameters:
seqAn
- the annotations for the aligned sequencessequence
- the individual sequences that have been aligned
- Throws:
WrongLengthException
- if the sequences have different lengths
WrongAlphabetException
- if the sequences have different AlphabetContainer
s
fillContainer
public void fillContainer(int[] container,
int pos)
- Description copied from class:
Sequence
- The method fills the content of a specific position in to the container.
This is especially of interest for multidimensional sequences.
- Specified by:
fillContainer
in class Sequence<int[]>
- Parameters:
container
- the container which is used for filling the content.pos
- the position- See Also:
Sequence.getEmptyContainer()
,
Sequence.isMultiDimensional()
getEmptyContainer
public int[] getEmptyContainer()
- Description copied from class:
Sequence
- The method returns a container that can be used for accessing the symbols for each position.
This is especially of interest for multidimensional sequences.
- Specified by:
getEmptyContainer
in class Sequence<int[]>
- Returns:
- a container that can be used for accessing the symbols for each position
- See Also:
Sequence.fillContainer(Object, int)
,
Sequence.isMultiDimensional()
getInstance
protected MultiDimensionalDiscreteSequence getInstance(SequenceAnnotation[] seqAn,
Sequence... seqs)
throws WrongLengthException,
WrongAlphabetException
- Specified by:
getInstance
in class MultiDimensionalSequence<int[]>
- Throws:
WrongLengthException
WrongAlphabetException
compareTo
public int compareTo(int[] t1,
int[] t2)
- Description copied from class:
Sequence
- This method compares to container and is used in
Sequence.compareTo(Sequence)
.
- Specified by:
compareTo
in class Sequence<int[]>
- Parameters:
t1
- the first containert2
- the second container
- Returns:
- zero if arguments are equal
- See Also:
Sequence.getEmptyContainer()
,
Sequence.fillContainer(Object, int)
,
Comparable.compareTo(java.lang.Object)