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

[Feature request] Diagnostic information when a wrong mass mode is used #41

Closed jspaezp closed 1 year ago

jspaezp commented 1 year ago

https://github.com/bittremieux/spectrum_utils/blob/437acb764c90d3b1bf14ded1d56d72c912e5fe41/spectrum_utils/spectrum.py#L675-L677

This line makes it so that ... when passing a wrong mass mode ('da' instead of 'Da') in my case, it assumes it is ppm .... which makes a cutoff of 0.02 much too narrow in most use cases ... (took me a non-negligible amount of time to figure out why none of my peaks was getting annotated)

Would you mind adding checks such that there is a warning/error if a non-supported mass type is passed?

bittremieux commented 1 year ago

Makes a lot of sense! I'll add a check soon.