Closed sahirbhatnagar closed 1 year ago
I get an error when I try to use the genetic.model = "general" in the rbm.GRR function (see reprex below).
genetic.model = "general"
rbm.GRR
library(Ravages) #> Loading required package: Rcpp #> Loading required package: RcppParallel #> #> Attaching package: 'RcppParallel' #> The following object is masked from 'package:Rcpp': #> #> LdFlags #> Loading required package: gaston #> Gaston set number of threads to 4. Use setThreadOptions() to modify this. #> #> Attaching package: 'gaston' #> The following object is masked from 'package:stats': #> #> sigma #> The following objects are masked from 'package:base': #> #> cbind, rbind #> Loading required package: mlogit #> Loading required package: dfidx #> #> Attaching package: 'dfidx' #> The following object is masked from 'package:stats': #> #> filter GRR.del <- GRR.matrix(GRR = "SKAT", genes.maf = Kryukov, n.case.groups = 2, GRR.multiplicative.factor=2, select.gene = "R1") # example from vignette multiplicative model x <- rbm.GRR(genes.maf = Kryukov, size = c(1000, 500, 500), replicates = 5, prev = c(0.001, 0.001), GRR.matrix.del = GRR.del, p.causal = 0.5, p.protect = 0, same.variant = FALSE, genetic.model = "multiplicative", select.gene = "R1") # general model requires two GRR in list form, but returns an error x <- rbm.GRR(genes.maf = Kryukov, size = c(1000, 500, 500), replicates = 5, prev = c(0.001, 0.001), GRR.matrix.del = list(GRR.del, 2*GRR.del), p.causal = 0.5, p.protect = 0, same.variant = FALSE, genetic.model = "general", select.gene = "R1") #> Error in rbm.GRR(genes.maf = Kryukov, size = c(1000, 500, 500), replicates = 5, : object 'GRR.het' not found
Created on 2023-04-21 with reprex v2.0.2
There was indeed a mistake in the function, thanks. I have pushed the changes and rbm.GRR should now work with genetic.model = 'general'. Let me know if you face any other difficulty. Ozvan
I get an error when I try to use the
genetic.model = "general"
in therbm.GRR
function (see reprex below).Created on 2023-04-21 with reprex v2.0.2
Session info
``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.2.0 (2022-04-22) #> os macOS 13.2.1 #> system aarch64, darwin20 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/Toronto #> date 2023-04-21 #> pandoc 2.19.2 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> bedr 1.0.7 2019-04-01 [1] CRAN (R 4.2.0) #> brio 1.1.3 2021-11-30 [1] CRAN (R 4.2.0) #> cli 3.6.1 2023-03-23 [1] CRAN (R 4.2.0) #> curl 5.0.0 2023-01-12 [1] CRAN (R 4.2.0) #> data.table 1.14.8 2023-02-17 [1] CRAN (R 4.2.0) #> dfidx * 0.0-5 2022-06-28 [1] CRAN (R 4.2.0) #> digest 0.6.31 2022-12-11 [1] CRAN (R 4.2.0) #> dplyr 1.1.1 2023-03-22 [1] CRAN (R 4.2.0) #> evaluate 0.20 2023-01-17 [1] CRAN (R 4.2.0) #> fansi 1.0.4 2023-01-22 [1] CRAN (R 4.2.0) #> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.2.0) #> formatR 1.14 2023-01-17 [1] CRAN (R 4.2.0) #> Formula 1.2-5 2023-02-24 [1] CRAN (R 4.2.0) #> fs 1.6.1 2023-02-06 [1] CRAN (R 4.2.0) #> futile.logger 1.4.3 2016-07-10 [1] CRAN (R 4.2.0) #> futile.options 1.0.1 2018-04-20 [1] CRAN (R 4.2.0) #> gaston * 1.5.9 2022-12-22 [1] CRAN (R 4.2.0) #> generics 0.1.3 2022-07-05 [1] CRAN (R 4.2.0) #> glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.0) #> highr 0.10 2022-12-22 [1] CRAN (R 4.2.0) #> htmltools 0.5.4 2022-12-07 [1] CRAN (R 4.2.0) #> knitr 1.41 2022-11-18 [1] CRAN (R 4.2.0) #> lambda.r 1.2.4 2019-09-18 [1] CRAN (R 4.2.0) #> lattice 0.20-45 2021-09-22 [1] CRAN (R 4.2.0) #> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.0) #> lmtest 0.9-40 2022-03-21 [1] CRAN (R 4.2.0) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.0) #> MASS 7.3-58.1 2022-08-03 [1] CRAN (R 4.2.0) #> mlogit * 1.1-1 2020-10-02 [1] CRAN (R 4.2.0) #> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.2.0) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.0) #> purrr 1.0.0 2022-12-20 [1] CRAN (R 4.2.0) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.2.0) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.2.0) #> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.2.0) #> R.utils 2.12.2 2022-11-11 [1] CRAN (R 4.2.0) #> R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.0) #> Ravages * 1.1.2 2023-03-27 [1] Github (genostats/Ravages@38c8081) #> rbibutils 2.2.13 2023-01-13 [1] CRAN (R 4.2.0) #> Rcpp * 1.0.10 2023-01-22 [1] CRAN (R 4.2.0) #> RcppParallel * 5.1.7 2023-02-27 [1] CRAN (R 4.2.0) #> Rdpack 2.4 2022-07-20 [1] CRAN (R 4.2.0) #> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.2.0) #> rlang 1.1.0 2023-03-14 [1] CRAN (R 4.2.0) #> rmarkdown 2.18 2022-11-09 [1] CRAN (R 4.2.0) #> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.2.0) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.0) #> statmod 1.5.0 2023-01-06 [1] CRAN (R 4.2.0) #> stringi 1.7.8 2022-07-11 [1] CRAN (R 4.2.0) #> stringr 1.5.0 2022-12-02 [1] CRAN (R 4.2.0) #> styler 1.8.1 2022-11-07 [1] CRAN (R 4.2.0) #> testthat 3.1.7 2023-03-12 [1] CRAN (R 4.2.0) #> tibble 3.2.1 2023-03-20 [1] CRAN (R 4.2.0) #> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.0) #> utf8 1.2.3 2023-01-31 [1] CRAN (R 4.2.0) #> vctrs 0.6.1 2023-03-22 [1] CRAN (R 4.2.0) #> VennDiagram 1.7.3 2022-04-12 [1] CRAN (R 4.2.0) #> withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.0) #> xfun 0.36 2022-12-21 [1] CRAN (R 4.2.0) #> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.2.0) #> zoo 1.8-11 2022-09-17 [1] CRAN (R 4.2.0) #> #> [1] /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library #> #> ────────────────────────────────────────────────────────────────────────────── ```