Description Usage Arguments Value Author(s) References See Also Examples
Sample the rate multiplier parameters of a Process from a Gamma distribution for a collection of Site objects aggregated by a Sequence object.
The gamma distribution is discretized by calculating the means of the portions corresponding
to the categories having equal probabilities. If the ncat
argument is not numeric, the
rates are sampled from the continuous gamma distribution.
1 2 |
this |
A Sequence object. |
process |
A Process object. |
shape |
The shape parameter of the gamma distribution. |
index |
A vector of positions. |
ncat |
Numer of categories in the discretized gamma distribution (4 by default). |
... |
Not used. |
The Sequence object (invisible);
Botond Sipos, Gregory Jordan
Yang, Z. (1994) Maximum likelihood phylogenetic estimation from DNA sequences with variable rates over sites: approximate methods - Journal of Molecular Evolution 39:306-314 http://dx.doi.org/10.1007/BF00160154
For more information see Sequence
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # create a sequence
s<-NucleotideSequence(length=20)
# attach a process
p<-JC69()
attachProcess(s,p)
# get rate multipliers
getRateMultipliers(s,p) # the default value is 1.0
# sample rate multipliers in range 1:5 from a discrete
#gamma distribution with shape parameter 0.5
plusGamma(s,p,0.5,1:5)
# get rate multipliers
getRateMultipliers(s,p) # the default value is 1.0
# sample rates from a continuous gamma distribution
# with shape parameter 0.5
plusGamma(s,p,0.5,ncat="cont")
# get rate multipliers
getRateMultipliers(s,p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.