Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function provides codon usage bias fits of training set which has observed ORFs and expressions possibly containing measurement errors, and provides predictions of testing set which has other observed ORFs but without expression.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | cubpred(reu13.df.obs, phi.Obs, y, n,
reu13.df.pred, y.pred, n.pred,
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,
phi.pred.Init = NULL,
phi.pred.DrawScale = .CF.CONF$phi.pred.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)
|
reu13.df.obs |
a |
phi.Obs |
a |
y |
a |
n |
a |
reu13.df.pred |
a |
y.pred |
a |
n.pred |
a |
nIter |
number of iterations after burn-in iterations. |
b.Init |
initial values for parameters |
init.b.Scale |
for initial |
b.DrawScale |
scaling factor for adaptive MCMC with random walks
when drawing new |
b.RInit |
initial values (in a list) for |
p.Init |
initial values for hyper-parameters. |
p.nclass |
number of components for |
p.DrawScale |
scaling factor for adaptive MCMC with random walks
when drawing new |
phi.Init |
initial values for Phi. |
init.phi.Scale |
for initial phi if |
phi.DrawScale |
scaling factor for adaptive MCMC with random walks when drawing new Phi. |
phi.pred.Init |
initial values for Phi of predicted set. |
phi.pred.DrawScale |
as |
model |
model to be fitted, currently "roc" only. |
model.Phi |
prior model for Phi, currently "lognormal". |
adaptive |
adaptive method of MCMC for proposing new |
verbose |
print iteration messages. |
iterThin |
thinning iterations. |
report |
number of iterations to report more information. |
This function correctly and carefully implements an extension 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
.
A list contains four big lists of MCMC traces including:
b.Mat
for mutation and selection coefficients of b
,
p.Mat
for hyper-parameters,
phi.Mat
for expected expression values Phi, and
phi.pred.Mat
for predictive expression values Phi.
All lists have nIter / iterThin + 1
elements,
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.
Note that phi.Init
and phi.pred.Init
need to be normalized
to mean 1.
p.DrawScale
may cause scaling prior if adaptive MCMC is used, and
it can result in non-exits of equilibrium distribution.
Wei-Chen Chen wccsnow@gmail.com.
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.
DataIO, DataConverting,
cubfits()
and cubappr()
.
1 2 3 4 5 6 | ## Not run:
suppressMessages(library(cubfits, quietly = TRUE))
demo(roc.pred, 'cubfits', ask = F, echo = F)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.