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

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

Open
levitsky opened this issue Feb 7, 2024 · 4 comments
Open

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

levitsky opened this issue Feb 7, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@levitsky
Copy link

levitsky commented Feb 7, 2024

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
Copy link
Member

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.

@bittremieux bittremieux added the enhancement New feature or request label Feb 10, 2024
@bittremieux bittremieux added the good first issue Good for newcomers label Mar 4, 2025
@dikshant182004
Copy link

dikshant182004 commented Mar 20, 2025

hi @bittremieux ;so we just need to remove the hard coded round funtion from the line or we need to add a user configurable option (either through a function argument or a configuration setting) that lets users choose how many decimal places to display or they wanna work with full precision etc.

@bittremieux
Copy link
Member

The appropriate fix is probably to not round in the line mentioned above, but only when printing or plotting the delta m/z values.

@dikshant182004
Copy link

okay got it .i will try to update it .

should i make it user configurable(new funtion parameter) like when the user ask for ploting or printing then only it do rounding of values otherwise not .
or just adjusted based on previous flow only with few changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants