{
    "name": "m3_test",
    "synonyms": ["M3_Test"],
    "result_type": "MixtureModel[Codons[a]]",
    "call": "SModel.m3_test[submodel,ps,omegas,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": "ps",
            "arg_type": "List[Double]",
            "default_value": "~dirichlet[@n,2]",
	    "description": "The frequency of each omega"
        },
        {
            "arg_name": "omegas",
            "arg_type": "List[Double]",
            "default_value": "~iid[@n,uniform[0,1]]",
	    "description": "The omega (i.e. dN/dS) values"
        },
        {
            "arg_name": "posP",
            "arg_type": "Double",
            "default_value": "~beta[1,10]",
            "description": "The fraction of positively selected sites"
        },
        {
            "arg_name": "posW",
            "arg_type": "Double",
            "description": "The dN\/dS value for positively selected sites",
            "default_value": "~log_gamma[4,0.25]"
        },
        {
            "arg_name": "posSelection",
            "arg_type": "Int",
            "default_value": "~bernoulli[0.5]",
            "description": "The model selector: 1 if positive selection, 0 if not."
        },
        {
            "arg_name": "n",
            "arg_type": "Int",
            "default_value": "4",
	    "description": "The number of omega categories, if not specified"
        }
    ],
    "description":"This model performs a Bayesian test of positive selection using a modified M3 model.  The M3 model is extended with an extra category of sites that is either neutral (posSelection=0) or positively-selected (posSelection=1).  The posterior probability that posSelection=1 is posterior probability for positive selection.",
    "extract": "all",
    "see": ["m3"]
}
