metaspace2020 / metaspace

Cloud engine and platform for metabolite annotation for imaging mass spectrometry
https://metaspace2020.eu/
Apache License 2.0
44 stars 9 forks source link

[Bug] Debugging number of annotations after software pixel shift #1527

Open Bisho2122 opened 2 months ago

Bisho2122 commented 2 months ago

https://metaspace2020.eu/project/cc9ebe2a-0876-11ef-86c1-d322eda885b4?tab=datasets

Bisho2122 commented 2 months ago

Sent the following to Mikhail

I have looked into it and it's not a software problem, it's mainly in the calculation of the feature scores constituting the msm score. One of the measures in msm score is the "Spatial isotope measure" which you can read more about in our previous article (https://www.nature.com/articles/nmeth.4072#Sec2). Quoting from the text, The spatial isotope measure quantifies the spatial similarity between the ion images of isotopic peaks, composing a signal for a sum formula. It's a correlation between the most intense isotope peak (Theoritical intensity) and the rest of the isotopes.

In some cases, the first isotope has mostly zero intensity pixels while the second/third isotope has more non-zero pixels, when you shifted the pixels, this increased the correlation because more zeros were matched across the edges of the tissue (see attached images for C18H16O6-H) thus increasing the spatial isotope score which in turn made the msm score higher. When there was no shift, the spatial score was significantly lower leading to an msm score closer to zero and this affects it's ranking among the decoys which explains why you get less annotations when you don't shift the pixels.

image (8) image (7)