satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.31k stars 920 forks source link

RunCCA() crash #6749

Closed lizakulaeva closed 1 year ago

lizakulaeva commented 2 years ago

Hi, i want to RunCCA with my datasets for scRNA and scATAC assays (see test files attached here: https://drive.google.com/drive/folders/1C8zgkC_uNOPOc32dFKw6u6QF1n0UDB6R?usp=share_link). After running a function R session just crashes, how I can solve this problem?

Script for generating files (input for the script - SeuratObject for RNA and peaks assay (adrenal_EC in archive), fragment objects (listed as "sample 1 adrenal", "sample 16 adrenal", "sample 27 adrenal", "sample 31 adrenal" here: https://descartes.brotmanbaty.org/bbi/human-chromatin-during-development/), fragment index files (attached in archive).

Script:

library(Seurat) library(Signac) library(EnsDb.Hsapiens.v86) adrenal_EC <- subset(adrenal_EC, subset = nFeature_RNA > 200 & nFeature_RNA < 12500) frags1 <- CreateFragmentObject(path = "/fast/AG_Bunina/Lisa/R/sample_1_adrenal.fragments.txt.gz") frags16 <- CreateFragmentObject(path = "/fast/AG_Bunina/Lisa/R/sample_16_adrenal.fragments.txt.gz") frags27 <- CreateFragmentObject(path = "/fast/AG_Bunina/Lisa/R/sample_27_adrenal.fragments.txt.gz") frags31 <- CreateFragmentObject(path = "/fast/AG_Bunina/Lisa/R/sample_27_adrenal.fragments.txt.gz") fragpath = dir('/fast/AG_Bunina/Lisa/R/',"*gz$",full.names=TRUE) peaks<-GetAssayData(object = adrenal_EC, assay = "peaks", slot = "counts") assay_test <- CreateChromatinAssay(counts = peaks,fragments = list(frags1, frags16, frags27, frags31))

pbmc.rna <-CreateSeuratObject(adrenal_EC@assays[[1]]) pbmc.rna <- NormalizeData(pbmc.rna) pbmc.rna <- FindVariableFeatures(pbmc.rna) pbmc.rna <- ScaleData(pbmc.rna) pbmc.rna <- RunPCA(pbmc.rna) pbmc.rna <- RunUMAP(pbmc.rna, dims = 1:30)

annotations <- GetGRangesFromEnsDb(ensdb = EnsDb.Hsapiens.v86) seqlevelsStyle(annotations) <- "UCSC" genome(annotations) <- "hg38" Annotation(assay_test) <- annotations pbmc.atac <-CreateSeuratObject(assay_test, assay = "ATAC") pbmc.atac <- RunTFIDF(pbmc.atac) pbmc.atac <- FindTopFeatures(pbmc.atac, min.cutoff = "q0") pbmc.atac <- NormalizeData(pbmc.atac) pbmc.atac <- ScaleData(pbmc.atac, features = rownames(pbmc.atac))

testRNA <- subset(pbmc.rna, cells = colnames(pbmc.rna)[1:30]) testATAC <- subset(pbmc.atac, cells = colnames(pbmc.atac)[1:30])

saveRDS(testRNA, "testRNA.rds") saveRDS(testATAC, "testATAC.rds")

cca<-RunCCA(testATAC, testRNA)

SessionInfo:

R version 4.2.2 (2022-10-31) Platform: x86_64-unknown-linux-gnu (64-bit)

Matrix products: default BLAS/LAPACK: /gnu/store/xghpgl3fnr603z16vg7hldmpxygriqm2-openblas-0.3.20/lib/libopenblasp-r0.3.20.so

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

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

other attached packages: [1] EnsDb.Hsapiens.v86_2.99.0 ensembldb_2.22.0 AnnotationFilter_1.22.0
[4] GenomicFeatures_1.50.2 AnnotationDbi_1.60.0 Biobase_2.58.0
[7] GenomicRanges_1.50.1 GenomeInfoDb_1.34.3 IRanges_2.32.0
[10] S4Vectors_0.36.0 BiocGenerics_0.44.0 Signac_1.8.0
[13] sp_1.5-0 SeuratObject_4.1.2 Seurat_4.2.0

loaded via a namespace (and not attached): [1] fastmatch_1.1-3 BiocFileCache_2.6.0 plyr_1.8.7
[4] igraph_1.3.5 lazyeval_0.2.2 splines_4.2.2
[7] BiocParallel_1.32.1 listenv_0.8.0 scattermore_0.8
[10] ggplot2_3.4.0 digest_0.6.30 htmltools_0.5.3
[13] fansi_1.0.3 magrittr_2.0.3 memoise_2.0.1
[16] tensor_1.5 cluster_2.1.4 ROCR_1.0-11
[19] globals_0.16.1 Biostrings_2.66.0 matrixStats_0.62.0
[22] spatstat.sparse_3.0-0 prettyunits_1.1.1 colorspace_2.0-3
[25] rappdirs_0.3.3 blob_1.2.3 ggrepel_0.9.1
[28] dplyr_1.0.10 crayon_1.5.2 RCurl_1.98-1.9
[31] jsonlite_1.8.3 progressr_0.11.0 spatstat.data_3.0-0
[34] survival_3.4-0 zoo_1.8-11 glue_1.6.2
[37] polyclip_1.10-4 gtable_0.3.1 XVector_0.38.0
[40] leiden_0.4.3 DelayedArray_0.24.0 future.apply_1.9.1
[43] abind_1.4-5 scales_1.2.1 DBI_1.1.3
[46] spatstat.random_2.2-0 miniUI_0.1.1.1 Rcpp_1.0.9
[49] viridisLite_0.4.1 xtable_1.8-4 progress_1.2.2
[52] reticulate_1.26 spatstat.core_2.4-4 bit_4.0.4
[55] htmlwidgets_1.5.4 httr_1.4.4 RColorBrewer_1.1-3
[58] ellipsis_0.3.2 ica_1.0-3 pkgconfig_2.0.3
[61] XML_3.99-0.12 dbplyr_2.2.1 uwot_0.1.14
[64] deldir_1.0-6 utf8_1.2.2 tidyselect_1.2.0
[67] rlang_1.0.6 reshape2_1.4.4 later_1.3.0
[70] munsell_0.5.0 tools_4.2.2 cachem_1.0.6
[73] cli_3.4.1 generics_0.1.3 RSQLite_2.2.18
[76] ggridges_0.5.4 stringr_1.4.1 fastmap_1.1.0
[79] yaml_2.3.6 goftest_1.2-3 bit64_4.0.5
[82] fitdistrplus_1.1-8 purrr_0.3.5 RANN_2.6.1
[85] KEGGREST_1.38.0 pbapply_1.5-0 future_1.28.0
[88] nlme_3.1-160 mime_0.12 RcppRoll_0.3.0
[91] xml2_1.3.3 biomaRt_2.54.0 compiler_4.2.2
[94] rstudioapi_0.14 filelock_1.0.2 curl_4.3.3
[97] plotly_4.10.0 png_0.1-7 spatstat.utils_3.0-1
[100] tibble_3.1.8 stringi_1.7.8 rgeos_0.5-9
[103] lattice_0.20-45 ProtGenerics_1.30.0 Matrix_1.5-1
[106] vctrs_0.5.0 pillar_1.8.1 lifecycle_1.0.3
[109] spatstat.geom_3.0-3 lmtest_0.9-40 RcppAnnoy_0.0.20
[112] data.table_1.14.4 cowplot_1.1.1 bitops_1.0-7
[115] irlba_2.3.5.1 rtracklayer_1.58.0 httpuv_1.6.6
[118] patchwork_1.1.2 BiocIO_1.8.0 R6_2.5.1
[121] promises_1.2.0.1 KernSmooth_2.23-20 gridExtra_2.3
[124] parallelly_1.32.1 codetools_0.2-18 MASS_7.3-58.1
[127] assertthat_0.2.1 SummarizedExperiment_1.28.0 rjson_0.2.21
[130] GenomicAlignments_1.34.0 sctransform_0.3.5 Rsamtools_2.14.0
[133] GenomeInfoDbData_1.2.0 mgcv_1.8-41 parallel_4.2.2
[136] hms_1.1.2 grid_4.2.2 rpart_4.1.19
[139] tidyr_1.2.1 MatrixGenerics_1.10.0 Rtsne_0.16
[142] shiny_1.7.1 restfulr_0.0.15

lizakulaeva commented 1 year ago

I found an error.