-
Notifications
You must be signed in to change notification settings - Fork 9
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
unclear getMass() semantics #8
Comments
This would be a unit test for this case
|
Using the example by Dzmitry Mukha,
Issue is that Rdisop reports
http://www.envipat.eawag.ch/index.php also agrees that the monoisotopic mass should be |
Comment on the code: |
Well, I have an R-only fix that will likely slow down the function, but works. I am pretty lost in the C code... I am decomposing the molecular formula using a function from the CHNOSZ package, but I am sure this can be ported over. Can't say it is an elegant fix, but this is how the calculations can be done. I will keep looking at the C code to see if I can find where this might be happening, to enable selection there.
|
Some observations:
I was thinking 1. initially, but I don't think that is the problem. Rather, I suspect 2 as the most likely right now. |
This is an old discussion. However, I would like to contribute my two cents and make a suggestion to close it. :)
Hence, I would suggest to update the documentation to clarify this. @cbroeckl already suggested a workaround function to compute the monoisotopic mass (MIM). While he used the Specifically, I would extend Rdisop by a new exported function @sneumann let me know if I shall prepare a PR implementing the above solution. Bests [jan] |
Hi Jan, thanks for picking this up ! |
I created a PR (v1.65.4). Once accepted, #8 could be closed. |
Reported by Dzmitry Mukha:
Indeed,
getMass()
is reporting the mass of the most abundant isotope,which is the same as the monoisotopic mass for individual element atoms.
However, for molecules, this is not neccessarily the monoisotopic mass,
which might be the expected result. For the molecule monoisotopic mass,
the sum of the monoisotopic element masses would have to be considered.
See also https://en.wikipedia.org/wiki/Mass_(mass_spectrometry)#Monoisotopic_mass
for definitions and examples.
The text was updated successfully, but these errors were encountered: