Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible function namespace related error #14

Closed
combiz opened this issue Jun 5, 2020 · 4 comments
Closed

Possible function namespace related error #14

combiz opened this issue Jun 5, 2020 · 4 comments

Comments

@combiz
Copy link

combiz commented Jun 5, 2020

The voomWithDreamWeights function fails after successfully running: -

> vobjDream <- variancePartition::voomWithDreamWeights( mat, model_formula, as.data.frame(SummarizedExperiment::colData(sce)) )
Memory usage to store result: >724.3 Mb
Dividing work into 100 chunks...
iteration: 100

Total:85 s
Error in variancePartition::voomWithDreamWeights(mat, model_formula, as.data.frame(SummarizedExperiment::colData(sce))) : 
  object 'design' not found

The error can be resolved by first loading the library with library(variancePartition). Seems like a possible namespace issue with design.

@GabrielHoffman
Copy link
Owner

Thanks for the bug report. Can you give me 1) a minimal reproducible example and 2) sessionInfo()

Cheers,
Gabriel

@combiz
Copy link
Author

combiz commented Jun 5, 2020

Thanks for the quick reply. I've included the sessionInfo() below but will have to get back to you on the reproducible example. That said, the source code at https://github.com/GabrielHoffman/variancePartition/blob/master/R/voomWithDreamWeights.R references an out of scope 'design' object so this should be reproducible for anyone running the function with a namespace prefix without loading the library. Cheers.

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8   
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] variancePartition_1.16.1 Biobase_2.46.0           BiocGenerics_0.32.0      scales_1.1.1             foreach_1.5.0            limma_3.42.2            
[7] ggplot2_3.3.0            magrittr_1.5             scFlow_0.5.0            

loaded via a namespace (and not attached):
  [1] rgl_0.100.54                rsvd_1.0.3                  Hmisc_4.4-0                 ica_1.0-2                   svglite_1.2.3              
  [6] class_7.3-15                lmtest_0.9-37               crayon_1.3.4                jcolors_0.0.4               MASS_7.3-51.6              
 [11] MAST_1.13.6                 nlme_3.1-144                backports_1.1.7             monocle3_0.2.1.1            rlang_0.4.6                
 [16] caret_6.0-86                XVector_0.26.0              bib2df_1.1.1                ROCR_1.0-11                 readxl_1.3.1               
 [21] irlba_2.3.3                 nloptr_1.2.2.1              scater_1.14.6               apcluster_1.4.8             qs_0.21.2                  
 [26] BiocParallel_1.20.1         rjson_0.2.20                manipulateWidget_0.10.1     bit64_0.9-7                 glue_1.4.1                 
 [31] rngtools_1.5                sctransform_0.2.1           pbkrtest_0.4-8.6            vipor_0.4.5                 AnnotationDbi_1.48.0       
 [36] UpSetR_1.4.0                HGNChelper_0.8.1            haven_2.2.0                 tidyselect_1.1.0            SummarizedExperiment_1.16.1
 [41] liger_0.5.0.9000            rio_0.5.16                  fitdistrplus_1.0-14         XML_3.99-0.3                tidyr_1.0.3                
 [46] zoo_1.8-8                   packrat_0.5.0               ggpubr_0.3.0                xtable_1.8-4                orthopolynom_1.0-5         
 [51] formattable_0.2.0.1         evaluate_0.14               gdtools_0.2.2               cli_2.0.2                   zlibbioc_1.32.0            
 [56] rstudioapi_0.11             doRNG_1.8.2                 miniUI_0.1.1.1              whisker_0.4                 rpart_4.1-15               
 [61] maps_3.3.0                  shiny_1.4.0.2               BiocSingular_1.2.2          xfun_0.13                   askpass_1.1                
 [66] cluster_2.1.0               caTools_1.18.0              doSNOW_1.0.18               KEGGREST_1.26.1             tibble_3.0.1               
 [71] ggrepel_0.8.2               threejs_0.3.3               ape_5.3                     listenv_0.8.0               Biostrings_2.54.0          
 [76] png_0.1-7                   future_1.17.0               withr_2.2.0                 ipred_0.9-9                 bitops_1.0-6               
 [81] plyr_1.8.6                  cellranger_1.1.0            nVennR_0.2.2                pROC_1.16.2                 dqrng_0.2.1                
 [86] pillar_1.4.4                RcppParallel_5.0.1          gplots_3.0.3                graphite_1.32.0             paletteer_1.1.0            
 [91] DelayedMatrixStats_1.8.0    vctrs_0.3.0                 ellipsis_0.3.1              generics_0.0.2              lava_1.6.7                 
 [96] RApiSerialize_0.1.0         tools_3.6.3                 foreign_0.8-75              beeswarm_0.2.3              munsell_0.5.0              
[101] DelayedArray_0.12.3         fastmap_1.0.1               compiler_3.6.3              abind_1.4-5                 httpuv_1.5.2               
[106] scico_1.1.0                 plotly_4.9.2.1              prodlim_2019.11.13          GenomeInfoDbData_1.2.2      gridExtra_2.3              
[111] enrichR_2.1                 edgeR_3.28.1                riverplot_0.6               lattice_0.20-40             snow_0.4-3                 
[116] later_1.0.0                 dplyr_0.8.5                 recipes_0.1.12              BiocFileCache_1.10.2        humaniformat_0.6.0         
[121] jsonlite_1.6.1              kBET_0.99.6                 graph_1.64.0                pbapply_1.4-2               carData_3.0-3              
[126] genefilter_1.68.0           lazyeval_0.2.2              promises_1.1.0              car_3.0-7                   doParallel_1.0.15          
[131] latticeExtra_0.6-29         R.utils_2.9.2               reticulate_1.15             checkmate_2.0.0             rmarkdown_2.1              
[136] openxlsx_4.1.5              sandwich_2.5-1              cowplot_1.0.0               statmod_1.4.34              webshot_0.5.2              
[141] Rtsne_0.15                  forcats_0.5.0               dichromat_2.0-0             uwot_0.1.8                  igraph_1.2.5               
[146] HDF5Array_1.14.4            survival_3.1-11             systemfonts_0.2.2           htmltools_0.4.0             memoise_1.1.0              
[151] Seurat_3.1.5                locfit_1.5-9.4              IRanges_2.20.2              viridisLite_0.3.0           digest_0.6.25              
[156] assertthat_0.2.1            mime_0.9                    rappdirs_0.3.1              npsurv_0.4-0.1              palr_0.2.0                 
[161] pals_1.6                    RSQLite_2.2.0               future.apply_1.5.0          lsei_1.2-0.1                mapproj_1.2.7              
[166] data.table_1.12.8           blob_1.2.1                  S4Vectors_0.24.4            R.oo_1.23.0                 splines_3.6.3              
[171] Formula_1.2-3               rematch2_2.1.2              Rhdf5lib_1.8.0              RCurl_1.98-1.2              broom_0.5.6                
[176] hms_0.5.3                   rhdf5_2.30.1                colorspace_1.4-1            DropletUtils_1.6.1          base64enc_0.1-3            
[181] WebGestaltR_0.4.3           ggbeeswarm_0.6.0            GenomicRanges_1.38.0        maxLik_1.3-8                nnet_7.3-13                
[186] Rcpp_1.0.4.6                mclust_5.4.6                RANN_2.6.1                  fansi_0.4.1                 ModelMetrics_1.2.2.2       
[191] R6_2.4.1                    grid_3.6.3                  acepack_1.4.1               ggridges_0.5.2              lifecycle_0.2.0            
[196] DoubletFinder_2.0.2         oompaBase_3.2.9             zip_2.0.4                   miscTools_0.6-26            curl_4.3                   
[201] ggsignif_0.6.0              minqa_1.2.4                 gdata_2.18.0                leiden_0.3.3                leaflet_2.0.3              
[206] Matrix_1.2-18               uniftest_1.1                RcppAnnoy_0.0.16            RColorBrewer_1.1-2          iterators_1.0.12           
[211] ROntoTools_2.14.0           gower_0.2.1                 stringr_1.4.0               htmlwidgets_1.5.1           biomaRt_2.42.1             
[216] purrr_0.3.4                 DirichletReg_0.6-3.1        crosstalk_1.1.0.1           globals_0.12.5              openssl_1.4.1              
[221] htmlTable_1.13.3            patchwork_1.0.0.9000        KEGGgraph_1.46.0            lubridate_1.7.8             codetools_0.2-16           
[226] matrixStats_0.56.0          FNN_1.1.3                   gtools_3.8.2                EWCE_0.99.2                 prettyunits_1.1.1          
[231] SingleCellExperiment_1.8.0  dbplyr_1.4.3                R.methodsS3_1.8.0           GenomeInfoDb_1.22.1         gtable_0.3.0               
[236] tsne_0.1-3                  DBI_1.1.0                   stats4_3.6.3                httr_1.4.1                  KernSmooth_2.23-16         
[241] stringi_1.4.6               progress_1.2.2              reshape2_1.4.4              english_1.2-5               annotate_1.64.0            
[246] viridis_0.5.1               Rgraphviz_2.30.0            timeDate_3043.102           colorRamps_2.3              ggdendro_0.1-20            
[251] boot_1.3-24                 BiocNeighbors_1.4.2         lme4_1.1-23                 geneplotter_1.64.0          readr_1.3.1                
[256] DESeq2_1.26.0               bit_1.1-15.2                jpeg_0.1-8.1                pkgconfig_2.0.3             rstatix_0.5.0              
[261] knitr_1.28      

@GabrielHoffman
Copy link
Owner

You are using v1.16.1. Looking at my notes, I fixed this in v1.17.2. The current version is v1.19.1 from an hour ago. Can you try that?

I am working on fixing a few small bugs in the Bioconductor release

@combiz
Copy link
Author

combiz commented Jun 5, 2020

All working fine in the latest github (1.19.1). Thanks again, and great work on the package and documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants