Improve adduct/isotope generation [WIP] #315
Open
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.
WIP -- need human review
Motivation
UnknownChemicalbehavior unchanged so ROI-derived workflows are not altered.Description
vimms/Common.py(NATURAL_ISOTOPES,ADDUCT_PRIOR_POS,ADDUCT_PRIOR_NEG,ADDUCT_PROFILE_PRESETS).Isotopesinvimms/Chemicals.pyto compute isotope envelopes by element-wise convolution with exposed parameters (min_prob,max_peaks,max_states,mass_precision) for a fidelity/performance tradeoff.Adductsinvimms/Chemicals.pyto acceptadduct_profileandadduct_concentration(Dirichlet), support callable/ per-formula priors, apply cutoff + sum normalization, and propagated profile settings throughChemicalMixtureCreator.vimms/Deisotoping.pyimplementingDeisotoperwith multi-element isotope mass-diff candidates and intensity-aware clustering rules to support heavier-isotope patterns (e.g., Cl/Br M+2).tests/test_deisotoping.pycovering multi-element isotope generation, a chlorine M+2 check, and end-to-end deisotoping scenarios (including an M+2-only case).Testing
pytest -q tests/test_deisotoping.pywhich attempted to exercise the new isotope and deisotoper tests but failed withModuleNotFoundError: No module named 'numpy'in this environment and so the automated tests did not complete successfully.Codex Task