Repository navigation
0.5.0: port to timsrust 0.6.6 via a 0.4.2-compatible adapter - #10
Merged
Merged
Conversation
Depend on timsrust-tdf 0.6.6 (TDF reader only) and rusqlite 0.35. New src/tsr.rs keeps 0.4.2's positional frame order, fractional Tof2Mz and Scan2Im converters, and GlobalMetadata parsing; call sites, examples and tests switch to crate::tsr. tests/targeted.rs casts unsigned SQL params. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…property tests PolygonGate::build with im_pad > 0 sampled only the scan-lines at y0 - im_pad, y0 and y0 + im_pad, so a spike or sharp vertex lying between those lines was dropped from the padded gate. It now takes the exact m/z projection of the polygon over the whole band [y0 - im_pad, y0 + im_pad] (slabs between vertex and edge-crossing levels; span ends are linear inside a slab), i.e. the Minkowski sum with the pad rectangle at each scan. im_pad = 0 keeps the single scan-line path unchanged (byte-identical output with the paper config). writer: after building, check every scan's unpadded polygon interval lies in the padded gate (check_contains_unpadded) and fail with a clear message if not. tests/polygon_props.rs: containment, full padding (within one scan / TOF index), over-inclusion and pad-0 equality on a dense grid for convex, concave, thin-spike, notch, staircase, triangle, charge-band and two-ring shapes at six pads. Full padding failed on the old 3-line sampling (thin spike, triangle and hexagon vertices). examples/polygon_check.rs runs the same checks on real runs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…property tests examples/polygon_check.rs: timsrust imports switched to dnoise::tsr for the 0.6.6 port. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Feature-level gating (on by default) now keeps a feature that touches the polygon or a DIA MS1 window over its whole extent. overlap_reach is removed from Ms1PolygonParams and DiaMs1WindowParams, from overlap::extend_to_features and from the gates (overlap is now a bool). The 0.4.0 config keys ms1_polygon_overlap_reach / dia_ms1_overlap_reach and the matching CLI flags are still accepted (flags hidden) but ignored with a deprecation warning, so 0.4.0 configs still load; they are never written into the recipe. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ms1PolygonParams and DiaMs1WindowParams default to mz_pad = 3.0 Th and im_pad = 0.015 1/K0 (were 0). MS1 gates only; the MS/MS isolation gates are unchanged. Pad docs now say Th (m/z units), not Da. The DIA MS1 window is a rectangle in (m/z, scan), so its padded box already covers every scan within +-im_pad with the full padded m/z band; the box construction moves into dia_ms1_box and a new test checks, over several windows and pads, that every window point and every point within the pads is kept and that over-inclusion stays within one scan / one TOF index. Warn when analysis.tdf has more than one GroupProperties row for the selection polygon (the gate uses the first). ALGORITHM.md's gate paragraph (which still said 5 Da / 0.05 1/K0), dnoise.toml, docs/reference.md and the defaults test are updated; CHANGELOG gains a 0.5.0 (unreleased) section. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
At the start of each (non crop-only) run, log one info line per active raw-unit parameter with its physical equivalent for the run's calibration: TOF half-widths in ppm at m/z 400, 800 and 1200, scan counts in 1/K0 at the mid scan (configured mobility scale, linear fallback). The same values are recorded in dnoise.provenance.json as unit_equivalents (null when the calibration cannot be read). The parameters stay in raw units. New module dnoise::units with tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Box sweep on the JASMS revision data: at matched removal the box is within about 1k ID points of a trained kernel; 0.10 removes less of the isotope envelope. User decision 2026-09-24. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, targeted at 0.5.0 (not 0.4.x). Opened for CI.
Replaces timsrust 0.4.2 with
timsrust-tdf0.6.6 behind a local adapter (src/tsr.rs) that keeps 0.4.2's converters and frame shapes, so the rest of the crate is unchanged. rusqlite 0.32 -> 0.35 (forced by timsrust's pin).Checked locally:
cargo test --workspace: all pass (136 tests, 2 ignored).Not yet done: full-denoise byte comparison against v0.4.0 (steps in
PORT_NOTES.md). Expectanalysis.tdfto differ only in the SQLite version stamp (bytes 97-100).Cost: dependency count roughly doubles (CLI 170 -> 318 crates) from timsrust's required cloud I/O stack; options in
PORT_NOTES.md.🤖 Generated with Claude Code