Hi All!
I have been trying to run variancePartition for the last couple of days and was struggling to even get it to run. After including parallel processing I finally got it running. It looks like it is done, but obviously isn't since the data object hasn't been added to the environment and the stop button is still visible in the console. I just want to know if it is stuck or if it will eventually finish, as it has indicated that the iterations are complete and it says it took 8632 s (it has said this for at least 45 minutes now). Please see initial code and output below.
Code:
fit <- dream(adj.m_matrix, formula = model, data = pheno, BPPARAM = param)
Output:
Dividing work into 102 chunks...
iteration: 102
Total:8632 s
Thanks!
The model formula is:
model= ~ as.factor(condition) + as.factor(Sex) + as.factor(smoke) + Age.at.collection + EUR + AFR + (1|pairing)
The parallel processing formula is:
param = SnowParam(workers = 6, type = "SOCK", progressbar = TRUE)
The session info isn't loading since I am still waiting for dream() to finish.
Can you show
packageVesion("variancePartition")
from another R session, and alsodim(adj.m_matrix)
.This issue is likely fixed in an updated version available at https://diseaseneurogenomics.github.io/variancePartition/
So, it did fully finish and the fit object is in the environment (took ~1.5 hours after iteration finished) and I was also able to run the ebayes() function (~2 hours).
I am now trying to run the topTable(), but I keep receiving this error message:
Error in fit$coefficients[, coef] : subscript out of bounds
I am confused why this keeps happening as I have seen code run that looks similar to mine. I have included the code and session info below.
Code:
results_table_bin <- variancePartition::topTable(fit_ebayes, coef = "condition2", number = Inf)
Output for
head(fit_ebayes$design, 3)
(sorry if it looks weird I couldn't get it to format properly):P1_BI100126_1 1 0 1 0 P1_BI100141_1 1 0 0 0 P1_BI100202_1 1 0 0 0 Age.at.collection EUR AFR P1_BI100126_1 72.92 0.764659 0.047533 P1_BI100141_1 78.59 0.719458 0.239972 P1_BI100202_1 73.45 0.735434 0.140322
Output for sessionInfo():
R version 4.3.1 (2023-06-16) Platform: x86_64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.5.1
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Toronto tzcode source: internal
attached base packages: [1] parallel stats graphics grDevices utils datasets methods base
other attached packages: [1] doParallel_1.0.17 iterators_1.0.14 foreach_1.5.2 plyr_1.8.8
[5] tibble_3.2.1 dplyr_1.1.2 data.table_1.14.8 variancePartition_1.30.2 [9] BiocParallel_1.34.2 ggplot2_3.4.3 limma_3.56.2
loaded via a namespace (and not attached): [1] gtable_0.3.4 caTools_1.18.2 Biobase_2.60.0 lattice_0.21-8 numDeriv_2016.8-1.1 [6] vctrs_0.6.3 tools_4.3.1 Rdpack_2.5 bitops_1.0-7 generics_0.1.3
[11] pbkrtest_0.5.2 fansi_1.0.4 pkgconfig_2.0.3 Matrix_1.6-1 KernSmooth_2.23-22 [16] lifecycle_1.0.3 stringr_1.5.0 compiler_4.3.1 progress_1.2.2 gplots_3.1.3
[21] munsell_0.5.0 RhpcBLASctl_0.23-42 codetools_0.2-19 lmerTest_3.1-3 pillar_1.9.0
[26] nloptr_2.0.3 crayon_1.5.2 tidyr_1.3.0 MASS_7.3-60 aod_1.3.2
[31] boot_1.3-28.1 nlme_3.1-163 gtools_3.9.4 tidyselect_1.2.0 stringi_1.7.12
[36] mvtnorm_1.2-2 reshape2_1.4.4 purrr_1.0.2 splines_4.3.1 grid_4.3.1
[41] colorspace_2.1-0 cli_3.6.1 magrittr_2.0.3 utf8_1.2.3 broom_1.0.5
[46] withr_2.5.0 prettyunits_1.1.1 scales_1.2.1 backports_1.4.1 remaCor_0.0.16
[51] lme4_1.1-34 hms_1.1.3 rbibutils_2.2.15 EnvStats_2.8.0 rlang_1.1.1
[56] Rcpp_1.0.11 glue_1.6.2 BiocManager_1.30.22 BiocGenerics_0.46.0 rstudioapi_0.15.0
[61] minqa_1.2.5 R6_2.5.1
Thats surprising. Can you try with the latest version? Also, can you share a minimal reproducible example?
Sorry, I thought 1.30.2 was the lastest version of variancePartition? Also, what do you need for a minimal reproductible example? I am still relatively new to R and Bioconductor so I am unsure what that all entails.
Thank you for going through all of this with me by the way! I really appreciate it.