Skip to content

Opentims - #8982

Merged
timosachsenberg merged 3 commits into
OpenMS:opentimsfrom
michalsta:opentims
Mar 24, 2026
Merged

timosachsenberg merged 3 commits into
OpenMS:opentimsfrom
michalsta:opentims

Conversation

@michalsta

Copy link
Copy Markdown
Contributor

Description

Move calibration into opentims

timosachsenberg added a commit that referenced this pull request Mar 24, 2026
…ation

Merge PR #8982 which moves calibration converters into opentims upstream.
Update opentims to 02ad97dc (includes OSS converters, CMake options,
sqlite static linking). Removes ~300 lines of OpenMS converter code.

- Delete OpenTimsCalibration.h/.cpp (now in opentims)
- Replace setAsDefault<> calls with setup_opensource()
- Fix include paths to match opentims's PUBLIC include directory

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@timosachsenberg
timosachsenberg merged commit a949d3e into OpenMS:opentims Mar 24, 2026
timosachsenberg added a commit that referenced this pull request Mar 24, 2026
* docs: add design spec for Bruker TimsTOF integration via timsrust_cpp_bridge

Covers DDA-PASEF, DIA-PASEF, and raw frame-level 4D access with
FileConverter integration, CMake FetchContent acquisition, and
streaming support via IMSDataConsumer.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* docs: fix spec issues found by codex review

- Use qualified Interfaces::IMSDataConsumer type
- Fix IM FloatDataArray: use IMDataConverter::setIMUnit() with
  DriftTimeUnit::VSSC (name "raw inverse reduced ion mobility array",
  CV MS:1003008) instead of incorrect "Ion Mobility" + MS:1002815
- Fix typeToMZML string to PSI-MS term "Bruker TDF format"
- Add FileConverter low-memory branch extension for BRUKER_TDF
- Add directory-aware FileHandler flow (skip computeFileHash, handle
  trailing slash in basename)
- Fix setExpectedSize computation per export mode
- Add missing files: OpenMSConfig.cmake.in, FileTypes_test.cpp
- Model timsrust_calibrate as string toggle per TOPP conventions
- Add "d" to FileConverter input format list
- Note tims_file_info() lacks instrument identity

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* docs: add implementation plan for Bruker TimsTOF integration

11 tasks covering CMake infrastructure, file type registration,
FileHandler directory detection, BrukerTimsFile reader (DDA/DIA/frame),
streaming, FileConverter integration, and test infrastructure.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* docs: add 8 review gates to implementation plan

Review checkpoints after each chunk boundary and critical tasks:
- Gate 1: Infrastructure (CMake + FileTypes + FileHandler)
- Gate 2: BrukerTimsFile skeleton and RAII wrappers
- Gate 3: frameToSpectrum_ core conversion
- Gate 4: DDA loading path
- Gate 5: DIA loading path (critical, most complex)
- Gate 6: Complete reader (full review before Chunk 3)
- Gate 7: FileConverter integration
- Gate 8: Final end-to-end review

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: add WITH_TIMSRUST CMake option and FetchContent for timsrust_cpp_bridge

Add CMake infrastructure for optional Bruker TimsTOF .d file support:
- WITH_TIMSRUST option (default ON) and ENABLE_TIMSRUST_TESTS option
- FetchContent-based download of pre-built timsrust_cpp_bridge archives
  with platform detection (Linux x86_64/aarch64, macOS arm64, Windows)
- Link timsrust_cpp_bridge as private dependency of libOpenMS
- Propagate WITH_TIMSRUST compile definition and export in OpenMSConfig

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: register BRUKER_TDF file type for Bruker TimsTOF .d directories

Add BRUKER_TDF to the FileTypes enum with extension "d" and properties
PROVIDES_EXPERIMENT + READABLE. Register in TypeNameBinding array (before
XML which must remain last), add typeToMZML entry, and update test
assertions for the new type count.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: add FileHandler directory detection and dispatch stub for Bruker TDF

Add BRUKER_TDF directory validation in getType() (checks for analysis.tdf
or analysis.tdf_bin marker files), loadExperiment() dispatch stub behind
WITH_TIMSRUST guard, hash computation skip for directories, and path
normalization for trailing-slash handling in source file metadata.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: normalize trailing slashes before getTypeByFileName() in getType()

Paths like sample.d/ (from shell tab-completion) would fail to be
recognized as BRUKER_TDF because getTypeByFileName() sees an empty
basename. Move slash-stripping before the type lookup call.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: add BrukerTimsFile skeleton with RAII wrappers and FileHandler dispatch

