Skip to content

add functionality to parse spectra directly from ms2spectrum objects …#253

Merged
RalfG merged 5 commits intorelease/4.2from
ms2rescore-compatibility
Mar 26, 2026
Merged

add functionality to parse spectra directly from ms2spectrum objects …#253
RalfG merged 5 commits intorelease/4.2from
ms2rescore-compatibility

Conversation

@ArthurDeclercq
Copy link
Copy Markdown
Contributor

@ArthurDeclercq ArthurDeclercq commented Jan 9, 2026

This pull request introduces a new function to the core processing workflow of the ms2pip package, enabling direct handling of PSMs (peptide-spectrum matches) that already have attached MS2Spectrum objects. Additionally, it makes necessary imports and updates the package's public API to expose this new functionality.

New processing function for pre-attached spectra:

  • Added the process_MS2_spectra function to core.py, allowing users to process PSMs with pre-attached MS2Spectrum objects, including spectrum extraction, prediction, and optional correlation computation. This function streamlines workflows where spectra are already parsed and available in memory, like within ms2rescore.

API and import updates:

  • Imported MS2Spectrum from ms2rescore_rs in core.py to support the new processing function.
  • Added process_MS2_spectra to the package's public API in __init__.py, making the new processing capability accessible to users.

@RalfG RalfG added the feature label Feb 10, 2026
@RalfG RalfG added this to the v4.2.0 milestone Feb 10, 2026
RalfG added 2 commits March 25, 2026 11:53
…ized

Integrate the MS2Spectrum processing path with the existing parallelized
infrastructure instead of duplicating XGBoost and encoding logic. Extract
shared per-PSM processing in _process_spectra into a helper function to
support both file-based and preloaded spectrum lookups.
@RalfG RalfG changed the base branch from releases to release/4.2 March 26, 2026 12:54
@RalfG RalfG merged commit 4d0ba83 into release/4.2 Mar 26, 2026
5 checks passed
@RalfG RalfG deleted the ms2rescore-compatibility branch March 26, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants