|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.data.Sequence<int[]>
de.jstacs.data.sequences.DiscreteSequence
de.jstacs.data.sequences.MultiDimensionalDiscreteSequence
public class MultiDimensionalDiscreteSequence
This class is for multidimensional sequences that can be used, for instance, for phylogenetic footprinting.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.jstacs.data.Sequence |
---|
Sequence.CompositeSequence<T>, Sequence.RecursiveSequence<T>, Sequence.SubSequence<T> |
Field Summary |
---|
Fields inherited from class de.jstacs.data.Sequence |
---|
alphabetCon, annotation, rc |
Constructor Summary | |
---|---|
MultiDimensionalDiscreteSequence(SequenceAnnotation[] seqAnnotations,
SimpleDiscreteSequence... sequence)
This constructor creates an MultiDimensionalDiscreteSequence from a set of individual SimpleDiscreteSequence s. |
Method Summary | |
---|---|
protected void |
addToRepresentation(Object representation,
int pos,
String delim)
This method adds the information of one position to the representation using the specified delimiter |
MultiDimensionalDiscreteSequence |
complement(int start,
int end)
This method returns a new instance of Sequence containing a part
of the complementary current Sequence . |
double |
continuousVal(int pos)
Returns the continuous value at position pos of the
Sequence . |
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 Sequence<int[]> |
flatCloneWithoutAnnotation()
Works in analogy to Object.clone() , but does not clone the
annotation. |
SequenceAnnotation[][] |
getAnnotations()
This method returns the SequenceAnnotation [] for each dimension of this multidimensional sequence. |
int[] |
getEmptyContainer()
The method returns a container that can be used for accessing the symbols for each position. |
protected Object |
getEmptyRepresentation()
Returns an empty representation which is used to create the String representation of this instance in the method Sequence.toString(String, int, int) . |
int |
getLength()
Returns the length of the Sequence . |
protected String |
getStringRepresentation(Object representation)
This method creates a String representation from the given representation. |
protected int |
hashCodeForPos(int pos)
This method is used in Sequence.hashCode() and the hash code for one specific position. |
boolean |
isMultiDimensional()
The method returns true if the sequence is multidimensional, otherwise . |
MultiDimensionalDiscreteSequence |
reverseComplement(int start,
int end)
This method returns a new instance of Sequence containing a
reverse part of the complementary current Sequence . |
Methods inherited from class de.jstacs.data.sequences.DiscreteSequence |
---|
compareTo |
Methods inherited from class de.jstacs.data.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 |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiDimensionalDiscreteSequence(SequenceAnnotation[] seqAnnotations, SimpleDiscreteSequence... sequence) throws WrongLengthException
MultiDimensionalDiscreteSequence
from a set of individual SimpleDiscreteSequence
s.
seqAnnotations
- the annotations for the aligned sequencessequence
- the individual sequences that have been aligned
WrongLengthException
- if the sequence have different lengthMethod Detail |
---|
public double continuousVal(int pos)
Sequence
pos
of the
Sequence
.
continuousVal
in class Sequence<int[]>
pos
- the position of the Sequence
pos
of the
Sequence
public int discreteVal(int pos)
Sequence
pos
of the
Sequence
.
discreteVal
in class Sequence<int[]>
pos
- the position of the Sequence
pos
of the
Sequence
public void fillContainer(int[] container, int pos)
Sequence
fillContainer
in class Sequence<int[]>
container
- the container which is used for filling the content.pos
- the positionSequence.getEmptyContainer()
,
Sequence.isMultiDimensional()
public int[] getEmptyContainer()
Sequence
getEmptyContainer
in class Sequence<int[]>
Sequence.fillContainer(Object, int)
,
Sequence.isMultiDimensional()
public int getLength()
Sequence
Sequence
.
getLength
in class Sequence<int[]>
Sequence
public boolean isMultiDimensional()
Sequence
true
if the sequence is multidimensional, otherwise .
isMultiDimensional
in class Sequence<int[]>
true
if the sequence is multidimensional, otherwise
protected Sequence<int[]> flatCloneWithoutAnnotation()
Sequence
Object.clone()
, but does not clone the
annotation. This method is used in
Sequence.annotate(boolean, SequenceAnnotation...)
.
flatCloneWithoutAnnotation
in class Sequence<int[]>
Sequence
without annotationpublic MultiDimensionalDiscreteSequence complement(int start, int end) throws OperationNotSupportedException
Sequence
Sequence
containing a part
of the complementary current Sequence
.
AlphabetContainer
on
DNAAlphabet
returns "ATTAT".
complement
in class Sequence<int[]>
start
- the start position (inclusive) in the original
Sequence
end
- the end position (exclusive) in the original Sequence
Sequence
of the part
OperationNotSupportedException
- if the current Sequence
is not based on a
ComplementableDiscreteAlphabet
ComplementableDiscreteAlphabet
public MultiDimensionalDiscreteSequence reverseComplement(int start, int end) throws OperationNotSupportedException
Sequence
Sequence
containing a
reverse part of the complementary current Sequence
. For more
details see the methods Sequence.reverse()
and Sequence.complement()
.
reverseComplement
in class Sequence<int[]>
start
- the start position (inclusive) in the original
Sequence
end
- the end position (exclusive) in the original Sequence
Sequence
of the part
OperationNotSupportedException
- if the current Sequence
is not discrete and simple
((not based on a ComplementableDiscreteAlphabet
)Sequence.reverse()
,
Sequence.complement()
,
ComplementableDiscreteAlphabet
protected Object getEmptyRepresentation()
Sequence
String
representation of this instance in the method Sequence.toString(String, int, int)
.
getEmptyRepresentation
in class Sequence<int[]>
String
representationSequence.toString(String, int, int)
protected void addToRepresentation(Object representation, int pos, String delim)
Sequence
addToRepresentation
in class Sequence<int[]>
representation
- the representationpos
- the positiondelim
- the delimiter separating the information for different positionsSequence.getEmptyRepresentation()
,
Sequence.toString(String, int, int)
protected String getStringRepresentation(Object representation)
Sequence
getStringRepresentation
in class Sequence<int[]>
representation
- the representation instance (which should be created by Sequence.getEmptyContainer()
and filled by Sequence.addToRepresentation(Object, int, String)
)
Sequence.getEmptyRepresentation()
,
Sequence.addToRepresentation(Object, int, String)
,
Sequence.toString(String, int, int)
protected int hashCodeForPos(int pos)
Sequence
Sequence.hashCode()
and the hash code for one specific position.
hashCodeForPos
in class Sequence<int[]>
pos
- the position
public SequenceAnnotation[][] getAnnotations()
SequenceAnnotation
[] for each dimension of this multidimensional sequence.
SequenceAnnotation
array for each dimension of this multidimensional sequenceSequence.getAnnotation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |