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

Precursor m/z value fix #283

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

liannette
Copy link

Fix #282

Major changes:

  • load correct precursor m/z values from MGF file
  • add precursor charge as Spectrum attribute

@liannette liannette changed the title Mz mass fix Precursor m/z value fix Nov 5, 2024
f"Assuming charge is 1 for spectrum '{self._file}'."
)
charge = 1
return charge
Copy link
Author

@liannette liannette Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this method was necessary because the precursor charge was used as divisor and it is not possible to divide by 0.

In any case, the charge is expected to never be 0, but if that's the value in the MGF file, I think it should be kept.

@liannette liannette marked this pull request as ready for review November 5, 2024 15:42
@liannette
Copy link
Author

@CunliangGeng I would like to add you as reviewer

@justinjjvanderhooft
Copy link

@liannette I just did (Cunliang is on holidays till next week Wednesday)

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

Successfully merging this pull request may close these issues.

Incorrect precursor m/z when loading MGF file from GNPS
2 participants