Skip to content

ChromVAR Failure to detect ATAC count data despite the data existing. #123

@vficarrotta

Description

@vficarrotta

Using the wrapper function RunChromVAR() fails to find the count data of a multiome Seurat object, RNA + ATAC, though when the object is checked, the data exists in the layer where RunChromVAR() expects to find it. I cannot tell if the issue is with ChromVAR or with RunChromVAR() but the function is failing to find the ATAC count data that I can see exists.

I am following the Seurat vignette found here: https://rdrr.io/github/satijalab/seurat/f/vignettes/weighted_nearest_neighbor_analysis.Rmd

Within the section "WNN analysis of 10x Multiome, RNA + ATAC",

The code works until RunChromVAR():
pbmc <- RunChromVAR( object = pbmc, genome = BSgenome.Hsapiens.UCSC.hg38 )

Which outputs the following error:
Computing GC bias per region Selecting background regions Computing deviations from background Constructing chromVAR assay **Warning: Layer counts isn't present in the assay object; returning NULL**

When I check the pbmc object:
pbmc
An object of class Seurat 167486 features across 10412 samples within 4 assays **Active assay: ATAC** (106056 features, 106056 variable features) **2 layers present: counts, data** 2 other assays present: RNA, SCT 5 dimensional reductions calculated: lsi, umap.atac, pca, umap.rna, wnn.umap

The ATAC layer is properly active and shows the presence of count data.

Looking at the structure of the ATAC count data shows it exists:
str(pbmc@assays$ATAC@counts)
Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
..@ i : int [1:81240829] 12 16 25 27 28 30 34 37 38 39 ...
..@ p : int [1:10413] 0 13867 21114 27642 30965 35232 46860 54101 62700 70416 ...
..@ Dim : int [1:2] 106056 10412
..@ Dimnames:List of 2
.. ..$ : chr [1:106056] "chr1-10109-10357" "chr1-180730-181630" "chr1-191491-191736" "chr1-267816-268196" ...
.. ..$ : chr [1:10412] "AAACAGCCAAGGAATC-1" "AAACAGCCAATCCCTT-1" "AAACAGCCAATGCGCT-1" "AAACAGCCACCAACCG-1" ...
..@ x : num [1:81240829] 1 2 2 2 2 2 4 6 8 10 ...
..@ factors : list()

Double checking the existence of count data:
head(pbmc@assays$ATAC@counts)
6 x 10412 sparse Matrix of class "dgCMatrix"
[[ suppressing 10412 column names 'AAACAGCCAAGGAATC-1', 'AAACAGCCAATCCCTT-1', 'AAACAGCCAATGCGCT-1' ... ]]

chr1-10109-10357 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
chr1-180730-181630 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
chr1-191491-191736 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
chr1-267816-268196 . . . . . . . . . . . . . . . 2 . . . . . . . . . . 2 . . .
chr1-586028-586373 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
chr1-629721-630172 . . . . . . . . . . . . . 2 . . . . . . . . . . . . . . . .

I'm running this on the university HPC.
sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /mmfs1/tools/R/gcc/9.3.0/4.4.0/lib64/R/lib/libRblas.so
LAPACK: /mmfs1/tools/R/gcc/9.3.0/4.4.0/lib64/R/lib/libRlapack.so; LAPACK version 3.12.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: America/Chicago
tzcode source: system (glibc)

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

other attached packages:
[1] BSgenome.Hsapiens.UCSC.hg38_1.4.5 BSgenome_1.72.0
[3] rtracklayer_1.64.0 BiocIO_1.14.0
[5] Biostrings_2.72.1 XVector_0.44.0
[7] motifmatchr_1.26.0 TFBSTools_1.42.0
[9] JASPAR2020_0.99.10 chromVAR_1.26.0
[11] biovizBase_1.52.0 ggplot2_3.5.1
[13] dplyr_1.1.4 EnsDb.Hsapiens.v86_2.99.0
[15] ensembldb_2.28.1 AnnotationFilter_1.28.0
[17] GenomicFeatures_1.56.0 AnnotationDbi_1.66.0
[19] Biobase_2.64.0 GenomicRanges_1.56.1
[21] GenomeInfoDb_1.40.1 IRanges_2.38.1
[23] S4Vectors_0.42.1 BiocGenerics_0.50.0
[25] Signac_1.14.0 Seurat_5.1.0
[27] SeuratObject_5.0.2 sp_2.1-4

