00_cubfits-package: Codon Bias Usage Fits

Description Details Author(s) References See Also Examples

Description

Estimating mutation and selection coefficients on synonymous codon bias usage based on models of ribosome overhead cost (ROC). Multinomial logistic regression and Markov Chain Monte Carlo are used to estimate and predict protein production rates with/without the presence of expressions and measurement errors.

Details

Package: cubfits
Type: Package
License: Mozilla Public License 2.0
LazyLoad: yes

The install command is simply as

> R CMD INSTALL cubfits_*.tar.gz

from a command mode or

R> install.packages("cubfits")

inside an R session.

Author(s)

Wei-Chen Chen wccsnow@gmail.com, Russell Zaretzki, William Howell, Drew Schmidt, and Michael Gilchrist.

References

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

See Also

init.function(), cubfits(), cubpred(), and cubappr().

Examples

1
2
3
4
5
6
7
8
## Not run: 
suppressMessages(library(cubfits, quietly = TRUE))

demo(roc.train, 'cubfits', ask = F, echo = F)
demo(roc.pred, 'cubfits', ask = F, echo = F)
demo(roc.appr, 'cubfits', ask = F, echo = F)

## End(Not run)

Example output

Loading required package: coda
Loading required package: foreach
Loading required package: parallel
pid:		 7516 
start:		 Mon Jun  8 18:33:42 2020 
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]      [,3]
curr.scale  1.0000000 1.0000000 1.0000000
curr.accept 0.3333333 0.3333333 0.6666667
iter: 5 	 Mon Jun  8 18:33:43 2020 
- b: rbind(curr.scale, curr.accept)
            [,1]      [,2] [,3]
curr.scale   1.2 1.2000000  1.2
curr.accept  0.0 0.3333333  0.0
- b: rbind(curr.scale, curr.accept)
                 [,1] [,2]      [,3]
curr.scale  0.9600000 1.44 0.9600000
curr.accept 0.3333333 0.00 0.3333333
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 1, upper = 2, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 6
    acceptance NOT in range #: lower = 10, upper = 90, total = 100
iter: 10 	 Mon Jun  8 18:33:43 2020 
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]      [,3]
curr.scale  1.1520000 1.1520000 1.1520000
curr.accept 0.3333333 0.3333333 0.6666667
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 3, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 1, all = 1
    acceptance NOT in range #: lower = 17, upper = 83, total = 100
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]      [,3]
curr.scale  1.3824000 1.3824000 1.3824000
curr.accept 0.3333333 0.6666667 0.3333333
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 3, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 2
    acceptance NOT in range #: lower = 18, upper = 82, total = 100
iter: 15 	 Mon Jun  8 18:33:43 2020 
- b: rbind(curr.scale, curr.accept)
               [,1]      [,2]    [,3]
curr.scale  1.65888 1.6588800 1.65888
curr.accept 0.00000 0.3333333 0.00000
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 2, upper = 1, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 2, all = 0
    acceptance NOT in range #: lower = 21, upper = 79, total = 100
iter: 20 	 Mon Jun  8 18:33:43 2020 
- var.name: b
    ill acceptance #: none = 2, all = 0
    last renew NOT in range #: lower = 2, upper = 1, total = 3
- var.name: p
    ill acceptance #: none = 0, all = 0
    last renew NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi
    ill acceptance #: none = 21, all = 8
    last renew NOT in range #: lower = 21, upper = 79, total = 100
   user  system elapsed 
  1.759   0.029   1.867 
[1] -0.3064731
[1] 0.6908696
   user  system elapsed 
  1.827   0.034   2.008 
Warning message:
In vglm.fitter(x = x, y = y, w = w, offset = offset, Xm2 = Xm2,  :
  some quantities such as z, residuals, SEs may be inaccurate due to convergence at a half-step
pid:		 7516 
start:		 Mon Jun  8 18:33:45 2020 
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]      [,3]
curr.scale  1.0000000 1.0000000 1.0000000
curr.accept 0.3333333 0.3333333 0.3333333
iter: 5 	 Mon Jun  8 18:33:45 2020 
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]      [,3]
curr.scale  1.2000000 1.2000000 1.2000000
curr.accept 0.3333333 0.3333333 0.3333333
- b: rbind(curr.scale, curr.accept)
            [,1] [,2]      [,3]
curr.scale  1.44 1.44 1.4400000
curr.accept 0.00 0.00 0.6666667
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 2, upper = 1, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 3, all = 1
    acceptance NOT in range #: lower = 17, upper = 83, total = 100
- var.name: phi.pred
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 2, all = 2
    acceptance NOT in range #: lower = 8, upper = 92, total = 100
iter: 10 	 Mon Jun  8 18:33:45 2020 
- b: rbind(curr.scale, curr.accept)
             [,1]      [,2]      [,3]
curr.scale  1.152 1.1520000 1.7280000
curr.accept 0.000 0.3333333 0.3333333
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 1, all = 0
    acceptance NOT in range #: lower = 1, upper = 2, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 1, upper = 0, total = 1
- var.name: phi
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 3, all = 0
    acceptance NOT in range #: lower = 16, upper = 84, total = 100
