RunCCA() crash
0
0
Entering edit mode
24 months ago
Beth ▴ 10

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)
integration scATAC Seurat RunCCA scRNA • 582 views
ADD COMMENT
0
Entering edit mode

how much memory do you have available?

ADD REPLY

Login before adding your answer.

Traffic: 2173 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6