loomR icon indicating copy to clipboard operation
loomR copied to clipboard

how to merge 6 loom file?

Open dmsalsgh97 opened this issue 3 years ago • 2 comments

Hi, first of all, thanks for developing Seurat and wrappers! It is awesome.

I'm analyzing 6 samples with Seurat's SCTransform integration method. Now, I'm trying to project velocyto's output on the umap embedding of the SCTransform integrated Seurat obj.

First, I tried to merge 6 individual .loom files generated by scvelo.py CLI on 10x output. BUT, When I tried it following @velocyto-team/velocyto.R#54, it needs huge memory and causes MEM allocation error. (exceeds 100Gb, and I think it is strange...)

sample1 <- ReadVelocity(file = ".../1-sample.loom") sample2 <- ReadVelocity(file = ".../2-sample.loom") bm <- merge(x = sample1, y = sample2, merge.data = TRUE) Error in asMethod(object) : Cholmod error 'out of memory' at file ../Core/cholmod_memory.c, line 146

image

My second thought was to aggregate 6 10x outputs using cellranger-aggr and run scvelo.py CLI on the aggregated 10x output and project it on seurat integrate object's umap.

Thanks,

dmsalsgh97 avatar Apr 22 '21 01:04 dmsalsgh97

Hi!

It's too late to reply now but providing a solution to this problem in case somebody else faces the same issue in future. You can convert the loom object to Seurat Object and then merge the two files. For example,

sample1 <- ReadVelocity(file = ".../1-sample.loom") sample2 <- ReadVelocity(file = ".../2-sample.loom") sample1_seurat <- as.Seurat(x = sample1) sample2_seurat <- as.Seurat(x = sample2) bm <- merge(x = sample1_seurat, y = sample2_seurat, merge.data = TRUE)

Let me know if this doesn't work.

poddar19 avatar Aug 04 '21 11:08 poddar19

@poddar19 I am wondering if batch effect in the merged object should be regress out? The thing is that after regressing out batch effect with Seurat Integration process, I lost my spliced and unspliced assays. What do you think?

Thanks in advance!

jordan841220 avatar Feb 01 '23 05:02 jordan841220