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

Mismatch between adduct and ionmode after filtering pipeline #589

Open
niekdejonge opened this issue Dec 11, 2023 · 2 comments
Open

Mismatch between adduct and ionmode after filtering pipeline #589

niekdejonge opened this issue Dec 11, 2023 · 2 comments

Comments

@niekdejonge
Copy link
Collaborator

@Philipbear reached out to show some mistakes in the cleaned pipeline.

Some adduct forms are not consistent with ion mode & charge. E.g., CCMSLIB00000001723 (below). In this case, the adduct looks like to be [M]+. I guess this is raised due to the tiny mass of electron. It would be good if adduct, ion mode and charge are consistent among each other.
image

One more example is CCMSLIB00000007028. Adduct is [M+K-2H]-, yet it is in positive ion mode. I think in case it would be [M+K-H2]+.
image

To solve this I propose the following two solutions:

  • Adding a filter that requires charge, ionmode and adduct charge to match. We already have many repair filters that derive the charge or ionmode from adducts when this field is missing, but we should also remove spectra that have a mismatch between them.
  • We currently allow the repair_adduct_based_on_smiles to repair adducts even if this does not match the Ionmode for this spectrum. This should not be the case, since there is an increased risk of repairing adducts in the wrong way. So we should only searched in adducts that match the ionmode given for the spectrum.
@hechth
Copy link
Collaborator

hechth commented Jan 17, 2024

How do you repair adduct based on SMILES? Do you expect the SMILES to include the adduct? I thought the SMILES should normally represent the whole molecule?

@niekdejonge
Copy link
Collaborator Author

We compare the smiles to the precursor mz and if the mass difference matches a common adduct the adduct and parent mass are updated accordingly. The smiles are indeed expected to represent the whole molecule.

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

No branches or pull requests

2 participants