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

object 'CRsparse_rowSums' not found Error when running RunChromVAR #1547

Closed
linzhangTuesday opened this issue Nov 29, 2023 · 6 comments
Closed

Comments

@linzhangTuesday
Copy link

Hi I am trying to run RunChromVAR
it reported error of
Error in .local(x, na.rm, dims, ...) :
object 'CRsparse_rowSums' not found
Any comments or suggestions would be appreciated!

my code as below:
(myobject <- readRDS(file = "myobject.rds"))
myobject <- RunChromVAR(

  • object = myobject,
  • genome = BSgenome.myBSgenome
  • )

sessioninfo()

R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.1

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.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:
tzcode source: internal

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

other attached packages:
[1] BiocParallel_1.36.0 BSgenome.mCalJac1.pat.X_1.70.1
[3] BSgenome_1.70.1 rtracklayer_1.62.0
[5] BiocIO_1.12.0 Biostrings_2.70.1
[7] XVector_0.42.0 GenomicRanges_1.54.1
[9] GenomeInfoDb_1.38.1 IRanges_2.36.0
[11] S4Vectors_0.40.2 BiocGenerics_0.48.1
[13] Signac_1.12.0

loaded via a namespace (and not attached):
[1] RcppAnnoy_0.0.21 splines_4.3.2
[3] later_1.3.1 bitops_1.0-7
[5] R.oo_1.25.0 tibble_3.2.1
[7] polyclip_1.10-6 DirichletMultinomial_1.44.0
[9] XML_3.99-0.15 fastDummies_1.7.3
[11] lifecycle_1.0.4 globals_0.16.2
[13] lattice_0.22-5 MASS_7.3-60
[15] magrittr_2.0.3 plotly_4.10.3
[17] yaml_2.3.7 httpuv_1.6.12
[19] Seurat_5.0.1 sctransform_0.4.1
[21] spam_2.10-0 sp_2.1-2
[23] spatstat.sparse_3.0-3 reticulate_1.34.0
[25] CNEr_1.38.0 cowplot_1.1.1
[27] pbapply_1.7-2 DBI_1.1.3
[29] RColorBrewer_1.1-3 abind_1.4-5
[31] zlibbioc_1.48.0 Rtsne_0.16
[33] R.utils_2.12.3 purrr_1.0.2
[35] RCurl_1.98-1.13 pracma_2.4.4
[37] GenomeInfoDbData_1.2.11 ggrepel_0.9.4
[39] irlba_2.3.5.1 listenv_0.9.0
[41] spatstat.utils_3.0-4 seqLogo_1.68.0
[43] goftest_1.2-3 RSpectra_0.16-1
[45] annotate_1.80.0 spatstat.random_3.2-1
[47] fitdistrplus_1.1-11 parallelly_1.36.0
[49] leiden_0.4.3.1 codetools_0.2-19
[51] DelayedArray_0.28.0 RcppRoll_0.3.0
[53] DT_0.30 tidyselect_1.2.0
[55] matrixStats_1.1.0 spatstat.explore_3.2-5
[57] GenomicAlignments_1.38.0 jsonlite_1.8.7
[59] ellipsis_0.3.2 progressr_0.14.0
[61] ggridges_0.5.4 survival_3.5-7
[63] tools_4.3.2 TFMPvalue_0.0.9
[65] ica_1.0-3 Rcpp_1.0.11
[67] glue_1.6.2 gridExtra_2.3
[69] SparseArray_1.2.2 MatrixGenerics_1.14.0
[71] dplyr_1.1.4 BiocManager_1.30.22
[73] fastmap_1.1.1 fansi_1.0.5
[75] caTools_1.18.2 digest_0.6.33
[77] R6_2.5.1 mime_0.12
[79] colorspace_2.1-0 GO.db_3.18.0
[81] scattermore_1.2 poweRlaw_0.70.6
[83] gtools_3.9.5 tensor_1.5
[85] chromVAR_1.24.0 spatstat.data_3.0-3
[87] RSQLite_2.3.3 R.methodsS3_1.8.2
[89] utf8_1.2.4 tidyr_1.3.0
[91] generics_0.1.3 data.table_1.14.8
[93] httr_1.4.7 htmlwidgets_1.6.3
[95] S4Arrays_1.2.0 TFBSTools_1.40.0
[97] uwot_0.1.16 pkgconfig_2.0.3
[99] gtable_0.3.4 blob_1.2.4
[101] lmtest_0.9-40 htmltools_0.5.7
[103] dotCall64_1.1-0 SeuratObject_5.0.1
[105] scales_1.2.1 Biobase_2.62.0
[107] png_0.1-8 tzdb_0.4.0
[109] reshape2_1.4.4 rjson_0.2.21
[111] nlme_3.1-163 cachem_1.0.8
[113] zoo_1.8-12 stringr_1.5.1
[115] KernSmooth_2.23-22 parallel_4.3.2
[117] miniUI_0.1.1.1 AnnotationDbi_1.64.1
[119] restfulr_0.0.15 pillar_1.9.0
[121] grid_4.3.2 vctrs_0.6.4
[123] RANN_2.6.1 promises_1.2.1
[125] xtable_1.8-4 cluster_2.1.4
[127] readr_2.1.4 cli_3.6.1
[129] compiler_4.3.2 Rsamtools_2.18.0
[131] rlang_1.1.2 crayon_1.5.2
[133] future.apply_1.11.0 plyr_1.8.9
[135] stringi_1.8.2 viridisLite_0.4.2
[137] deldir_2.0-2 munsell_0.5.0
[139] lazyeval_0.2.2 spatstat.geom_3.2-7
[141] Matrix_1.6-1 RcppHNSW_0.5.0
[143] hms_1.1.3 patchwork_1.1.3
[145] bit64_4.0.5 future_1.33.0
[147] ggplot2_3.4.4 KEGGREST_1.42.0
[149] shiny_1.8.0 SummarizedExperiment_1.32.0
[151] ROCR_1.0-11 igraph_1.5.1
[153] memoise_2.0.1 fastmatch_1.1-4
[155] bit_4.0.5

@Gesmira
Copy link
Contributor

Gesmira commented Nov 29, 2023

Hi,
Just commenting here to say we've noticed the same issue in Azimuth. In the newest Azimuth update, it imports TFBSTools. TFBSTools has its own version of colSums() and rowSums() that overrides all other versions, even if you specify the package to use.

> head(colSums(obj[["RNA"]]$counts))
# this works
> head(TFBSTools::colSums(obj[["RNA"]]$counts))
Error in .local(x, na.rm, dims, ...) : 
  object 'CRsparse_colSums' not found
> head(colSums(obj[["RNA"]]$counts))
Error in .local(x, na.rm, dims, ...) : 
  object 'CRsparse_colSums' not found

I had noticed success with an environment that had Matrix version 1.6-1.1 as this has CRsparse_colSums and CRsparse_rowSums as internal functions, but these have since been removed. Since you also have TFBSTools loaded, I imagine this might be the same issue. We are currently looking into it as well.

@linzhangTuesday
Copy link
Author

Thanks a lot for the comments @Gesmira
would unload TFBSTools work?
I tried detach("package:TFBSTools_1.40.0", unload=TRUE)
but it reported error
Error in detach("package:TFBSTools_1.40.0", unload = TRUE) :
invalid 'name' argument

I tried installing Matrix 1.6-1.1 but Signac cannot be loaded anymore
Error: package or namespace load failed for ‘Signac’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘Matrix’ 1.6-1.1 is already loaded, but >= 1.6.3 is required

@Gesmira
Copy link
Contributor

Gesmira commented Nov 30, 2023

No problem! I believe the correct syntax for detaching the package is detach("package:TFBSTools", unload=TRUE). Unloading has not worked for me, in fact it leads to a different error message as it tries to use the base versions of rowSums/colSums even if I specify the SeuratObject versions of the functions. But it's worth a try to see what happens in your environment.

And that makes sense. I had an older environment where I could test this, but it seems like this will have to be fixed by TFBSTools in order to be up to date with the newest Matrix version.

@linzhangTuesday
Copy link
Author

Thanks again for the comments and suggestions! I tried working with an environment that had Matrix version 1.6-1.1 and it solved this.

@Gesmira
Copy link
Contributor

Gesmira commented Dec 8, 2023

Hi @linzhangTuesday, no problem! In case you need a more permanent solution, we have detailed one here: satijalab/seurat#8089 (comment)

@linzhangTuesday
Copy link
Author

Thank you very much for the information! I have updated Bioconductor as suggested.

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