const-ae / glmGamPoi

Fit Gamma-Poisson Generalized Linear Models Reliably
103 stars 14 forks source link

Error: 'pseudobulk' is not an exported object from 'namespace:glmGamPoi' #59

Closed PietropaoliLab closed 6 months ago

PietropaoliLab commented 7 months ago

Here my situation:

> sce_subset
class: SingleCellExperiment 
dim: 21511 31419 
metadata(0):
assays(1): counts
rownames(21511): AL627309.1 AL669831.5 ... AC006064.3 FP236383.2
rowData names(0):
colnames(31419): Male_GSM7818506_PD1__AAACCCACATTGAGCT-1 Male_GSM7818506_PD1__AAACCCAGTCTCTCTG-1 ...
  Female_GSM7818512_PD7__3_TTTGGTTTCTCGACGG-1 Female_GSM7818512_PD7__3_TTTGTTGCATGAGGGT-1
colData names(10): orig.ident nCount_RNA ... Sex ident
reducedDimNames(0):
mainExpName: RNA
altExpNames(0):
> # Convert counts to dense matrix
> counts(sce_subset) <- as.matrix(counts(sce_subset))
> # Remove empty levels because glm_gp() will complain otherwise
> sce$monaco.main <- factor(sce$monaco.main)
> sce$monaco.main <- droplevels(sce_subset$monaco.main)
> sce_reduced <- glmGamPoi::pseudobulk(sce_subset, group_by = vars(orig.ident, Sex, monaco.main))
Error: 'pseudobulk' is not an exported object from 'namespace:glmGamPoi'

I received: ${{\color{Red}\Large{\textsf{ Error: 'pseudobulk' is not an exported object from 'namespace:glmGamPoi'\ }}}}\$

Here my sesion:

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] glmGamPoi_1.8.0             DESeq2_1.36.0               Seurat_5.0.1                SeuratObject_5.0.1         
 [5] sp_2.1-3                    SingleCellExperiment_1.18.1 SummarizedExperiment_1.26.1 Biobase_2.56.0             
 [9] GenomicRanges_1.48.0        GenomeInfoDb_1.32.4         IRanges_2.30.1              S4Vectors_0.34.0           
[13] BiocGenerics_0.42.0         MatrixGenerics_1.8.1        matrixStats_1.1.0          

loaded via a namespace (and not attached):
  [1] spam_2.10-0            plyr_1.8.9             igraph_1.5.1           lazyeval_0.2.2         splines_4.2.1         
  [6] RcppHNSW_0.6.0         BiocParallel_1.30.4    listenv_0.9.1          scattermore_1.2        ggplot2_3.4.4         
 [11] digest_0.6.34          htmltools_0.5.7        fansi_1.0.6            magrittr_2.0.3         memoise_2.0.1         
 [16] tensor_1.5             cluster_2.1.6          ROCR_1.0-11            globals_0.16.2         Biostrings_2.64.1     
 [21] annotate_1.74.0        spatstat.sparse_3.0-3  colorspace_2.1-0       blob_1.2.4             ggrepel_0.9.5         
 [26] dplyr_1.1.4            crayon_1.5.2           RCurl_1.98-1.14        jsonlite_1.8.8         genefilter_1.78.0     
 [31] progressr_0.14.0       spatstat.data_3.0-4    survival_3.5-7         zoo_1.8-12             glue_1.7.0            
 [36] polyclip_1.10-6        gtable_0.3.4           zlibbioc_1.42.0        XVector_0.36.0         leiden_0.4.3.1        
 [41] DelayedArray_0.22.0    future.apply_1.11.1    abind_1.4-5            scales_1.3.0           DBI_1.2.1             
 [46] spatstat.random_3.2-2  miniUI_0.1.1.1         Rcpp_1.0.12            viridisLite_0.4.2      xtable_1.8-4          
 [51] reticulate_1.35.0      bit_4.0.5              dotCall64_1.1-1        htmlwidgets_1.6.4      httr_1.4.7            
 [56] RColorBrewer_1.1-3     ellipsis_0.3.2         ica_1.0-3              pkgconfig_2.0.3        XML_3.99-0.16.1       
 [61] uwot_0.1.16            deldir_2.0-2           locfit_1.5-9.8         utf8_1.2.4             tidyselect_1.2.0      
 [66] rlang_1.1.3            reshape2_1.4.4         later_1.3.2            AnnotationDbi_1.58.0   munsell_0.5.0         
 [71] tools_4.2.1            cachem_1.0.8           cli_3.6.2              generics_0.1.3         RSQLite_2.3.5         
 [76] ggridges_0.5.6         stringr_1.5.1          fastmap_1.1.1          goftest_1.2-3          bit64_4.0.5           
 [81] fitdistrplus_1.1-11    purrr_1.0.2            RANN_2.6.1             KEGGREST_1.36.3        pbapply_1.7-2         
 [86] future_1.33.1          nlme_3.1-164           mime_0.12              compiler_4.2.1         rstudioapi_0.15.0     
 [91] plotly_4.10.4          png_0.1-8              spatstat.utils_3.0-4   geneplotter_1.74.0     tibble_3.2.1          
 [96] stringi_1.8.3          RSpectra_0.16-1        lattice_0.22-5         Matrix_1.6-4           vctrs_0.6.5           
[101] pillar_1.9.0           lifecycle_1.0.4        spatstat.geom_3.2-8    lmtest_0.9-40          RcppAnnoy_0.0.22      
[106] data.table_1.15.0      cowplot_1.1.3          bitops_1.0-7           irlba_2.3.5.1          httpuv_1.6.14         
[111] patchwork_1.2.0        R6_2.5.1               promises_1.2.1         KernSmooth_2.23-22     gridExtra_2.3         
[116] parallelly_1.36.0      codetools_0.2-19       fastDummies_1.7.3      MASS_7.3-60.0.1        sctransform_0.4.1     
[121] GenomeInfoDbData_1.2.8 parallel_4.2.1         grid_4.2.1             tidyr_1.3.1            Rtsne_0.17            
[126] spatstat.explore_3.2-6 shiny_1.8.0           
> 
const-ae commented 6 months ago

I added the pseudobulk function only a year ago (in Bioconductor release 3.17, i.e., glmGamPoi version 1.11). You can install the latest version of glmGamPoi by installing R 4.3 and calling

BiocManager::install("glmGamPoi")

or installing the package directly from Github:

devtools::install_github("const-ae/glmGamPoi")