Skip to content

PeakPickerIM: Aggregate Scans Across RT in .d file access mode #9130

Closed

Description

@alhigaylan

Enhancement Description

This recent PR #9022 introduced support for Bruker .d built-in IM centroiding. We wish to extend this feature to support peak picking in DIA format. We wish to apply peak picking on both MS1 and MS2 spectra. Peak picking in MS2 is particularly tricky due to the low signal-to-noise ratio.

One possible solution is to aggregate raw peaks across retention time to improve the signal-to-noise ratio. This idea is implemented in the TOPP tool SpectraMerger. Briefly, for some spectrum X, it aggregates peaks from neighboring spectra with a weighted Gaussian Kernel. The tool was developed for regular DIA data. The presence of Ion Mobility dimension requires minor modifications to the algorithm.

In my local branch, PeakPickerIM, I borrowed the algorithms of SpectraMerger with the following modifications:

  1. In SpectraMerger, for profile (aka raw) mode, merge_spectra bins the m/z dimension. This is tricky to do with ion mobility data.

My solution was to aggregate peaks as-is and preserve the per-peak m/z --- ion mobility relationship. Once aggregation is done, sort by m/z. The mobilogram method within PeakPickerIM was designed to handle multiple peaks with the same m/z and ion mobility value. It uses SumFrame() function to collapse peaks.
This approach creates an inflated spectrum after aggregation. To avoid that, I apply peak picking and discards the inflated aggregated spectrum immediately.

Since the .d file already bins the data, maybe SpectraMerger's binning approach is applicable.

  1. Determining MS2 DIA window blocks. I decided not to code PeakPickerIM to determine MS2 blocks. I think this process can be done by an external tool. For example, in diaWeaver, there is determineWindows helper function that detects DIA isolation windows. It creates new MSExperiment() objects and feeds it to PeakPickerIM. I think this makes PeakPickerIM code cleaner and safe to use as a stand-alone tool. External tools like diaWeaver override this check by passing MS2 spectra as MS1. The user is never exposed to this intermediate data and there is no risk of outputting MS2 data as MS1.

Activity

  1. coderabbitai commented on Apr 11, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #8758 - Add Ion Mobility Support to FeatureFinderMetabo [merged]
    #9018 - feat: add IM_PEAK format checks to four TOPP tools [merged]
    #9022 - feat: add Bruker .d file support and built-in IM centroiding to PeakPickerIM [merged]
    #9030 - feat(ProteomicsLFQ): add Bruker .d (TimsTOF PASEF) support with Biosaur2 seeding [merged]
    #9129 - feat: Bruker DIA MS2 frame aggregation, denoising, and OpenSwath streaming [closed]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    ✅ Successfully generated implementation plan.

    💡 Use @coderabbitai <feedback> to replan


    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. coderabbitai commented on Apr 12, 2026

    @coderabbitai
    Contributor

    Caution

    CodeRabbit encountered an error during planning. Please try again later.

  3. alhigaylan commented on Apr 17, 2026

    @alhigaylan
    CollaboratorAuthor

    This was addressed in #9160 , #9158 , #9154 , #9151 by Timo. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions