M8a_test — Bayesian version of the M8a test for positive
selection
Usage
M8a_test(submodel: Double
-> CTMC<Codons<a>>, n: Int, mu: Double, v: Double, posP: Double, posW: Double, posSelection: Int) →
DiscreteDist<CTMC<Codons<a>>>
Arguments
A default beginning with ~ specifies a prior
distribution.
-
submodel: -
Codon model as a function of omega
-
Default:
|w:GTR +> MNM +> MutSelAA +> dNdS(omega=w)| -
n: -
Number of categories approximating the Beta distribution
-
Default:
10 -
mu: -
The mean of the Beta distribution
-
Default:
~Uniform(0,1) -
v: -
The normalized Beta variance Var(omega)/(mu*(1-mu)); 0 < v < 1
-
Default:
~Uniform(0,1) -
posP: -
Fraction of sites in the additional neutral or positively selected category
-
Default:
~Beta(1,10) -
posW: -
omega of the additional category when posSelection=1
-
Default:
~LogGamma(4,0.25) -
posSelection: -
Model indicator: 0 for M8a, 1 for M8
-
Default:
~Bernoulli(0.5)
Description
A Bayesian version of the M8a likelihood-ratio test for positive selection, comparing:
H0: M8a (posSelection=0), no positive selection
H1: M8 (posSelection=1), some positive selection
The additional category has omega=1 under H0, where posW is ignored, and omega=posW under H1. The Beta component is present under both hypotheses. The default prior restricts posW to values greater than 1.
The default background uses GTR, MNM, and MutSelAA. Here omega scales nonsynonymous rates after accounting for amino-acid fitnesses. Thus omega=1 retains these fitness effects; neutrality and positive selection are assessed relative to this background.
The default prior gives each hypothesis probability 0.5. With these equal prior odds, the Bayes factor for H1 against H0 equals the posterior odds Pr(H1 | data)/Pr(H0 | data).
PrPosSelection records the conditional probability of H1 given the data and other parameters. Its posterior mean estimates Pr(H1 | data), often more accurately than the mean of posSelection. The statreport tool uses LogOddsPosSelection to report the corresponding posterior log odds accurately, even when the probability is extremely close to 0 or 1. Do not average LogOddsPosSelection directly.
Including an explicit neutral category in the null model reduces the risk of mistaking a mixture of conserved and neutral sites for positive selection.
The Beta component uses Gauss-Jacobi quadrature with generally unequal category weights. There are n+1 categories in total.
Citation
Swanson, Willie J.; Nielsen, Rasmus; Yang, Qiaofeng (2003). Pervasive Adaptive Evolution in Mammalian Fertilization Proteins. Molecular Biology and Evolution 20(1): 18--20. DOI: 10.1093/oxfordjournals.molbev.a004233