immunogenomics / symphony

Efficient and precise single-cell reference atlas mapping with Symphony
GNU General Public License v3.0
95 stars 22 forks source link

Cannot use buildReferenceFromSeurat with RunHarmony v1.0.3 #50

Open dy-lin opened 5 months ago

dy-lin commented 5 months ago

I am trying to build a symphony reference using an existing Seurat object that I've already run harmony on.

However, RunHarmony no longer produces anything in the misc slot of the reduction, so I cannot do any of the calculations that have to do with res$R <- t(obj@reductions$harmony@misc$R[colnames(obj),])

If I try to use the RunHarmony.Seurat provided in the vignette, I run into issue #48

I want to avoid downgrading my Harmony version. Is there a way to access what was stored in the misc$R slot in the updated RunHarmony command? If the R variable is no longer stored in later versions of Harmony, is it really necessary for reference building in Symphony?

maestriev commented 2 months ago

Were you able to find a work around for this? I am using harmony 1.2.0 and Seurat 5.1.0. I've already run harmony on an existing Seurat object and annotated my reference cells. I was also planning to use symphony to map new datasets; however, I also noticed this issue about missing the misc$R slot. Thanks!

srt.sct = RunHarmony(srt.sct, assay.use="SCT", group.by.vars = "sampleid.pid", reduction.save = "rna_sct_harmony")