Skip to content

[FEATURE] OpenNuXL: read Thermo .raw, Bruker timsTOF .d and mzPeak inputs natively, as ProSE does - #10816

Merged
timosachsenberg merged 2 commits into
developfrom
claude/clever-newton-qm8xrn
Nov 4, 2026
Merged

timosachsenberg merged 2 commits into
developfrom
claude/clever-newton-qm8xrn

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

OpenNuXL now reads Thermo .raw, Bruker timsTOF .d and mzPeak inputs through FileHandler, as ProSE does. Until now it accepted mzML,raw; a .raw went through the external ThermoRawFileParser (Mono/.NET), which writes <input>.raw.mzML beside the input.

src/topp/OpenNuXL/OpenNuXL.cpp

  • Inputs: -in accepts mzML and raw, d under WITH_OPENTIMS and mzpeak under WITH_MZPEAK, as ProSE.cpp does. A .d directory passes the -in check as in FeatureFinderIdentification.
  • Loading: every load of the input goes through FileHandler::loadExperiment with {MZML, RAW, BRUKER_TDF, MZPEAK} (new helper loadSpectra_), keeping each site's PeakFileOptions. This covers the precursor purity, pcrecalibration, spectrumclusterfilter, the autotune reload, the main MS2 load, the post-processing reload and the RT predictor's MS1 load. in_mzml is renamed to in_spectra.
  • .raw:
    • With WITH_THERMO_RAW it is read in-process with Thermo's peak picking, as FileConverter and ProSE do, so no mzML conversion is written beside it.
    • Without WITH_THERMO_RAW, convertRawFile_ runs unchanged.
    • Every run, whatever the format, still writes <input>.ambiguous_masses.csv beside the input, as before.
  • .d:
    • DDA-PASEF MS2 spectra come one per precursor, centroided, with the precursor's 1/K0 at spectrum level. OpenNuXL's existing IM handling (1/K0 → CCS, the IM feature) applies unchanged.
    • Native IDs are frame=… scan=… precursor=….
    • Precursors without an assigned charge come out as charge 0 and are skipped by precursor:min_charge.
    • The precursor purity is not computed for .d: BrukerTimsFile leaves MS1 frames uncollapsed over ion mobility, so the other IM slices would count as interference. precursor_purity is then left out of the Percolator features, which already happens whenever purities are empty.
  • Path handling: inputPath_() strips a trailing / from -in, so outputs named after the input (_pc.mzML, .ambiguous_masses.csv) don't land inside a .d directory.
  • Docs: the tool description covers the formats, the build options and the behaviour above (with \<input\> escaped for doxygen).

src/openms/source/ANALYSIS/ID/SimpleSearchEngineAlgorithm.cpp: accepts FileTypes::MZPEAK, because OpenNuXL's default autotune and idfilter steps search the input with it.

src/tests/topp/CMakeLists.txt (all guarded like TOPP_ProSE_raw, so they run only with the test data):

  • Thermo test data (ENABLE_THERMO_RAW_TESTS):
    • TOPP_OpenNuXL_raw searches a copy of the Angiotensin .raw against ProSE_raw_database.fasta.
    • _raw_check requires the hit DRVYIHPFHL and Thermo native IDs.
    • _raw_convert / _raw_mzML / _raw_out1 check with FuzzyDiff that native .raw and its FileConverter mzML give the same idXML.
  • OpenTIMS test data (ENABLE_OPENTIMS_TESTS):
    • TOPP_OpenNuXL_DDA searches the DDA HeLa .d with -NuXL:length 0, against a database reduced to ProSE's identified proteins (DatabaseFilter).
    • _DDA_check requires frame= native IDs and the IM feature.
    • TIMEOUT 3600, as TOPP_ProSE_FAIMS_DDA.

Testing

  • CI (default build) passes: build-and-test on Linux (g++, clang++, arm64), macOS and Windows, all pyOpenMS wheels and their tests (Python 3.11–3.14), cppcheck, header-set compatibility, and the Doxygen warning test. The existing TOPP_OpenNuXL_* tests (mzML inputs) are unchanged.
  • Not yet run: the new .raw/.d tests. They need a build with WITH_THERMO_RAW / WITH_OPENTIMS and the test data switched on (ENABLE_THERMO_RAW_TESTS, ENABLE_OPENTIMS_TESTS), which the default CI doesn't have, and this was written in an environment that cannot build OpenMS locally. Open questions for that run:
    • whether DRVYIHPFHL is found;
    • whether native .raw and its mzML match under the FuzzyDiff whitelist;
    • the runtime of the HeLa .d test;
    • whether -NuXL:length 0 runs cleanly through the cross-link FDR and Percolator steps.

Context: requested by Timo Sachsenberg for NuXL desktop (timosachsenberg/nuxl-gui), which bundles OpenNuXL and will offer .raw and .d inputs once this is in.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes (not built locally; CI's default build passes, see Testing)
  • Updated or added python bindings for changed or new classes (no updates necessary)

Generated by Claude Code

Doxygen took '<input>' in the description of the input formats for an HTML
tag (Doxygen_Warning_test: 'Unsupported xml/html tag <input>' at 743, 751,
753); written as \<input\> now.
@timosachsenberg
timosachsenberg marked this pull request as ready for review November 4, 2026 20:47
@timosachsenberg
timosachsenberg merged commit f358100 into develop Nov 4, 2026
31 of 32 checks passed
@timosachsenberg
timosachsenberg deleted the claude/clever-newton-qm8xrn branch November 4, 2026 20:48
timosachsenberg pushed a commit that referenced this pull request Nov 5, 2026
Brings in #10804 (ProSE automatic mass tolerances), #10816, #10818 and
#10801. Conflict in FragmentIonLikelihoodModel_test.cpp: #10804 added a
test that matchIons() skips series codes other than 0 and 1, written
against the std::vector<uint8_t> overload this PR replaces. Ported it to
Residue::ResidueType (Residue::Full, a type of no ion series, instead of
series code 2), as the PR description planned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0149aXmYNxvjPfKVo7PmGAme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants