Description Usage Arguments Value Author(s) See Also Examples
Assotiate Alphabet objects to a set of Site objects aggregated by a Sequence object.
1 2 | ## S3 method for class 'Sequence'
setAlphabets(this, value, index, ...)
|
this |
A Sequence object. |
value |
A list of Alphabet objects, recycled if shorter than the index vector. |
index |
An integer vector specifying a set of positions. It is set to 1:seq$length if omitted. |
... |
Not used. |
The Sequence object (invisible).
Botond Sipos, Gregory Jordan
For more information see Sequence
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # create a Sequence object
s<-Sequence(length=10)
# set the alphabets for range 1:5
setAlphabets(s,list(NucleotideAlphabet(),BinaryAlphabet()),1:5)
# set the alphabets for range 6:10
setAlphabets(s,list(AminoAcidAlphabet()),6:10)
# get the list of attached Alphabet objects
getAlphabets(s)
# get Alphabets from a range
getAlphabets(s,c(2:3,5))
# set alphabets via virtual field
s$alphabets<-list(BinaryAlphabet(),NucleotideAlphabet())
# get alphabets via virtual field
s$alphabets
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.