immunogenomics / symphony

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

L2 norm for cos distance for per cluster confidence score #42

Open potulabe opened 1 year ago

potulabe commented 1 year ago

Hi! First of all, thank you very much for this beautiful tool! I was investigating how it works in detail while porting it to Python, and I wonder if it is an inaccuracy here in the calcPerClusterMappingMetric function, where you are finding the nearest reference centroid using cos distance, but the reference centroids have not been L2 normalised. The results are quite different if L2 normalisation is done (here using our Python implementation): image