-
Notifications
You must be signed in to change notification settings - Fork 10
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
TFBSTools breaks colSums and rowSums: Error in .local(x, na.rm, dims, ...) : object 'CRsparse_colSums' not found #37
Comments
Hi, can you provide the > library(Seurat)
Loading required package: SeuratObject
Loading required package: sp
‘SeuratObject’ was built with package ‘Matrix’ 1.6.3 but the current version is 1.6.4; it is recomended that you reinstall ‘SeuratObject’ as the ABI for ‘Matrix’ may
have changed
Attaching package: ‘SeuratObject’
The following object is masked from ‘package:base’:
intersect
> library(SeuratData)
── Installed datasets ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── SeuratData v0.2.2.9001 ──
✔ pbmc3k 3.1.4
──────────────────────────────────────────────────────────────────────────────────────────── Key ───────────────────────────────────────────────────────────────────────────────────────────
✔ Dataset loaded successfully
❯ Dataset built with a newer version of Seurat than installed
❓ Unknown version of Seurat installed
> pbmc3k <- LoadData("pbmc3k")
Validating object structure
Updating object slots
Ensuring keys are in the proper structure
Warning: Assay RNA changing from Assay to Assay
Ensuring keys are in the proper structure
Ensuring feature names don't have underscores or pipes
Updating slots in RNA
Validating object structure for Assay ‘RNA’
Object representation is consistent with the most current Seurat version
Warning: Assay RNA changing from Assay to Assay5
> head(colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> head(TFBSTools::colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> head(colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> head(Matrix::colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.1.2
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-arm64/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: Europe/Zurich
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] pbmc3k.SeuratData_3.1.4 SeuratData_0.2.2.9001 Seurat_5.0.1 SeuratObject_5.0.1 sp_2.1-2
loaded via a namespace (and not attached):
[1] RcppAnnoy_0.0.21 splines_4.3.1 later_1.3.1 BiocIO_1.12.0 bitops_1.0-7 R.oo_1.25.0
[7] tibble_3.2.1 polyclip_1.10-6 XML_3.99-0.16 DirichletMultinomial_1.44.0 fastDummies_1.7.3 lifecycle_1.0.4
[13] globals_0.16.2 lattice_0.22-5 MASS_7.3-60 magrittr_2.0.3 plotly_4.10.3 yaml_2.3.7
[19] httpuv_1.6.12 sctransform_0.4.1 spam_2.10-0 spatstat.sparse_3.0-3 reticulate_1.34.0 cowplot_1.1.1
[25] pbapply_1.7-2 DBI_1.1.3 CNEr_1.38.0 RColorBrewer_1.1-3 abind_1.4-5 zlibbioc_1.48.0
[31] Rtsne_0.16 GenomicRanges_1.54.1 R.utils_2.12.3 purrr_1.0.2 BiocGenerics_0.48.1 RCurl_1.98-1.13
[37] pracma_2.4.4 rappdirs_0.3.3 GenomeInfoDbData_1.2.11 IRanges_2.36.0 S4Vectors_0.40.2 ggrepel_0.9.4
[43] irlba_2.3.5.1 listenv_0.9.0 spatstat.utils_3.0-4 seqLogo_1.68.0 goftest_1.2-3 RSpectra_0.16-1
[49] annotate_1.80.0 spatstat.random_3.2-2 fitdistrplus_1.1-11 parallelly_1.36.0 leiden_0.4.3.1 codetools_0.2-19
[55] DelayedArray_0.28.0 tidyselect_1.2.0 matrixStats_1.1.0 stats4_4.3.1 spatstat.explore_3.2-5 GenomicAlignments_1.38.0
[61] jsonlite_1.8.7 ellipsis_0.3.2 progressr_0.14.0 ggridges_0.5.4 survival_3.5-7 tools_4.3.1
[67] TFMPvalue_0.0.9 ica_1.0-3 Rcpp_1.0.11 glue_1.6.2 gridExtra_2.3 SparseArray_1.2.2
[73] MatrixGenerics_1.14.0 GenomeInfoDb_1.38.1 dplyr_1.1.4 BiocManager_1.30.22 fastmap_1.1.1 fansi_1.0.5
[79] caTools_1.18.2 digest_0.6.33 R6_2.5.1 mime_0.12 colorspace_2.1-0 GO.db_3.18.0
[85] scattermore_1.2 poweRlaw_0.70.6 gtools_3.9.5 tensor_1.5 spatstat.data_3.0-3 RSQLite_2.3.3
[91] R.methodsS3_1.8.2 utf8_1.2.4 tidyr_1.3.0 generics_0.1.3 data.table_1.14.8 rtracklayer_1.62.0
[97] httr_1.4.7 htmlwidgets_1.6.3 S4Arrays_1.2.0 TFBSTools_1.40.0 uwot_0.1.16 pkgconfig_2.0.3
[103] gtable_0.3.4 blob_1.2.4 lmtest_0.9-40 XVector_0.42.0 htmltools_0.5.7 dotCall64_1.1-1
[109] scales_1.3.0 Biobase_2.62.0 png_0.1-8 rstudioapi_0.15.0 tzdb_0.4.0 reshape2_1.4.4
[115] rjson_0.2.21 nlme_3.1-164 zoo_1.8-12 cachem_1.0.8 stringr_1.5.1 KernSmooth_2.23-22
[121] parallel_4.3.1 miniUI_0.1.1.1 AnnotationDbi_1.64.1 restfulr_0.0.15 pillar_1.9.0 grid_4.3.1
[127] vctrs_0.6.5 RANN_2.6.1 promises_1.2.1 xtable_1.8-4 cluster_2.1.6 readr_2.1.4
[133] cli_3.6.1 compiler_4.3.1 Rsamtools_2.18.0 rlang_1.1.2 crayon_1.5.2 future.apply_1.11.0
[139] plyr_1.8.9 stringi_1.8.2 viridisLite_0.4.2 deldir_2.0-2 BiocParallel_1.36.0 munsell_0.5.0
[145] Biostrings_2.70.1 lazyeval_0.2.2 spatstat.geom_3.2-7 Matrix_1.6-4 BSgenome_1.70.1 RcppHNSW_0.5.0
[151] hms_1.1.3 patchwork_1.1.3 bit64_4.0.5 future_1.33.0 ggplot2_3.4.4 KEGGREST_1.42.0
[157] shiny_1.8.0 SummarizedExperiment_1.32.0 ROCR_1.0-11 igraph_1.5.1 memoise_2.0.1 bit_4.0.5 |
Hi,
|
I am adding this here because I am having a similar issue that I think stems from the same underlying problem. When trying to run FindMarkers() on scATAC-seq data with Seurat/Signac I get this error: Warning: When testing Myo versus all: sessionInfo() R version 4.3.1 (2023-06-16) Matrix products: default locale: time zone: America/New_York attached base packages: other attached packages: loaded via a namespace (and not attached): |
Please fix - this is breaking the use of Signac package. |
I don't see anything to fix on my side. Cannot reproduce it on alternative Linux cluster as well. > library(Seurat)
Loading required package: SeuratObject
Loading required package: sp
Attaching package: ‘SeuratObject’
The following object is masked from ‘package:base’:
intersect
> library(SeuratData)
> pbmc3k <- LoadData("pbmc3k")
Validating object structure
Updating object slots
Ensuring keys are in the proper structure
Warning: Assay RNA changing from Assay to Assay
Ensuring keys are in the proper structure
Ensuring feature names don't have underscores or pipes
Updating slots in RNA
Validating object structure for Assay ‘RNA’
Object representation is consistent with the most current Seurat version
Warning: Assay RNA changing from Assay to Assay5
> head(colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> head(colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> head(Matrix::colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: FlexiBLAS OPENBLAS; LAPACK version 3.11.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Europe/Zurich
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Seurat_5.0.0 SeuratObject_5.0.0 sp_2.1-1 pbmc3k.SeuratData_3.1.4 SeuratData_0.2.2.9001
loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-3 rstudioapi_0.15.0 jsonlite_1.8.7 magrittr_2.0.3 spatstat.utils_3.0-4 fs_1.6.3 vctrs_0.6.4
[8] ROCR_1.0-11 memoise_2.0.1 spatstat.explore_3.2-5 htmltools_0.5.7 usethis_2.2.2 curl_5.1.0 sctransform_0.4.1
[15] parallelly_1.36.0 KernSmooth_2.23-22 htmlwidgets_1.6.2 desc_1.4.2 ica_1.0-3 plyr_1.8.9 plotly_4.10.3
[22] zoo_1.8-12 cachem_1.0.8 igraph_1.5.1 mime_0.12 lifecycle_1.0.4 pkgconfig_2.0.3 Matrix_1.6-3
[29] R6_2.5.1 fastmap_1.1.1 fitdistrplus_1.1-11 future_1.33.0 shiny_1.7.5.1 digest_0.6.33 colorspace_2.1-0
[36] patchwork_1.1.3 ps_1.7.5 rprojroot_2.0.4 tensor_1.5 RSpectra_0.16-1 irlba_2.3.5.1 pkgload_1.3.3
[43] progressr_0.14.0 fansi_1.0.5 spatstat.sparse_3.0-3 httr_1.4.7 polyclip_1.10-6 abind_1.4-5 compiler_4.3.2
[50] remotes_2.4.2.1 fastDummies_1.7.3 pkgbuild_1.4.2 MASS_7.3-60 rappdirs_0.3.3 sessioninfo_1.2.2 tools_4.3.2
[57] lmtest_0.9-40 httpuv_1.6.12 future.apply_1.11.0 goftest_1.2-3 glue_1.6.2 callr_3.7.3 nlme_3.1-163
[64] promises_1.2.1 grid_4.3.2 Rtsne_0.16 cluster_2.1.4 reshape2_1.4.4 generics_0.1.3 gtable_0.3.4
[71] spatstat.data_3.0-3 tidyr_1.3.0 data.table_1.14.8 utf8_1.2.4 spatstat.geom_3.2-7 RcppAnnoy_0.0.21 ggrepel_0.9.4
[78] RANN_2.6.1 pillar_1.9.0 stringr_1.5.1 spam_2.10-0 RcppHNSW_0.5.0 later_1.3.1 splines_4.3.2
[85] dplyr_1.1.3 lattice_0.22-5 renv_1.0.3 survival_3.5-7 deldir_1.0-9 tidyselect_1.2.0 miniUI_0.1.1.1
[92] pbapply_1.7-2 gridExtra_2.3 scattermore_1.2 devtools_2.4.5 matrixStats_1.1.0 stringi_1.8.1 lazyeval_0.2.2
[99] codetools_0.2-19 tibble_3.2.1 cli_3.6.1 uwot_0.1.16 xtable_1.8-4 reticulate_1.34.0 munsell_0.5.0
[106] processx_3.8.2 Rcpp_1.0.11 globals_0.16.2 spatstat.random_3.2-1 png_0.1-8 parallel_4.3.2 ellipsis_0.3.2
[113] ggplot2_3.4.4 prettyunits_1.2.0 dotCall64_1.1-0 profvis_0.3.8 urlchecker_1.0.1 listenv_0.9.0 viridisLite_0.4.2
[120] scales_1.2.1 ggridges_0.5.4 leiden_0.4.3.1 purrr_1.0.2 crayon_1.5.2 rlang_1.1.2 cowplot_1.1.1 |
Could you try to see if you can get an error when running with scATAC-seq data? I am not running into an issue with Matrix when running scRNA-seq data, only when I am trying to identify enriched motifs from scATAC-seq Motif AnalysisGet a list of motif position frequency matrices from the JASPAR databasepfm <- getMatrixSet( add motif informationmulti.sobj <- AddMotifs( saveRDS(multi.sobj, "../input_files/huSMG_multiome_RNA-seq_&ATAC-seq_processed_signac_with_motif_data_120523.rds") DefaultAssay(multi.sobj) <- "peaks" da_peaks <- FindMarkers( |
Hi @ge11232002 ,
We're still working on looking into this on our end as well, but we have not found anything else that causes the issue except for the TFBSTools loading. |
@ehoreth What is the error that you get? |
Hello Gesmira, The error code was this: However, I reinstalled the TFBSTools just now and it is working now. So I am no longer having the issue. |
Forgot to include the TFBSTools::colSums. It works fine on a Linux cluster. > library(Seurat)
> library(SeuratData)
> pbmc3k <- LoadData("pbmc3k")
Validating object structure
Updating object slots
Ensuring keys are in the proper structure
Warning: Assay RNA changing from Assay to Assay
Ensuring keys are in the proper structure
Ensuring feature names don't have underscores or pipes
Updating slots in RNA
Validating object structure for Assay ‘RNA’
Object representation is consistent with the most current Seurat version
Warning: Assay RNA changing from Assay to Assay5
> head(colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> head(TFBSTools::colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> head(colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163
> head(Matrix::colSums(pbmc3k[["RNA"]]$counts))
AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG AAACCGTGTATGCG AAACGCACTGGTAC
2419 4903 3147 2639 980 2163 S4 method |
Hi @ge11232002, |
Actual solution here: satijalab/seurat#8202 (comment) |
Hi,
My name is Gesi and I'm a developer of the Seurat and Azimuth packages. We have recently noticed this bug reported in various issues across Seurat, Azimuth, and Signac. It seems that there is a specific TFBSTools implementation of
colSums
androwSums
that overwrites any other version even if you do not attach the package. The Matrix package used to have 'CRsparse_colSums' and 'CRsparse_rowSums' as internal functions but they have since been removed. It seems like the TFBSTools versions ofcolSums
androwSums
are trying to call those.Reproducible example shown with SeuratData object, but this has been reproduced with any dgCMatrix:
Once the TFBSTools version is run, it breaks any other attempts at
colSums()
. This causes many functions to break across Seurat, Azimuth, and Signac if the Azimuth or Signac packages are loaded in as they import/suggest TFBSTools.Any advice or attempt at a bug fix to be up to date with the recent
Matrix
version would be greatly appreciated!Thank you!
The text was updated successfully, but these errors were encountered: