S - type of sequencepublic abstract class Sequence<S extends Sequence<S>> extends AbstractSeq<S> implements Comparable<S>, HasSequence<S>
Sequence is a simple container of ordered bytes; the correspondence between byte codes
and particular elements is defined in Alphabet that corresponds to this
type of sequence (via getAlphabet()).Alphabet,
SequenceBuilder,
NucleotideSequence,
AminoAcidSequence| Constructor and Description |
|---|
Sequence() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asArray()
Returns an array of bytes that encodes this sequence.
|
abstract byte |
codeAt(int position)
Returns letter code at specified position.
|
int |
compareTo(S o) |
boolean |
containWildcards() |
boolean |
equals(Object obj) |
abstract Alphabet<S> |
getAlphabet()
Returns the alphabet corresponding to this type of sequence.
|
SequenceBuilder<S> |
getBuilder()
Returns a builder for corresponding seq type.
|
S |
getSequence() |
int |
hashCode() |
int |
indexOf(S subSequence)
Tests whether this sequence contains
subSequence and returns position of the first matched letter in
this sequence or -1 if it does not contain subSequence. |
char |
symbolAt(int position)
Returns a character representation of element at specified position.
|
Motif<S> |
toMotif()
Converts sequnce to motif data structure efficient for exact and fuzzy wildcard-aware matching and searching of
sequences.
|
String |
toString() |
concatenate, getRangepublic abstract byte codeAt(int position)
position - position in sequencepublic abstract Alphabet<S> getAlphabet()
public byte[] asArray()
public char symbolAt(int position)
position - position in this sequencepublic Motif<S> toMotif()
public boolean containWildcards()
public S getSequence()
getSequence in interface HasSequence<S extends Sequence<S>>public SequenceBuilder<S> getBuilder()
SeqgetBuilder in interface Seq<S extends Sequence<S>>public int compareTo(S o)
compareTo in interface Comparable<S extends Sequence<S>>public int indexOf(S subSequence)
subSequence and returns position of the first matched letter in
this sequence or -1 if it does not contain subSequence.subSequence - subsequencesubSequenceCopyright © 2018. All rights reserved.