Repository navigation
[FIX] FileHandler: read Thermo .raw with the vendor peak picking, like FileConverter - #10303
Conversation
…e FileConverter FileConverter and ThermoRawFileParser centroid .raw files by default, but FileHandler::loadExperiment() used ThermoRawFile's default, which keeps the scans as acquired. The other tools that read .raw (ProteomicsLFQ, OpenSwathWorkflow, CometAdapter, SageAdapter, SimpleSearchEngine, ProSE, the feature finders, ...) therefore got profile MS1 spectra where they expect centroided data: ginkgotoxin-ms-switching.raw gave 174162 instead of 11813 peaks. FileHandler now sets ThermoRawFile::Options::centroid. ThermoRawFile keeps its default, so C++ and pyOpenMS code can still read the scans as acquired, and FileConverter -RawToMzML:no_peak_picking still writes profile mzML. Tools that centroid on their own (ProteomicsLFQ, OpenPepXL, FeatureFinderMultiplex) detect centroided spectra and pass them through. Tests: a pyOpenMS test, which the wheel CI runs on Angiotensin_AllScans.raw, and a ThermoRawFile_test section (THERMO_RAW_TEST_DATA fixture) check that every spectrum FileHandler returns is centroided, that the native IDs match ThermoRawFile's and that the profile MS1 scans lose peaks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughFileHandler now enables Thermo peak picking when it loads Thermo ChangesThermo RAW loading
Priority: ➖ Normal Change: Bug fix Merge Risk: ⚪ Minimal · up to Thermo RAW files loaded through FileHandler now receive peak picking, while the documented ways to retain acquired scans remain available. The change is ready for normal merge checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change affects a widely used loading API, but the reviewed code does not show a new access path or elevated authority. Downstream behavior and handling of untrusted RAW files have not been fully assessed. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 6 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit watched the spectra flow, Comment |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
…cking With #10303 the tools that read .raw through FileHandler apply Thermo's peak picking, like FileConverter. The OpenMS and pyOpenMS vendor pages no longer say that they get the spectra as acquired, and the pyOpenMS example shows ThermoRawFile's default (profile MS1) next to its centroid option. Also two nits: in topp-tools.md the sentence on compressed files hung off the Parquet bundles, which cannot be read compressed; it now names the XML formats except mzIdentML, and the vendor line mentions .d.zip. file-handling.md: "the the". Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
…and imzML (format pages) (#10293) * [DOC] Document the Thermo and Bruker readers (vendor formats pages) Release-readiness check E4: 3.6 reads Thermo .raw files and Bruker timsTOF .d directories directly, but no user page said which tools do, how, and what they need. - New getting-started/vendor-formats.md (OpenMS docs): the tools that read .raw and .d, FileConverter's two Thermo readers and their per-platform defaults, that the other tools read .raw without vendor peak picking (and so need .NET 8 on Windows too), .d.zip, and the optional Bruker SDK. - New user_guide/vendor_formats.rst (pyOpenMS): FileHandler, ThermoRawFile with its options, BrukerTimsFile and its Config. The examples were run against the 2026-09-27 nightly wheel with a Thermo and a timsTOF file. - Corrected pages: FileConverter (option names, mono not in the packages, .d, input list), FeatureFinderIdentification and FeatureFinderMetaboIdent (timsTOF data no longer needs msconvert), the .d tool list of WITH_OPENTIMS, the Windows installation page (FileConverter's default runs on the .NET Framework; the other tools need .NET 8), and the macOS installation page (macOS 15 and Apple silicon; the installer is notarized since 3.6). - Both Sphinx configurations said 3.5.0, and the OpenMS one excluded the include-only snippets under a path that no longer exists, so they were built as pages of their own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7 * [DOC] Document compressed files, the Parquet bundles and imzML (file formats page) Release-readiness check E4: three 3.6 headline features had no user page. - New getting-started/file-formats.md: - compressed input: which formats tools read as .gz/.bz2/.zip, that a ZIP must hold one file, and that .mzid.gz cannot be read in 3.6; - compressed output: only mzML, mzXML, mzData, featureXML, consensusXML, traML and mzIdentML are written compressed (.gz/.bz2, lower case); idXML, trafoXML and the low-memory mzML writers are not, and .zip never is; - the .idparquet, .featureparquet and .consensusparquet bundles: their files, the tools that read or write them, conversion routes, ParquetDiff; - imzML: library and pyOpenMS only, no TOPP tool yet. Every statement was checked against the 2026-09-27 nightly wheel or the tools' setValidFormats_ calls. - TOPP tools overview and File handling pages, and TextExporter's brief, list the Parquet bundles. - CHANGELOG: the imaging readers are library/pyOpenMS only, and compressed output and .zip input are not universal as the entries implied. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7 * [DOC] Vendor formats: the other tools read .raw with Thermo's peak picking With #10303 the tools that read .raw through FileHandler apply Thermo's peak picking, like FileConverter. The OpenMS and pyOpenMS vendor pages no longer say that they get the spectra as acquired, and the pyOpenMS example shows ThermoRawFile's default (profile MS1) next to its centroid option. Also two nits: in topp-tools.md the sentence on compressed files hung off the Parquet bundles, which cannot be read compressed; it now names the XML formats except mzIdentML, and the vendor line mentions .d.zip. file-handling.md: "the the". Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7 --------- Co-authored-by: Claude <[email protected]>
Since #10303, FileHandler reads Thermo .raw files centroided, as FileConverter does by default, so the tool page's "spectra are used as they are stored" now holds for mzML input only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj
…#10271) * [FEATURE] DIAuditor: DIA quality metrics per run and isolation window New TOPP tool re-implementing DIAuditor by David L. Tabb (https://github.com/dtabb73/DIAuditor) on top of the OpenMS mzML reader. The metrics live next to the tool (src/topp/DIAuditor, DIAQCMetrics) and each input is streamed: only a small record per spectrum is kept. Outputs: DIAuditor's per-run and per-window tables (same columns, plus run-level MS2 statistics and the ion mobility range of each window) and an mzQC file with one runQuality per run. The mzQC uses only PSI-MS QC terms (MS:4000190-4000199 and others) with their units; per-window values stay in the table, as the vocabulary has no term for them. It passes the pymzqc syntax check (mzQC 1.0 schema incl. date-time/uri formats) and semantic check. Windows are keyed by the isolation window of the first precursor, the FAIMS compensation voltage and the ion mobility range of diaPASEF frames; the ion mobility of a single TIMS scan is not a window setting. The tool warns about single ion mobility scans, multiplexed precursors, spectra without retention time and runs that do not look like DIA. Differences to the original: scan times in seconds are converted, a FAIMS voltage is attributed to its own spectrum, only MS2 spectra form windows, missing TIC values fall back to the sum of intensities (option -tic), runs and windows with few spectra report NA instead of crashing, medians of times are true medians. Options -tic file, -peak_count all and -ion_mobility faims reproduce DIAuditor's data access. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj * [DOC] CHANGELOG: add PR number of DIAuditor Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj * [FIX] DIAuditor: address code review; mzML reader ends progress of partial reads DIAuditor: - A spectrum counts as a single ion mobility scan only if it has an ion mobility of its own but neither a frame ion mobility range nor an ion mobility array, so combined diaPASEF frames no longer trigger that warning. - Values that define an isolation window are matched within 1e-6 (as in OpenSWATH) instead of by exact equality. - mzQC file URIs are built from the UTF-8 form of the path (to_path(), generic_u8string()); a backslash is no longer turned into '/' on POSIX. - The "measured only once" warning counts windows with a single MS2 spectrum. - Peak count quartiles are taken as in DIAuditor (positions n/4, n/2, n/4 + n/2). - The computed TIC is summed in double precision (MSSpectrum::calculateTIC() sums in float); this changes the computed TICs of the OpenSwath test input. - The multiplexing and ion mobility scan counters include MS2 spectra without RT. - Progress is reported while reading (MzMLFile::setLogType). - The creation date uses DateTime's "Z" format, the class test passes an RFC 3339 date, and the mzQC diff whitelists term names. - GroupStatistics is no longer a template; comments explain why the PSI-MS terms come from getPSIMSCV() and its version from the header of psi-ms.obo. MzMLHandler: a read that stops early (metadata only, or counting spectra, as the first pass of MzMLFile::transform() does) ended parsing without ending the progress it had started. ProgressLogger's nesting depth is static, so the progress output of every later file was nested one level deeper. The handler now ends that progress before it stops; MzMLFile_test checks that two consecutive transforms nest alike. Chromatograms are still decoded: PeakFileOptions::setSkipChromatograms(true) makes MzMLHandler skip the spectra's metadata too, so it is not used. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj * [FIX] DIAuditor: no DIA window from MS2 spectra without isolation window; MS:4000069 from precursor m/z MS2 spectra without an isolation window (no precursor, or no isolation window offsets) formed windows of their own, so a run without any isolation information reported MS:4000194 'DIA isolation window count' = 1 and the other DIA window metrics. They are now collected in RunMetrics::without_isolation_window: listed as one row without m/z values in the window table, but left out of the window count and all window statistics, so the mzQC has no DIA window metrics for such a run. The tool warns when no MS2 spectrum has an isolation window, and when some MS2 spectra of a DIA run have none. MS:4000069 'm/z acquisition range' is defined as the range of the precursor m/z values at which MSn spectra are recorded; it was written from the outer isolation window bounds. It now comes from the recorded precursor m/z (the selected ion, else the isolation target) of the MSn spectra, and is written also for runs without isolation windows. The run table's MZRangeMin/Max keeps DIAuditor's meaning (the m/z range the windows cover). In the test reference this changes MS:4000069 from 400-950 to 425-900 (FAIMS input) and from 400-525 to 412.5-512.5 (OpenSwath input). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj * [FIX] DIAuditor: no 'no isolation window' warning when MS2 spectra only lack retention times Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj * [FEATURE] DIAuditor: read Thermo .raw and Bruker timsTOF .d files DIAuditor accepts Thermo .raw files (WITH_THERMO_RAW) and Bruker timsTOF .d directories or .d.zip archives (WITH_OPENTIMS) next to mzML. mzML is still streamed; the vendor files are loaded with FileHandler::loadExperiment() (the readers load a whole run) and their spectra are passed to DIAQCMetrics. - diaPASEF: the timsTOF reader splits each MS2 frame into its isolation windows and annotates their ion mobility ranges, which DIAuditor already keys on. - Thermo: the FAIMS compensation voltage, TIC, isolation windows, instrument, serial number and start time come from the reader. - mzQC: the inputFile's fileFormat is Thermo RAW (MS:1000563) or Bruker TDF (MS:1002817) accordingly; a .d directory gets no SHA-1. - Trailing directory separators ('run.d/') are removed, as in FileHandler::getType(), so that the run label is the file name. - Documented: memory use of the vendor readers, and the values they do not provide (mass resolving power; instrument and start time for .d). Checked on the public FAIMS-DIA run of PXD029902 and the diaPASEF HeLa run that OpenMS uses as optional test data: the direct results equal those of the same data converted to mzML with FileConverter, in all 41 run columns and all windows (75 and 24), and the mzQC output passes pymzqc's checks. TOPP tests on these two files run when their optional fixtures are configured (THERMO_FAIMS_DIA_TEST_DATA, OPENTIMS_DIA_TEST_DATA). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj * [FIX] mzML: write a chromatogram's precursor and product only if it has one MzMLHandler wrote a <precursor> and a <product> for every chromatogram. A TIC got an empty precursor (only the 'dissociation method' parent term) and a product isolation window at m/z 0, and an MS1 chromatogram (e.g. from OpenSWATH) got such a product. Both elements are optional in mzML. A reader that does not tell chromatogram and spectrum isolation windows apart can fail on them: the original DIAuditor read the TIC product's target m/z 0 as the last MS2 spectrum's and crashed. Reading is unchanged: a missing precursor or product loads as an empty one, as the written empty elements did. The TOPP reference files of the 33 affected tests lose only these empty elements; their index offsets are shifted by the bytes removed. A new MzMLFile_test section checks which chromatograms get the elements and validates the stored file against the schema. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj * [TEST] MzMLFile_test: a stored MzMLFile_1.mzML now has no semantic warnings The two warnings were "No mapping rule found for element '/mzML/run/chromatogramList/chromatogram/precursor/activation'", from the empty precursors the writer gave the file's two chromatograms. It no longer writes them, so the count is 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj * [DOC] DIAuditor: .raw input is read with Thermo's peak picking Since #10303, FileHandler reads Thermo .raw files centroided, as FileConverter does by default, so the tool page's "spectra are used as they are stored" now holds for mzML input only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RHVqy5Nqy6QYfGG8AoxnNj --------- Co-authored-by: Claude <[email protected]>
What
FileHandler::loadExperiment()now reads Thermo.rawfiles withThermoRawFile::Options::centroidset, so it applies Thermo's peak picking. FileConverter and ThermoRawFileParser do the same by default.Why
FileHandler used
ThermoRawFile's default, which returns the scans as they were acquired. So every tool that reads.rawthrough FileHandler got profile MS1 spectra for most Orbitrap methods. That covers ProteomicsLFQ, OpenSwathWorkflow, CometAdapter, SageAdapter, SimpleSearchEngine, ProSE, FeatureFinderCentroided/Metabo/Multiplex/Identification/LFQ/MetaboIdent, MassTraceExtractor, IsobaricAnalyzer, FLASHDeconv, OpenPepXL and MetaboliteSpectralMatcher. Most of them expect centroided data. Only FileConverter's mzML was centroided.ginkgotoxin-ms-switching.rawgave 174162 peaks in the tools, but 11813 in FileConverter's mzML.Found in the 3.6.0 documentation audit.
What stays the same
ThermoRawFilekeeps its default, so C++ and pyOpenMS code can still read the scans as acquired.FileConverter -RawToMzML:no_peak_pickingstill writes profile mzML.Centroiding:ms_levelsis empty by default;algorithm:spectrum_type automatic.Tests
CI coverage:
test_load_experiment_from_raw_applies_vendor_peak_pickingruns in the wheel CI onAngiotensin_AllScans.raw.ThermoRawFile_testsection needs theTHERMO_RAW_TEST_DATAfixture, which is off in the CI presets.Local checks, with .NET 8.0.31:
FileHandler.cppandThermoRawFile_test.cppagainst the 2026-09-27 nightly DEB, whose libOpenMS is built withWITH_THERMO_RAW.ThermoRawFile_testpasses.Angiotensin_AllScans.raw:ginkgotoxin-ms-switching.raw: 32 spectra, 174162 → 11813 peaks. This is FileConverter's default output.Docs
FileHandler.h,ThermoRawFile.h,doc/thermo_raw_mzml.md, the pyOpenMS docstrings and the CHANGELOG.🤖 Generated with Claude Code
https://claude.ai/code/session_01YC1T2K9HQEUk2kQMZqC8h7
Generated by Claude Code
Summary by CodeRabbit
Behavior Changes
.rawfiles loaded through the standard file-loading workflow are centroided using Thermo peak picking. To retain profile spectra, convert with peak picking disabled or load scans directly throughThermoRawFile.ThermoRawFilereads preserve scans as acquired by default; centroiding remains optional.Documentation