Add BrukerTimsFile header and source skeleton guarded by WITH_TIMSRUST.
Includes RAII wrappers for tims_dataset and tims_config handles,
helper functions for error reporting and dataset opening, and stub
implementations for load/transform/loadDDA_/loadDIA_/loadFrames_/
frameToSpectrum_ methods. Register in sources.cmake (conditional)
and wire up FileHandler BRUKER_TDF case to use BrukerTimsFile.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: implement frameToSpectrum_ core conversion with RAII and IM arrays

Replace the frameToSpectrum_ stub with full implementation that batch-converts
TOF indices to m/z and scan indices to inverse ion mobility (1/K0), builds
per-peak IM values from CSR scan offsets, and attaches a properly labeled
FloatDataArray via IMDataConverter::setIMUnit(). Add BrukerTimsFile_test
skeleton with #ifdef WITH_TIMSRUST guards and FileHandler detection tests.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: implement DDA-PASEF loading (MS1 CONCATENATED + MS2 spectrum-level)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: implement DIA-PASEF loading with SWATH window splitting and per-peak IM

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: implement loadFrames_ and fix load() AUTO/SPECTRUM/FRAME dispatch

Replace the loadFrames_ stub with an implementation that iterates both
MS levels (1 and 2), loading all frames via frameToSpectrum_. Replace
the load() placeholder with the real dispatch logic: FRAME mode calls
loadFrames_(), SPECTRUM mode always calls loadDDA_(), and AUTO mode
detects DDA vs DIA via isDIA_() and routes accordingly. Results are
sorted by RT after loading.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: implement transform() streaming via IMSDataConsumer

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: integrate BrukerTimsFile into FileConverter with timsrust parameters

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: add integration test infrastructure for Bruker TimsTOF with real data

Add FetchContent-based download of DDA and DIA test .d directories
(gated by ENABLE_TIMSRUST_TESTS) and integration test sections that
verify MS1/MS2 spectra, IM data, precursor info, and drift time units.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: add null-safety to getTimsError and low-memory warning for .d input

- getTimsError() now handles null dataset handle (possible on tims_open
  failure)
- FileConverter warns that -process_lowmemory with .d input does not
  actually reduce memory usage yet

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: compilation fixes for WITH_TIMSRUST=ON

- Fix FetchContent URL to match release archive naming (v0.1.0 in filename)
- Replace default arg `Config() = {}` with overloads (GCC aggregate init issue)
- Fix FileNotReadable constructor call (4 args, not 5)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: address code review findings

- Fix metavalue key "selected_ion_mz" -> "selected ion m/z" to match
  mzML convention (MzMLHandler reads/writes "selected ion m/z")
- Extract getTimsConfig_() helper in FileConverter to deduplicate
  config-building code between low-memory and normal branches
- Check tims_get_swath_windows return status in transform() expected
  size computation

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* docs: add design spec for MS1 frame centroiding in BrukerTimsFile

Adapted from Sage's PeakBuffer/fastcentroid_frame algorithm (Lazear 2023,
doi:10.1021/acs.jproteome.3c00486). Integrates IM-dimension centroiding
as a config-driven load-time option to reduce MS1 peak counts.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* docs: address review findings in MS1 centroiding spec

- Fix header visibility: FrameCentroider stays in .cpp, not exposed in
  frameToSpectrum_() signature. Centroiding handled in load methods.
- Fix intensity type: uint32_t* from tims_frame::intensities, not float*
- Fix expandScanOffsets: template<T> to serve both float and double callers
- Fix MS1 processing description: MS1 always uses raw frames, never
  timsrust SpectrumReader
- Add partial config validation (warn if only one param set)
- Add SpectrumSettings::CENTROID metadata on centroided MS1 spectra
- Clarify MAX_CENTROID_PEAKS drop behavior is intentional
- Adjust test plan: black-box via public API (FrameCentroider not testable
  directly from anonymous namespace)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* docs: add implementation plan for MS1 frame centroiding

4 tasks across 3 chunks:
1. Config + helpers + refactored call sites (single buildable commit)
2. FrameCentroider integration into load methods
3. FileConverter TOPP parameters
4. Integration tests (centroiding, partial config, IM array, m/z sort)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: add FrameCentroider, expandScanOffsets, and Config fields for MS1 IM centroiding

Add FrameCentroider struct (adapted from Sage's PeakBuffer, Lazear 2023,
doi:10.1021/acs.jproteome.3c00486) and expandScanOffsets<T> helper to
BrukerTimsFile.cpp. Add ms1_centroid_mz_ppm/ms1_centroid_im_pct config
fields to BrukerTimsFile::Config. Update loadDDA_/loadDIA_/loadFrames_
signatures to accept const Config&. Refactor inline scan-offset expansion
to use the shared expandScanOffsets template.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: integrate FrameCentroider into MS1 frame loading

When ms1_centroid_mz_ppm and ms1_centroid_im_pct are both > 0, MS1 frames
are centroided across the IM dimension before building MSSpectrum objects.
Centroided spectra are marked with SpectrumType::CENTROID. Algorithm
adapted from Sage (Lazear 2023, doi:10.1021/acs.jproteome.3c00486).

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: expose MS1 centroiding params as TOPP options in FileConverter

Adds timsrust:ms1_centroid_mz_ppm and timsrust:ms1_centroid_im_pct
parameters for controlling IM-dimension centroiding of MS1 frames.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: add integration tests for MS1 IM-centroiding

Verifies centroiding reduces MS1 peak count, leaves MS2 unaffected,
preserves IM FloatDataArray, and marks spectra as CENTROID type. Also
tests that partial config (only one tolerance set) does not enable
centroiding.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* chore: remove design documents from PR

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: add failing IM annotation test for PeptideSearchEngineFIAlgorithm

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: add IM annotation to PeptideSearchEngineFIAlgorithm

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: accept .d input format in PeptideDataBaseSearchFI

Rename in_mzML parameter to in_spectra since the file-based search
methods now accept both mzML and Bruker .d (TDF) formats. Add
FileTypes::BRUKER_TDF to loadExperiment calls and register "d" as
a valid input format in the TOPP tool.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: add IM annotation to SimpleSearchEngineAlgorithm

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: accept .d input format in SimpleSearchEngine

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: add DDA-PASEF integration tests for search engine IM annotation

- BrukerTimsFile_test: run PeptideSearchEngineFIAlgorithm in-memory with
  real DDA-PASEF data, verify all PSMs carry IM annotation and
  ProteinIdentification has "1/K0" unit string
- TOPP tests: run SimpleSearchEngine and PeptideDataBaseSearchFI against
  real .d input (gated behind WITH_TIMSRUST + TIMSRUST_DDA_TEST_DATA)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: unify DDA integration test parameters across search engines

All three DDA integration tests now use identical parameters:
- FASTA: SimpleSearchEngine_1.fasta (shared via compile definition)
- Precursor tolerance: 5 ppm
- Fragment tolerance: 20 ppm
- Fixed mods: Carbamidomethyl (C)
- Variable mods: Oxidation (M)
- Missed cleavages: 1, min peptide size: 7

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: use real human Swiss-Prot FASTA for DDA integration tests

Replace the tiny synthetic FASTA with the reviewed human Swiss-Prot
proteome (20,431 entries) fetched via CMake FetchContent from the
timsrust test data release. All three DDA tests use identical default
parameters and the same FASTA.

Results with real FASTA:
- SSE: 3,553 PSMs, 2,926 proteins
- FI:    601 PSMs,   523 proteins
- 280 shared peptide sequences
- 100% IM annotation coverage on both

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: use realistic TimsTOF DDA-PASEF tolerances (10/20 ppm)

Set explicit precursor (10 ppm) and fragment (20 ppm) mass tolerances
for all DDA integration tests to match realistic TimsTOF parameters.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: add FDR filtering to DDA integration tests

Enable decoy generation (-Search:decoys) in both SSE and FI DDA tests,
then chain FalseDiscoveryRate at 1% PSM-level FDR. Results at 1% FDR:
SSE 268 PSMs / 199 proteins, FI 326 PSMs / 251 proteins.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: use typical timsTOF Pro DDA-PASEF parameters

Update all DDA integration tests to use realistic timsTOF Pro parameters:
20 ppm precursor, 20 ppm fragment, Trypsin/P, 2 missed cleavages,
Oxidation (M) + Acetyl (Protein N-term) variable modifications.

Results at 1% FDR: SSE 200 PSMs / 164 proteins, FI 324 PSMs / 252 proteins.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: add built-in PSM-level FDR filtering to SSE and FI

Add FDR:PSM parameter (default 0.01 = 1% FDR) to both
SimpleSearchEngineAlgorithm and PeptideSearchEngineFIAlgorithm.
When decoys are enabled, the engines now internally run
FalseDiscoveryRate, filter by q-value, remove decoy hits,
and clean up unreferenced proteins.

Old tests are unaffected (decoys=false, so FDR step is skipped).
Remove separate FalseDiscoveryRate TOPP test steps from the DDA
integration tests since the engines now handle FDR internally.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: disable built-in FDR in OpenNuXL's embedded SSE call

OpenNuXL uses SimpleSearchEngineAlgorithm internally for autotuning
and handles FDR filtering separately at 5%. Set FDR:PSM=0 to prevent
the new default 1% FDR from interfering.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: use selected-ion m/z instead of isolation-window center for DDA precursors

BrukerTimsFile was setting Precursor::setMZ() to the quadrupole
isolation-window center (ts.isolation_mz) instead of the selected-ion
m/z (ts.precursor_mz). On timsTOF data, these differ by a mean of
0.38 Da because the isolation window is not centered on the
monoisotopic peak.

This caused search engines (SSE, FI) to look up candidates at the
wrong precursor mass, requiring isotope-error correction for nearly
every spectrum and dramatically inflating the candidate space. The
result was a target/decoy ratio of 1.25:1 (200 PSMs at 1% FDR)
instead of 3.87:1 (4,189 PSMs at 1% FDR) on DDA-PASEF test data.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: add SageAdapter .d support and DDA-PASEF integration test

- SageAdapter: accept Bruker .d input (Sage reads it natively); skip
  mzML-specific post-processing (native ID lookup, FAIMS annotation)
  for non-mzML inputs
- Add DDA integration test: DecoyDatabase -> SageAdapter -> FDR at 1%
  on hyperscore, gated behind SAGE_BINARY and WITH_TIMSRUST

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* docs: clarify FDR:PSM parameter description for SSE and FI

Make it explicit that setting FDR:PSM to 0 disables filtering while
still reporting q-values, and that the parameter requires -decoys.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat: change FDR:PSM default to 0.0 (disabled) in SSE and FI

Avoids silently filtering output when users enable -Search:decoys
without explicitly setting an FDR threshold. Users who want built-in
FDR filtering must now opt in with -Search:FDR:PSM 0.01.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: indent SageAdapter mzML guards and document transform() memory

- Re-indent the two mzML-specific blocks in SageAdapter to match
  their enclosing if-scope
- Document in BrukerTimsFile.h that transform() currently loads the
  full dataset into memory before feeding to the consumer

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* refactor: use RAIICleanup instead of ad-hoc guard structs in BrukerTimsFile

Replace 5 instances of the fragile lambda+decltype struct pattern
with OpenMS::RAIICleanup from CONCEPT/RAIICleanup.h.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: set nativeID on Bruker spectra, filter MS levels, clean empty IDs

- Set nativeID on all spectra in BrukerTimsFile (frame=N for MS1,
  scan=N for DDA MS2, frame=N windowGroup=M for DIA MS2)
- Set SourceFile nativeIDType/accession for Bruker TDF (MS:1000776)
- Apply PeakFileOptions MS level filtering for BRUKER_TDF in FileHandler
- Remove empty PeptideIdentifications after FDR filtering in SSE and FI
- Fail cmake configuration on Intel macOS instead of silently selecting
  arm64 timsrust binary

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* docs: add design spec for replacing timsrust with opentims

Detailed design for migrating from the timsrust Rust bridge to opentims
(C++) plus open-source calibration converters for Bruker TimsTOF .d file
reading. Covers build integration, calibration math porting, DDA/DIA
SQL metadata queries, BrukerTimsFile rewrite plan, TOPP parameter
migration, and testing strategy.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* docs: add implementation plan for opentims migration

9-task implementation plan covering CMake infrastructure, calibration
converters, BrukerTimsFile rewrite, TOPP parameter migration, test
updates, and regression validation.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* build: replace timsrust with opentims FetchContent infrastructure

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* refactor: update BrukerTimsFile header for opentims (remove timsrust types)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* feat: add open-source TOF-to-m/z and scan-to-IM calibration converters for opentims

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* feat: rewrite BrukerTimsFile against opentims API with SQL-based metadata reading

Replace all timsrust C FFI calls with opentims TimsDataHandle/TimsFrame API.
DDA MS2 spectra reconstructed from raw frames + SQL precursor metadata.
DIA SWATH windows read via direct SQL queries. OLS recalibration implemented.
Centroiding algorithm (FrameCentroider) preserved.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* test: rename timsrust to opentims in test infrastructure

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* refactor: rename timsrust references to opentims/bruker in FileHandler and FileConverter

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: patch opentims build issues (sqlite_helper, std::forward, fPIC)

- Replace sqlite_helper.h with direct sqlite3 calls (opentims uses
  dlopen-based loading which conflicts with static linking)
- Fix variadic template bug in setAsDefault<>() (std::forward expansion)
- Add POSITION_INDEPENDENT_CODE for shared library linking

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: address CodeRabbit review comments on opentims migration

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: add WIN32_LEAN_AND_MEAN for MSVC opentims build

opentims includes <libloaderapi.h> on Windows which pulls in winnt.h,
requiring proper architecture defines. Add WIN32_LEAN_AND_MEAN and
NOMINMAX to prevent conflicts.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: patch opentims so_manager.h for MSVC, update FileTypes_test count

- Patch so_manager.h to include <windows.h> instead of <libloaderapi.h>
  and <errhandlingapi.h> directly — the sub-headers fail standalone
  because winnt.h needs architecture defines set by <windows.h>
- Update FileTypes_test expected counts (42->43, 65->66) for BRUKER_TDF

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: address CodeRabbit round-2 comments

- Close sqlite3 handle on open failure before throwing (sqlite_helper.h)
- Validate mz_max > mz_min and im_max > im_min in factories to prevent
  division by zero in inverse_convert()

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* chore: remove design spec and implementation plan documents

* perf: use precomputed scan offsets for O(1) scan-range lookups in DDA

Replace O(peaks * precursors-per-frame) linear scanning with O(1) index
lookups via scan_offsets array. opentims returns peaks ordered by scan,
so we build the offset table once per frame in getFrameData() and use
peakRangeForScans() for direct [begin, end) index ranges.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: address code review findings (UB, thread safety, DIA nativeID)

- Clamp negative values in inverse_convert to prevent UB on double→uint32_t
  cast, use rounding instead of truncation for better round-trip accuracy
- Document thread-safety constraint on global factory registration
- Use actual window_group from SQL instead of array index in DIA nativeIDs

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: link opentims against system zstd, fallback to bundled decoder

Use find_package(zstd) to prefer system/package-managed zstd for TDF
frame decompression. Falls back to compiling opentims's bundled
zstddeclib.c when no system zstd is available (e.g. isolated wheel
builds).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* Move a lot of patched stuff into opentims

* Move a lot of patched stuff into opentims

* Move calibration to opentims

* fix: update opentims to 85e1dfba (CMake fixes), remove dead code

- Update opentims commit hash to 85e1dfba which includes proper
  CMakeLists.txt with OPENTIMS_BUILD_CPP_LIB, OPENTIMS_LINK_SQLITE_STATICALLY
  options — eliminates need for all our CMake patches
- Remove dead needed_frames set and unused #include <set>

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* refactor: use upstream opentims OSS converters, remove OpenTimsCalibration

Merge PR #8982 which moves calibration converters into opentims upstream.
Update opentims to 02ad97dc (includes OSS converters, CMake options,
sqlite static linking). Removes ~300 lines of OpenMS converter code.

- Delete OpenTimsCalibration.h/.cpp (now in opentims)
- Replace setAsDefault<> calls with setup_opensource()
- Fix include paths to match opentims's PUBLIC include directory

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* fix: enable C language for bundled ZSTD fallback in wheel builds

The ZSTD fallback compiles zstddeclib.c (a C file), but opentims only
declares CXX language. When system zstd is unavailable (wheel builds),
CMake fails with "CMAKE_C_COMPILE_OBJECT not set". Fix by enabling C
language before FetchContent.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* feat: add TOF-domain smoothing and centroiding for DDA MS2 spectra

Port timsrust's spectrum processing pipeline to C++:
- group_and_sum: merge duplicate TOF bins across scans/frames
- smooth(window=1): symmetric neighbor intensity sharing in TOF space
- centroid(window=1): sparse local maximum apex picking

Applied to DDA MS2 spectra before m/z conversion. This produces cleaner,
centroided spectra matching timsrust's output quality. Search engine
identification rates improve significantly (target PSMs +32%, decoy
PSMs -57% on HeLa DDA test data).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* Opentims (#8985)

* Make the code a bit safer

* Use opentims v1.2.0b1

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Michał Startek <[email protected]>
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