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: -
The model, as a function of dN/dS
-
Default:
|w:GY94(omega=w)| -
n: -
The number of Gauss-Jacobi quadrature categories for the Beta component
-
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: -
The fraction of positively-selected or neutral sites
-
Default:
~Beta(1,10) -
posW: -
The dN/dS value for positively-selected or neutral sites
-
Default:
~LogGamma(4,0.25) -
posSelection: -
The model indicator -- H0 or H1
-
Default:
~Bernoulli(0.5)
Description
This is a Bayesian version of the M8a test for positive selection. The original M8a test is a likelihood-ratio test. The Bayesian version of the test chooses a prior with 50% mass on the null hypothesis H0 and 50% on the alternative hypothesis H1:
H0: no positive selection
H1: some positive selection.
When posSelection = 0, the value of posW is ignored and dN/dS=1. When posSelection = 1, the value of posW is used and dN/dS=posW. The Bayes Factor is given by Pr(posSelection=1)/Pr(posSelection=0).
The posterior mean of PrPosSelection can provide a more accurate estimate of the posterior probability of H1 than the posterior 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.)
The M8a test (Swanson et al, 2003) has null and alternative hypotheses given by:
H0: M8(posW=1) = M8a
H1: M8
This is an improvement over the test originally proposed by Yang (2000):
H0: M8(posP=1) = M7
H1: M8
In the originally proposed likelihood-ratio test, a mixture of conserved and neutral sites would not fit the null hypothesis (M7), leading to the erroneous inference of positive selection. In the M8a test, the null hypothesis (M8a) has been improved to handle both neutral and conserved sites, so that positive selection is not incorrectly inferred.
The Beta component uses Gauss-Jacobi quadrature with generally unequal category weights. The parameter n counts Beta categories, excluding any additional M8-family category.
The Beta-component mean mu and normalized variance v have independent Uniform(0,1) default priors.
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