{
    "name": "m2a_test",
    "synonyms": ["M2a_Test"],
    "result_type": "MixtureModel[Codons[a]]",
    "call": "SModel.m2a_test[submodel,omega0,p0,posP,posW,posSelection]",
    "args": [
        {
            "arg_name": "submodel",
            "arg_type": "Function[Double,RevCTMC[a]]",
            "default_value": "function[w,gy94[omega=w]]",
	    "description": "The model as a function of dN/dS"
        },
        {
            "arg_name": "omega0",
            "arg_type": "Double",
            "default_value": "~uniform[0,1]",
	    "description": "The dN/dS value for conserved sites"
        },
        {
            "arg_name": "p0",
            "arg_type": "Double",
            "default_value": "~uniform[0,1]",
	    "description": "The fraction of conserved sites among non-positively selected sites."
        },
        {
            "arg_name": "posP",
            "arg_type": "Double",
            "default_value": "~beta[1,10]",
            "description": "The fraction of positively selected sites"
        },
        {
            "arg_name": "posW",
            "arg_type": "Double",
            "default_value": "~log_gamma[4,0.25]",
            "description": "The dN\/dS value for positively selected sites"
        },
        {
            "arg_name": "posSelection",
            "arg_type": "Int",
            "default_value": "~bernoulli[0.5]",
            "description": "The model selector: 1 if positive selection, 0 if not."
        }
    ],
    "description":"This model performs a Bayesian version of the test of M2a against M1a.  The posterior probability that posSelection=1 is posterior probability for positive selection.",
    "citation":{"type": "article",
		"title": "Accuracy and Power of Statistical Methods for Detecting Adaptive Evolution in Protein Coding Sequences and for Identifying Positively Selected Sites",
		"year": "2004",
		"author": [{"name": "Wong, Wendy S. W."},
			   {"name": "Yang, Ziheng"},
			   {"name": "Goldman, Nick"},
			   {"name": "Nielsen, Rasmus"}],
		"journal": {"name": "Genetics",
			    "volume": "168",
			    "number": "2",
			    "pages": "1041--1051"},
		"identifier": [{"type":"doi",
				"id":"10.1534/genetics.104.031153 "}]
	       },
    "examples": ["function[w,gy94[omega=w,pi=f1x4]]+m2a_test","function[w,mg94[omega=w]]+m2a_test","function[w,fMutSel0[omega=w]]+m2a_test"],
    "extract": "all"
}
