Skip to content

Feat: Add precursor ion signal percentage feature #145

@JemmaLDaniel

Description

@JemmaLDaniel

Summary:

Add Precursor Ion Signal Percentage Feature

Description

Calculate the percentage of total MS2 signal intensity from the unfragmented precursor ion.

Background: What This Feature Measures

In MS2 spectra, the precursor ion should fragment into many pieces (b-ions, y-ions, etc.). However, sometimes fragmentation is incomplete and a strong signal from the unfragmented precursor ion remains in the MS2 spectrum.

This feature will measure the percentage of the total MS2 signal is still coming from the precursor ion itself.

  • High percentage = Poor fragmentation, most signal is still the precursor
  • Low percentage = Good fragmentation, precursor broke into many fragments

This provides an orthogonal quality dimension to help the calibrator distinguish between:

  • Genuine high-quality matches
  • Artificially inflated matches due to precursor contamination
  • Poor spectra vs. incorrect sequence assignments

Implementation

Steps:

  • Add a new feature to winnow/calibration/calibration_features.py
    1. For each spectrum, get the precursor m/z from dataset.metadata["precursor_mz"]
    2. Find all peaks in the MS2 spectrum (mz_array, intensity_array) that match the precursor m/z within tolerance
    3. Sum the intensity of matching peaks
    4. Calculate: (precursor_intensity / total_spectrum_intensity) * 100
  • Can reuse existing ion matching patterns (see find_matching_ions())

Expected Output

  • New column precursor_signal_percentage in calibration dataset and metadata output file

Description & Purpose:

No response

Additional Notes:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions