Refactor isotope/adduct models, add pyopenms/ms-deisotope helpers, and extend tests#316
Open
Refactor isotope/adduct models, add pyopenms/ms-deisotope helpers, and extend tests#316
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
pyopenmsandms_deisotopefor deisotoping/de-adducting.Description
vimms/Deisotoping.pyimplementing a pure-PythonDeisotoperclass and helpersdeisotope_with_pyopenms,deadduct_with_pyopenms, anddeisotope_with_ms_deisotopefor optional integrations.vimms/Chemicals.pyto replace the old carbon-only binomial model with a multi-element isotope convolution pipeline and add configurable parameters (min_prob,max_peaks,max_states,mass_precision), and extendAdductsto accept callable/default priors, adduct profiles, and Dirichlet concentration.vimms/Common.pyto addNATURAL_ISOTOPES, expandedADDUCT_TERMS,ADDUCT_PRIOR_POS/ADDUCT_PRIOR_NEG, andADDUCT_PROFILE_PRESETSused byAdducts.tests/test_deisotoping.pythat cover isotope distributions, the PythonDeisotoper, and additionalpyopenms-guarded cases for de-adducting multiple features and empty-input deisotoping.pyproject.tomlto declare optional integration dependenciesms-deisotopeandpyopenms.Testing
pytest -q tests/test_deisotoping.py, which attempted to execute the test file but the run failed withModuleNotFoundError: No module named 'numpy'raised while loadingtests/conftest.py, so the test suite could not complete.pyopenms-guarded tests are protected withpytest.importorskip("pyopenms")so they will only run in environments that havepyopenmsinstalled.Codex Task