plger / scDblFinder

Methods for detecting doublets in single-cell sequencing data
https://plger.github.io/scDblFinder/
GNU General Public License v3.0
153 stars 18 forks source link

how to get layers info after running scDblFinder #102

Closed IrinaVKuznetsova closed 5 months ago

IrinaVKuznetsova commented 6 months ago

Hi, I'd like to clarify how do I get a Seurat v.5 object back with all layers information after running scDblFinder function? As we get all layers merged and saved under assays(2): counts logcounts.

Option 1 - to use split

seurat[["RNA"]] <- split(seurat[["RNA"]], f = "orig.ident") 
error:  ! Not enough splits for this assay

Option 2 1) read Seurat object v.5 (with layers, and doublets were not removed 2) Read Seurat object where doublets were removed (Seurat v.3 NO layers info) 3) Subset 1) to 2) 4) Add all info generated by scDblFinder to 3)

apology if I missed an easier way of coming back to Seurat v.5 with layers after removing doublets.

Thanks

plger commented 6 months ago

Hi, I don't really understand your question. The only thing scDblFinder adds to the input object are the colData columns, e.g. scDblFinder.score and scDblFinder.class. These you can simply transfer to your original Seurat object as explained in the vignette. If that doesn't address your question, please clarify it / what you need. plger

plger commented 5 months ago

Will close this issue unless you want to clarify your question.