loaded via a namespace (and not attached):
[1] ProtGenerics_1.36.0 matrixStats_1.5.0
[3] spatstat.sparse_3.1-0 bitops_1.0-9
[5] DirichletMultinomial_1.46.0 httr_1.4.7
[7] RColorBrewer_1.1-3 tools_4.4.0
[9] sctransform_0.4.1 backports_1.5.0
[11] R6_2.5.1 DT_0.33
[13] lazyeval_0.2.2 uwot_0.2.2
[15] withr_3.0.2 gridExtra_2.3
[17] progressr_0.15.1 cli_3.6.3
[19] spatstat.explore_3.3-4 fastDummies_1.7.5
[21] spatstat.data_3.1-4 readr_2.1.5
[23] ggridges_0.5.6 pbapply_1.7-2
[25] Rsamtools_2.20.0 foreign_0.8-86
[27] R.utils_2.12.3 dichromat_2.0-0.1
[29] parallelly_1.42.0 rstudioapi_0.17.1
[31] RSQLite_2.3.9 generics_0.1.3
[33] gtools_3.9.5 ica_1.0-3
[35] spatstat.random_3.3-2 GO.db_3.19.1
[37] Matrix_1.7-0 abind_1.4-8
[39] R.methodsS3_1.8.2 lifecycle_1.0.4
[41] yaml_2.3.10 SummarizedExperiment_1.34.0
[43] SparseArray_1.4.8 Rtsne_0.17
[45] glmGamPoi_1.16.0 grid_4.4.0
[47] blob_1.2.4 promises_1.3.2
[49] crayon_1.5.3 pwalign_1.0.0
[51] miniUI_0.1.1.1 lattice_0.22-6
[53] cowplot_1.1.3 annotate_1.82.0
[55] KEGGREST_1.44.1 pillar_1.10.1
[57] knitr_1.49 rjson_0.2.23
[59] future.apply_1.11.3 codetools_0.2-20
[61] fastmatch_1.1-6 leiden_0.4.3.1
[63] glue_1.8.0 spatstat.univar_3.1-1
[65] data.table_1.16.4 vctrs_0.6.5
[67] png_0.1-8 spam_2.11-1
[69] gtable_0.3.6 poweRlaw_0.80.0
[71] cachem_1.1.0 xfun_0.50
[73] S4Arrays_1.4.1 mime_0.12
[75] pracma_2.4.4 survival_3.5-8
[77] RcppRoll_0.3.1 fitdistrplus_1.2-2
[79] ROCR_1.0-11 nlme_3.1-164
[81] bit64_4.6.0-1 RcppAnnoy_0.0.22
[83] irlba_2.3.5.1 KernSmooth_2.23-22
[85] rpart_4.1.23 colorspace_2.1-1
[87] seqLogo_1.70.0 DBI_1.2.3
[89] Hmisc_5.2-3 nnet_7.3-19
[91] tidyselect_1.2.1 bit_4.5.0.1
[93] compiler_4.4.0 curl_6.2.0
[95] htmlTable_2.4.3 hdf5r_1.3.12
[97] DelayedArray_0.30.1 plotly_4.10.4
[99] checkmate_2.3.2 scales_1.3.0
[101] caTools_1.18.3 lmtest_0.9-40
[103] stringr_1.5.1 digest_0.6.37
[105] goftest_1.2-3 spatstat.utils_3.1-2
[107] rmarkdown_2.29 htmltools_0.5.8.1
[109] pkgconfig_2.0.3 base64enc_0.1-3
[111] sparseMatrixStats_1.16.0 MatrixGenerics_1.16.0
[113] fastmap_1.2.0 rlang_1.1.5
[115] htmlwidgets_1.6.4 UCSC.utils_1.0.0
[117] shiny_1.10.0 DelayedMatrixStats_1.26.0
[119] farver_2.1.2 zoo_1.8-12
[121] jsonlite_1.8.9 BiocParallel_1.38.0
[123] R.oo_1.27.0 VariantAnnotation_1.50.0
[125] RCurl_1.98-1.16 magrittr_2.0.3
[127] Formula_1.2-5 GenomeInfoDbData_1.2.12
[129] dotCall64_1.2 patchwork_1.3.0
[131] munsell_0.5.1 Rcpp_1.0.14
[133] reticulate_1.40.0 stringi_1.8.4
[135] zlibbioc_1.50.0 MASS_7.3-60.2
[137] plyr_1.8.9 parallel_4.4.0
[139] listenv_0.9.1 ggrepel_0.9.6
[141] deldir_2.0-4 CNEr_1.40.0
[143] splines_4.4.0 tensor_1.5
[145] hms_1.1.3 igraph_2.1.4
[147] spatstat.geom_3.3-5 RcppHNSW_0.6.0
[149] reshape2_1.4.4 TFMPvalue_0.0.9
[151] XML_3.99-0.18 evaluate_1.0.3
[153] tzdb_0.5.0 httpuv_1.6.15
[155] RANN_2.6.2 tidyr_1.3.1
[157] purrr_1.0.2 polyclip_1.10-7
[159] future_1.34.0 scattermore_1.2
[161] xtable_1.8-4 restfulr_0.0.15
[163] RSpectra_0.16-2 later_1.4.1
[165] viridisLite_0.4.2 tibble_3.2.1
[167] memoise_2.0.1 GenomicAlignments_1.40.0
[169] cluster_2.1.6 globals_0.16.3

Vignette of reproducible code is found here: https://rdrr.io/github/satijalab/seurat/f/vignettes/weighted_nearest_neighbor_analysis.Rmd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions