bittremieux / spectrum_utils

Python package for efficient mass spectrometry data processing and visualization
https://spectrum-utils.readthedocs.io/
Apache License 2.0
130 stars 21 forks source link

Get a less rounded mz_delta value in ppm for annotations? #59

Open levitsky opened 5 months ago

levitsky commented 5 months ago

Hi, thank you once again for this package. I am currently using it for some bulk annotations and, due to the rounding of ppm values to 1 decimal digit, I get very discrete values, which is not ideal for statistical analysis. Do you think it would be possible to enable more digits somehow?

I think this line is relevant:

https://github.com/bittremieux/spectrum_utils/blob/826f7701125086d7ed540337f1e351f232ac3bb3/spectrum_utils/spectrum.py#L736

Thank you!

bittremieux commented 5 months ago

Yes, that makes total sense. I initially used rounding to have some pretty plotting results,. But it's much better to do that in the plotting code then (and probably even have this behavior be user-configurable), and not use any rounding in the actual annotation.