|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.data.Sequence
de.jstacs.data.sequences.ArbitrarySequence
public class ArbitrarySequence
This class is for any continuous or hybrid sequence.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.jstacs.data.Sequence |
---|
Sequence.CompositeSequence, Sequence.SubSequence |
Field Summary |
---|
Fields inherited from class de.jstacs.data.Sequence |
---|
alphabetCon, annotation, rc |
Constructor Summary | |
---|---|
ArbitrarySequence(AlphabetContainer alphabetContainer,
double[] content)
Creates a new ArbitrarySequence from an array of
double -encoded alphabet symbols. |
|
ArbitrarySequence(AlphabetContainer alphabetContainer,
SequenceAnnotation[] annotation,
String sequence,
String delim)
Creates a new ArbitrarySequence from a String
representation using the delimiter delim . |
|
ArbitrarySequence(AlphabetContainer alphabetContainer,
SequenceAnnotation[] annotation,
SymbolExtractor extractor)
Creates a new ArbitrarySequence from a SymbolExtractor . |
|
ArbitrarySequence(AlphabetContainer alphabetContainer,
String sequence)
Creates a new ArbitrarySequence from a String
representation using the default delimiter. |
Method Summary | |
---|---|
double |
continuousVal(int pos)
Returns the continuous value at position pos of the
Sequence.CompositeSequence . |
int |
discreteVal(int pos)
Returns the discrete value at position pos of the
Sequence.CompositeSequence . |
protected Sequence |
flatCloneWithoutAnnotation()
Works in analogy to Object.clone() , but does not clone the
annotation. |
int |
getLength()
Returns the length of the Sequence.CompositeSequence . |
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 |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArbitrarySequence(AlphabetContainer alphabetContainer, double[] content) throws WrongAlphabetException, WrongSequenceTypeException
ArbitrarySequence
from an array of
double
-encoded alphabet symbols. This constructor is
designed for the method
AbstractModel.emitSample(int, int...)
.
alphabetContainer
- the AlphabetContainer
for the sequencecontent
- an array containing the encoded symbols
WrongAlphabetException
- if the sequence is not defined over
alphabetContainer
WrongSequenceTypeException
- if alphabetContainer
contains alphabets that can
not be encoded with double
sAbstractModel.emitSample(int, int...)
,
Sequence.Sequence(AlphabetContainer, SequenceAnnotation[])
public ArbitrarySequence(AlphabetContainer alphabetContainer, String sequence) throws WrongAlphabetException, WrongSequenceTypeException
ArbitrarySequence
from a String
representation using the default delimiter.
alphabetContainer
- the AlphabetContainer
for the sequencesequence
- a String
representation of the sequence
WrongAlphabetException
- if the sequence is not defined over
alphabetContainer
WrongSequenceTypeException
- if alphabetContainer
contains alphabets that can
not be encoded with double
sArbitrarySequence(AlphabetContainer,
SequenceAnnotation[], SymbolExtractor)
public ArbitrarySequence(AlphabetContainer alphabetContainer, SequenceAnnotation[] annotation, String sequence, String delim) throws WrongAlphabetException, WrongSequenceTypeException, IllegalArgumentException
ArbitrarySequence
from a String
representation using the delimiter delim
. Annotations for
this sequence are considered by annotation
.
alphabetContainer
- the AlphabetContainer
for the sequenceannotation
- the annotation for this sequencesequence
- a String
representation of the sequencedelim
- the delimiter, a String
that separates the symbols
WrongAlphabetException
- if the sequence is not defined over
alphabetContainer
WrongSequenceTypeException
- if alphabetContainer
contains alphabets that can
not be encoded with double
s
IllegalArgumentException
- if the delimiter is empty and the alphabet container is not
discreteArbitrarySequence(AlphabetContainer,
SequenceAnnotation[], SymbolExtractor)
public ArbitrarySequence(AlphabetContainer alphabetContainer, SequenceAnnotation[] annotation, SymbolExtractor extractor) throws WrongAlphabetException, WrongSequenceTypeException
ArbitrarySequence
from a SymbolExtractor
.
Annotations for this sequence are considered by annotation
.
alphabetContainer
- the alphabet container for the sequenceannotation
- the annotation for this sequenceextractor
- the SymbolExtractor
WrongAlphabetException
- if the sequence is not defined over
alphabetContainer
WrongSequenceTypeException
- if alphabetContainer
contains alphabets that can
not be encoded with double
sSequence.Sequence(AlphabetContainer, SequenceAnnotation[])
Method Detail |
---|
public double continuousVal(int pos)
Sequence
pos
of the
Sequence.CompositeSequence
.
continuousVal
in class Sequence
pos
- the position of the Sequence.CompositeSequence
pos
of the
Sequence.CompositeSequence
public int discreteVal(int pos)
Sequence
pos
of the
Sequence.CompositeSequence
.
discreteVal
in class Sequence
pos
- the position of the Sequence.CompositeSequence
pos
of the
Sequence.CompositeSequence
public int getLength()
Sequence
Sequence.CompositeSequence
.
getLength
in class Sequence
Sequence.CompositeSequence
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
Sequence.CompositeSequence
without annotation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |