| Selection on Codon Usage {cubfits} | R Documentation |
Function for Selection on Codon Usage (SCU)
Description
Calculate the average translational selection per transcript include mSCU and SCU (if gene expression is provided) for each gene.
Usage
calc_scu_values(b, y.list, phi.Obs = NULL)
Arguments
b |
an object of format |
y.list |
an object of format |
phi.Obs |
an object of format |
Details
This function computes SCU and mSCU for each gene. Typically, this method
is completely based on estimated parameters of mutation and selection
such as outputs of MCMC or fitMultinom().
Value
A list with two named elements SCU and mSCU are returned.
Author(s)
Wei-Chen Chen wccsnow@gmail.com.
References
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
calc_scuo_values(),
calc_cai_values().
Examples
## Not run:
library(cubfits, quietly = TRUE)
b <- b.Init$roc
phi.Obs <- ex.train$phi.Obs
y <- ex.train$y
y.list <- convert.y.to.list(y)
mSCU <- calc_scu_values(b, y.list, phi.Obs)$mSCU
plot(mSCU, log10(phi.Obs), main = "Expression vs mSCU",
xlab = "mSCU", ylab = "Expression (log10)")
### Compare with CAI with weights seqinr::cubtab$sc.
library(seqinr, quietly = TRUE)
w <- caitab$sc
names(w) <- codon.low2up(rownames(caitab))
CAI <- calc_cai_values(y, y.list, w = w)$CAI
plot(mSCU, CAI, main = "CAI vs mSCU",
xlab = "mSCU", ylab = "CAI")
## End(Not run)
[Package cubfits version 0.1-4 Index]