Build Status

AnaCoDa

Examples: Running models

Example 1: Using codon data in the form of CDS in fasta format with one mixture (ROC)

The following example illustrates how you would estimates parameters under the ROC model of a given set of protein coding genes, assuming the same mutation and selection regime for all genes.

{r, echo = FALSE} genome <- initializeGenomeObject(file = "genome.fasta") parameter <- initializeParameterObject(genome = genome, sphi = 1, num.mixtures = 1, gene.assignment = rep(1, length(genome))) mcmc <- initializeMCMCObject(samples = 5000, thinning = 10, adaptive.width=50) model <- initializeModelObject(parameter = parameter, model = "ROC") runMCMC(mcmc = mcmc, genome = genome, model = model)

Example 2: Using codon data in the form of CDS in fasta format with one mixture (FONSE)

The following example illustrates how you would estimates parameters under the FONSE model of a given set of protein coding genes, assuming the same mutation and selection regime for all genes.

{r, echo = FALSE} genome <- initializeGenomeObject(file = "genome.fasta") parameter <- initializeParameterObject(genome = genome, sphi = 1, num.mixtures = 1, gene.assignment = rep(1, length(genome))) mcmc <- initializeMCMCObject(samples = 5000, thinning = 10, adaptive.width=50) model <- initializeModelObject(parameter = parameter, model = "FONSE") runMCMC(mcmc = mcmc, genome = genome, model = model)

Example 3: Using codon data in the form of Ribosome footprints with one mixture (PA)

The following example illustrates how you would estimates parameters under the PA model of a given set of protein coding genes, assuming the same mutation and selection regime for all genes.

{r, echo = FALSE} genome <- initializeGenomeObject(file = "rfpcounts.tsv", fasta = FALSE) parameter <- initializeParameterObject(genome = genome, sphi = 1, num.mixtures = 1, gene.assignment = rep(1, length(genome))) mcmc <- initializeMCMCObject(samples = 5000, thinning = 10, adaptive.width=50) model <- initializeModelObject(parameter = parameter, model = "PA") runMCMC(mcmc = mcmc, genome = genome, model = model)

Examples: Advanced examples

{r, echo = FALSE} genome <- initializeGenomeObject(file = "genome.fasta") parameter <- initializeParameterObject(genome = genome, sphi = c(1,2,3), num.mixtures = 3, gene.assignment = sample(1:3, length(genome), replace=TRUE)) mcmc <- initializeMCMCObject(samples = 5000, thinning = 10, adaptive.width=50) model <- initializeModelObject(parameter = parameter, model = "ROC") runMCMC(mcmc = mcmc, genome = genome, model = model)

Example 5

{r, echo = FALSE} genome <- initializeGenomeObject(file = "genome.fasta") parameter <- initializeParameterObject(genome = genome, sphi = c(1,2,3), num.mixtures = 3, gene.assignment = sample(1:3, length(genome), replace=TRUE)) mcmc <- initializeMCMCObject(samples = 5000, thinning = 10, adaptive.width=50, est.mix = FALSE) model <- initializeModelObject(parameter = parameter, model = "ROC") runMCMC(mcmc = mcmc, genome = genome, model = model)