- var.name: phi.pred
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 1, all = 1
    acceptance NOT in range #: lower = 17, upper = 83, total = 100
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]   [,3]
curr.scale  0.9216000 1.3824000 2.0736
curr.accept 0.3333333 0.3333333 0.0000
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 1, upper = 2, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 1, all = 0
    acceptance NOT in range #: lower = 1, upper = 0, total = 1
- var.name: phi
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 1, all = 3
    acceptance NOT in range #: lower = 23, upper = 77, total = 100
- var.name: phi.pred
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 1, all = 0
    acceptance NOT in range #: lower = 17, upper = 83, total = 100
iter: 15 	 Mon Jun  8 18:33:45 2020 
- b: rbind(curr.scale, curr.accept)
               [,1]      [,2]    [,3]
curr.scale  1.10592 1.6588800 1.65888
curr.accept 0.00000 0.3333333 1.00000
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 1, upper = 2, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 3, all = 1
    acceptance NOT in range #: lower = 31, upper = 69, total = 100
- var.name: phi.pred
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 4, all = 2
    acceptance NOT in range #: lower = 25, upper = 75, total = 100
iter: 20 	 Mon Jun  8 18:33:45 2020 
- var.name: b
    ill acceptance #: none = 1, all = 1
    last renew NOT in range #: lower = 1, upper = 2, total = 3
- var.name: p
    ill acceptance #: none = 0, all = 0
    last renew NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi
    ill acceptance #: none = 31, all = 7
    last renew NOT in range #: lower = 31, upper = 69, total = 100
- var.name: phi.pred
    ill acceptance #: none = 25, all = 12
    last renew NOT in range #: lower = 25, upper = 75, total = 100
   user  system elapsed 
  0.388   0.008   0.415 
[1] -0.2103248
[1] 0.1857968
   user  system elapsed 
  2.715   0.024   2.822 
pid:		 7516 
start:		 Mon Jun  8 18:33:46 2020 
- b: rbind(curr.scale, curr.accept)
            [,1]      [,2] [,3]
curr.scale     1 1.0000000    1
curr.accept    0 0.6666667    0
iter: 5 	 Mon Jun  8 18:33:46 2020 
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2] [,3]
curr.scale  0.8000000 1.2000000  0.8
curr.accept 0.6666667 0.6666667  1.0
- b: rbind(curr.scale, curr.accept)
            [,1]      [,2]      [,3]
curr.scale  0.96 1.4400000 0.9600000
curr.accept 0.00 0.6666667 0.3333333
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 1, upper = 2, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 1, all = 0
    acceptance NOT in range #: lower = 1, upper = 0, total = 1
- var.name: phi.pred
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 1, all = 17
    acceptance NOT in range #: lower = 4, upper = 96, total = 100
iter: 10 	 Mon Jun  8 18:33:46 2020 
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]      [,3]
curr.scale  0.7680000 1.7280000 1.1520000
curr.accept 0.3333333 0.6666667 0.6666667
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 3, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi.pred
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 12
    acceptance NOT in range #: lower = 4, upper = 96, total = 100
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]   [,3]
curr.scale  0.9216000 2.0736000 1.3824
curr.accept 0.6666667 0.6666667 1.0000
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 3, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi.pred
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 3, all = 10
    acceptance NOT in range #: lower = 12, upper = 88, total = 100
iter: 15 	 Mon Jun  8 18:33:46 2020 
- b: rbind(curr.scale, curr.accept)
                 [,1]      [,2]    [,3]
curr.scale  1.1059200 2.4883200 1.65888
curr.accept 0.3333333 0.6666667 1.00000
- var.name: b
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 1
    acceptance NOT in range #: lower = 0, upper = 3, total = 3
- var.name: p
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 0, all = 0
    acceptance NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi.pred
    scale bound reached #: lower = 0, upper = 0
    ill acceptance #: none = 3, all = 3
    acceptance NOT in range #: lower = 16, upper = 84, total = 100
iter: 20 	 Mon Jun  8 18:33:46 2020 
- var.name: b
    ill acceptance #: none = 0, all = 1
    last renew NOT in range #: lower = 0, upper = 3, total = 3
- var.name: p
    ill acceptance #: none = 0, all = 0
    last renew NOT in range #: lower = 0, upper = 1, total = 1
- var.name: phi.pred
    ill acceptance #: none = 16, all = 16
    last renew NOT in range #: lower = 16, upper = 84, total = 100
   user  system elapsed 
  0.102   0.000   0.104 
mean of x  : -0.4667876
R^2 (log10): 0.2676899
   user  system elapsed 
  0.187   0.000   0.191 
Warning messages:
1: In checkwz(wz, M = M, trace = trace, wzepsilon = control$wzepsilon) :
  1 diagonal elements of the working weights variable 'wz' have been replaced by 1.819e-12
2: In checkwz(wz, M = M, trace = trace, wzepsilon = control$wzepsilon) :
  1 diagonal elements of the working weights variable 'wz' have been replaced by 1.819e-12

cubfits documentation built on Nov. 8, 2021, 1:07 a.m.