cubfits (version 0.1-2)

CUB Model Fits: Codon Usage Bias Fits for Observed ORFs and Expression

Description

This function provides codon usage bias fits with observed ORFs and expressions which possibly contains measurement errors.

Usage

cubfits(reu13.df.obs, phi.Obs, y, n, nIter = 1000, b.Init = NULL, init.b.Scale = .CF.CONF$init.b.Scale, b.DrawScale = .CF.CONF$b.DrawScale, b.RInit = NULL, p.Init = NULL, p.nclass = .CF.CONF$p.nclass, p.DrawScale = .CF.CONF$p.DrawScale, phi.Init = NULL, init.phi.Scale = .CF.CONF$init.phi.Scale, phi.DrawScale = .CF.CONF$phi.DrawScale, model = .CF.CT$model[1], model.Phi = .CF.CT$model.Phi[1], adaptive = .CF.CT$adaptive[1], verbose = .CF.DP$verbose, iterThin = .CF.DP$iterThin, report = .CF.DP$report)

Arguments

reu13.df.obs
a reu13.df object, ORFs information.
phi.Obs
a phi.Obs object, expression with measurement errors.
y
a y object, codon counts.
n
a n object, total codon counts.
nIter
number of iterations after burn-in iterations.
b.Init
initial values for parameters b.
init.b.Scale
for initial b if b.Init = NULL.
b.DrawScale
scaling factor for adaptive MCMC with random walks when drawing new b.
b.RInit
initial values (in a list) for R matrices of parameters b yielding from QR decomposition of vglm() for the variance-covariance matrix of b.
p.Init
initial values for hyper-parameters.
p.nclass
number of components for model.Phi = "logmixture".
p.DrawScale
scaling factor for adaptive MCMC with random walks when drawing new sigma.Phi.
phi.Init
initial values for Phi.
init.phi.Scale
for initial phi if phi.Init = NULL.
phi.DrawScale
scaling factor for adaptive MCMC with random walks when drawing new Phi.
model
model to be fitted, currently "roc" only.
model.Phi
prior model for Phi, currently "lognormal".
adaptive
adaptive method of MCMC for proposing new b and Phi.
verbose
print iteration messages.
iterThin
thinning iterations.
report
number of iterations to report more information.

Value

A list contains three big lists of MCMC traces including: b.Mat for mutation and selection coefficients of b, p.Mat for hyper-parameters, and phi.Mat for expected expression values Phi. All lists are of length nIter / iterThin + 1 and each element contains the output of each iteration.All lists also can be binded as trace matrices, such as via do.call("rbind", b.Mat) yielding a matrix of dimension number of iterations by number of parameters. Then, those traces can be analyzed further via other MCMC packages such as coda.

Details

This function correctly and carefully implements a combining version of Shah and Gilchrist (2011) and Wallace et al. (2013).

Total number of MCMC iterations is nIter + 1, but the outputs may be thinned to nIter / iterThin + 1 iterations.

Temporary result dumping may be controlled by .CF.DP.

References

https://github.com/snoweye/cubfits/

Shah P. and Gilchrist M.A. ``Explaining complex codon usage patterns with selection for translational efficiency, mutation bias, and genetic drift'' Proc Natl Acad Sci USA (2011) 108:10231--10236.

Wallace E.W.J., Airoldi E.M., and Drummond D.A. ``Estimating Selection on Synonymous Codon Usage from Noisy Experimental Data'' Mol Biol Evol (2013) 30(6):1438--1453.

See Also

DataIO, DataConverting, cubappr() and cubpred().

Examples

Run this code
## Not run: 
# suppressMessages(library(cubfits, quietly = TRUE))
# 
# demo(roc.train, 'cubfits', ask = F, echo = F)
# ## End(Not run)

Run the code above in your browser using DataLab