Selection on Codon Usage {cubfits} | R Documentation |
Calculate the average translational selection per transcript include mSCU and SCU (if gene expression is provided) for each gene.
calc_scu_values(b, y.list, phi.Obs = NULL)
b |
an object of format |
y.list |
an object of format |
phi.Obs |
an object of format |
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()
.
A list with two named elements SCU
and mSCU
are returned.
Wei-Chen Chen wccsnow@gmail.com.
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.
calc_scuo_values()
,
calc_cai_values()
.
## 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)