immunogenomics / symphony

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

UMAP from reference is not transfered to samples - Symphony Seurat #25

Closed NK-HD closed 1 year ago

NK-HD commented 2 years ago

Dear Symphony Team,

please excuse me opening another issue on this topic! Following your vignette (https://github.com/immunogenomics/symphony/blob/main/vignettes/Seurat.ipynb) i managed to run the complete script without errors (I rerun the RunHarmony.Seurat on my existing (already before to umap processed) object and then followed the vignette).

However the resulting query UMAP looks like this: 73927f34-3d28-4756-9b31-5de4554b5d4a

Running the vignette works fine and i can also map my query data on your reference. So the problem appears to be during the reference construction. In the generation of my refobject I removed some confounding genes from the ScaleData and RunPCA step. I noticed that in order for the script to run without errors I have to remove those also from the variable features in the refobject, but I kepp getting this very wird umap after mapquery. (The initial umap before reference building looks fine)

Do you have any idea what could cause this error?

Thanks a lot for your help!!! I realy appreciate it! Best, Niklas

joycekang commented 2 years ago

Hi Niklas,

Thanks for your message! I'm not entirely sure what is causing this error - would you mind trying it again but removing the confounding genes prior to the variable gene selection part? Perhaps there is something buggy in the way you are manually removing them (though it's doubtful it would have such a large effect). Secondly, when you run FindNeighbors and RunUMAP2, are you sure that it's being run on the embedding = 'harmony' and not the PCA embedding?

joycekang commented 1 year ago

Closing this issue, but feel free to reopen if still not resolved!