Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peak(s) not annotated within correct ppm #8

Closed
gpdann opened this issue Nov 14, 2019 · 2 comments
Closed

Peak(s) not annotated within correct ppm #8

gpdann opened this issue Nov 14, 2019 · 2 comments

Comments

@gpdann
Copy link

gpdann commented Nov 14, 2019

Hi,

I am using spectrum_utils to annotate spectra from an mzML file. I've noticed that certain peaks are not annotated when the fragment_tol_mass/fragment_tol_mode are set to correctly identify them. I've pasted a DropBox link with my code, mzML file, and a Powerpoint file with two spectra displaying the issue. The base peak in the spectrum I've chosen is the peptides b7+ ion, which I've verified from the raw data is 2-3 ppm off of the theoretical mass. The peak isn't annotated when the fragment_tol_mass is set to 10 ppm. It is annotated, however, when the fragment_tol_mass is set to 20 ppm.

Thanks,

Geoff

https://www.dropbox.com/sh/feoss7jqra5fsil/AACoHcZ9umTJQ3OnF6hVxcfJa?dl=0

@bittremieux
Copy link
Owner

Hi Geoff, thank you for supplying your code and data, it made it easy to investigate this issue.

According to my calculation the ppm error for the y7+ peak (I think you mean this one) is 10.047 ppm. So this is an edge case and if some other software rounds the masses you might see a different result. Increasing the ppm tolerance in your code snippet to 10.1 ppm indeed annotates the y7+ peak as well.

You mention 2–3 ppm, so for clarity I include my calculation below:

  • Theoretical mass y7+ (as calculated by Pyteomics): 802.3399611504701
  • Experimental mass: 802.3319
  • ppm difference: (802.3399611504701-802.3319)/802.3399611504701*1000000 = 10.04705095149588

This is really an edge case, because if you round the theoretical mass to the same precision as the observed mass, the ppm error would actually be 9.97 ppm.
But it doesn't seem like there's a bug in the code based on my calculations.

@gpdann
Copy link
Author

gpdann commented Nov 15, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants