immunogenomics / symphony

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

prediction score #4

Closed padza21 closed 2 years ago

padza21 commented 3 years ago

Hello, I would like if there is any option similar to Seurat e.g. prediction score to evaluate the precision of prediction (label transfer). Thanks!

joycekang commented 3 years ago

Hi - thanks for your message! We currently don't have a prediction score implemented, but it is something we're actively developing. We recognize that it would be useful and hope to have it available soon.

padza21 commented 3 years ago

Thank you for answer, looking forward.

joycekang commented 3 years ago

Hello, just following up on this - we now have a prediction score option if you run knnPredict with confidence = TRUE, there will be a slot in the returned metadata (by default named cell_type_pred_knn_prob) that gives the proportion of reference nearest neighbors with the winning vote. This can help identify query cells falling "on the border" between two reference cell types.

dcruz5h commented 2 years ago

Dear Symphony Team, Thank you so much for all the work.

I followed your Seurat vignette (https://github.com/immunogenomics/symphony/blob/main/vignettes/Seurat.ipynb). I was able to map my query cells on my reference and it makes all sense biologically. Unfortunately my query object does not contain the Z, Zq_pca, and other values. As I wanted to use knnPredict with confidence = TRUE to generate a prediction scoring , I cannot do this first because Z values are missing and second because knnPredict.Seurat does not accept the "confidence = TRUE" option.

Are you planing to update your utils_seurat.R to add the "confidence = TRUE" option to knnPredict.Seurat command ? where would these Z, Zq_pca values be store in the return seurat object after running mapQuery and knnPredict.Seurat commands ?

joycekang commented 2 years ago

Hi @dcruz5h , Thanks for the suggestion and patience! We have just added the prediction confidence to the Seurat command: query <- knnPredict.Seurat(query, ref, 'seurat_clusters', confidence = TRUE)

vivekruhela commented 5 months ago

Hello,

Just started working in the single-cell data. Thanks for providing an amazing tool for scRNA data analysis.

I have got the prediction score for the query metadata. Now I have filtered out the cells having probability less than 0.5 to get the high confidence prediction. Now, in the reference object, each seurat_cluster is assigned to a cell type (e.g. NK, CD4, CD8, etc.). So, can we transfer the labels from reference to query object? Thanks