Description Usage Arguments Value Author(s) See Also Examples
Attach an Alphabet object to a Site object. If the ancestral site is not NA, then the symbol set of the ancestral Alphabet object and the new Alphabet object must be the same. The current state must be in the symbol set of the new Alphabet object, unless it is NA.
1 2 | ## S3 method for class 'Site'
setAlphabet(this, new.alphabet, ...)
|
this |
A Site object. |
new.alphabet |
A valid Alphabet object. |
... |
Not used. |
Returns the new Alphabet object (invisible).
Botond Sipos, Gregory Jordan
For more information see Site
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # create a site object
s<-Site()
# create an Alphabet object
a<-Alphabet(c("A","T","G"))
# attach alphabet to site object
setAlphabet(s,a)
# set site state
s$state<-"A"
# clone the alphabet object
b<-clone(a)
# modify symbol set in b
b$symbols<-c(b$symbols,"C")
# attach b to s via virtual field
s$alphabet<-b
s$alphabet
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.