Repository navigation
[FEATURE] Improve native ProSE scoring, peak retention and candidate retrieval - #10335
timosachsenberg wants to merge 12 commits into
Conversation
Retain a spectrum-aligned peak list after deisotoping and before window/top-N filtering. Compute local chance-match surprise and charge-aware fragment competition for retained candidates, exporting both as Percolator features. Keep the option disabled by default and preserve native candidates and scores. Cover analytical feature values, weak-peak retention, RT ordering, fragment charges, opt-in metadata, and chunked multi-file behavior.
Resolve automatic native scoring from the configured fragment tolerance before mass calibration. Automatic charge selection follows the resolved scorer; explicit choices and existing defaults remain available. Record requested and resolved options. Cover resolution boundaries, explicit choices, charge caps, calibration, missing activation metadata and chunked multi-file searches. Validate exact CID/HCD equivalence in 10 native searches and 18 paired Percolator runs.
Use resolution-aware native scoring without requiring extra flags. Preserve hyperscore/single at high resolution and select calibrated/multiple for wider fragment tolerances. Keep explicit legacy choices and local evidence independent. Update parameter documentation, changelog and default assertions.
Weight fragment counts and intensity products by a fixed Gaussian mass-error kernel. Preserve matching tolerances, unweighted annotations and auto scoring defaults. Apply the same score during calibration and all search paths. Validated on 14 high-resolution measurements with three Percolator seeds, plus default CID/HCD controls. Improves Astral yield while remaining opt-in because effects on other instruments are mixed.
FragmentIndex::build() only cleared protein_lengths_. generatePeptides() and the fragment merge append to fi_peptides_ / fi_fragments_, so building twice on the same object kept the old peptides and fragments, and their (protein_idx, offset) coordinates were read against the new FASTA. A minimal probe goes from 1 to 2 peptides and 16 to 48 fragments. A build that throws (e.g. an entry over 65535 residues) also left isBuild() true with the previous index. build() now starts with clear(). ProSE's existing electron-ion rebuild already called clear() first and is unaffected. Split out of #10335. Claude-Session: https://claude.ai/code/session_01Hgr7bpkMaiCg7A1F15yLjf Co-authored-by: Claude <[email protected]>
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # CHANGELOG # src/openms/source/ANALYSIS/ID/FragmentIndex.cpp # src/tests/class_tests/openms/source/FragmentIndex_test.cpp Co-authored-by: timosachsenberg <[email protected]>
Co-authored-by: timosachsenberg <[email protected]>
Co-authored-by: timosachsenberg <[email protected]>
Merged |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (18)
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 (12)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughProSE adds peptide deduplication, calibrated and mass-accuracy scoring, automatic scorer and charge selection, raw-spectrum retrieval, high-resolution peak filtering, and optional local fragment-evidence features. HyperScore exposes the new scoring methods through C++ and Python APIs. ChangesHyperScore scoring methods
Peptidoform deduplication
Scorer and fragment-charge selection
Candidate queries and peak filtering
Local fragment evidence
Sequence Diagram(s)sequenceDiagram
participant ProSEAlgorithm
participant FragmentIndex
participant HyperScore
participant PSMPostProcessing
ProSEAlgorithm->>ProSEAlgorithm: Preprocess scoring, raw-query, and evidence spectra
ProSEAlgorithm->>FragmentIndex: Retrieve candidates from selected spectrum
ProSEAlgorithm->>HyperScore: Apply resolved scoring method
ProSEAlgorithm->>PSMPostProcessing: Add optional local evidence and metadata
Suggested reviewers: Priority: ➖ Normal Change: Feature Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue remains in the scoring, deduplication, or spectrum-processing changes. The PR is mergeable subject to normal build and test checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change adds scoring interfaces and alters how search evidence is retained. The reviewed paths have input checks and per-spectrum isolation, and no introduced security issue was established. Failure recovery and broader exposure remain only partially assessed. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 35.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 13 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 checks each peak, Comment |
Resolves the conflicts with the two ProSE changes that landed on develop after this branch's last develop merge: #10357 (peaks:window_type, the same final-window retention this branch carried; the develop text and the richer develop test are kept, the branch's duplicate CHANGELOG bullet is dropped) and #10358 (peptide:clip_nterm_methionine, kept alongside this branch's peptide:deduplicate and fragment:query_spectrum parameters). Also documents the evidence_spectra parameter of postProcessHits_, which Doxygen_Warning_test flagged. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01UGKGwMtvsf72yELV4xNmAQ
…rences The references from develop (refreshed there for #10357 and #10358) lack the search-parameter entries this branch writes: scoring:method, scoring:method_resolved, scoring:fragment_charges, scoring:fragment_charges_resolved, scoring:mass_error_sd, fragment:max_charge, fragment:query_spectrum, peptide:deduplicate and annotate:local_fragment_evidence; peptide:clip_nterm_methionine moves to the position this branch writes it at. Every identification, score and annotation line is unchanged, so only these UserParam lines are added to ProSE_1_out (also used by the multi-file and chunked tests), ProSE_2_out, ProSE_4_out and ProSE_10_out. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01UGKGwMtvsf72yELV4xNmAQ
|
Pushed c1b2f20 → 136dde3 (two commits) to get this branch mergeable and its CI green again:
Verified locally on the merged branch: Note: the Build and Test runs of the previous two heads (c16c368, c1b2f20) were never executed; they sit in "action required" because those commits were pushed by the Copilot agent. This push should start them normally. Generated by Claude Code |
…#10377) ProSE's MS2 preprocessing ran the ThresholdMower with its class default, an absolute intensity cutoff of 0.05, before normalizing to a base peak of 1. On intensity-scaled input (spectra already normalized, or otherwise small intensities) that silently deleted every peak below 5% of the base peak. The cutoff now removes only peaks without intensity (zero or negative); every positive float intensity, subnormal ones included, is kept. Standalone version of #10368 on develop (previously stacked on #10335). Adds the positive-intensity and search scale-invariance regression tests. Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz Co-authored-by: Claude Opus 5.5 <[email protected]>
…eval-gate and fragment-charge arms Sage v0.14.7 rerun on the 20-file suite (reproduces the 2026-09-30 supplement exactly), per-spectrum gap categories against develop, #10335 and the deisotoping fix, ion-loss measurements, probes, and the prototype arms with TMTpro entrapment. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz
…thod=mass_accuracy) Port of the mass-accuracy scorer of #10335 (48dc1c2) to develop, the prerequisite of the fitted kernel in the next commit. A matched ion with signed error e (ppm) contributes exp(-0.5*(e/sd)^2) to its terminal ion count and intensity product; fractional factorial rewards use max(0, lgamma(count+1)), so exact matches score exactly HyperScore. New parameters scoring:method (hyperscore, the default, or mass_accuracy) and scoring:mass_error_sd (7 ppm). The scorer applies to the main search in the single-file, chunked and chunk-major multi-file paths and to the precursor calibration pass. Matching tolerances and the unweighted match annotations are unchanged. HyperScore::computeMassAccuracy is bound in pyOpenMS. The search parameters record scoring:method and scoring:mass_error_sd; the four ProSE idXML references gain these two lines, hits are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz
…ibrate high-resolution searches by default Collect the signed ppm errors of the matched ions of the calibration pass' confident PSMs and fit the kernel of scoring:method=mass_accuracy from them: the main search centers the Gaussian on their median and uses 1.4826 * MAD as its width instead of the fixed scoring:mass_error_sd (floored at 0.1 ppm; at least max(calibration:min_psms, 50) matched ions). The calibration pass itself keeps scoring with the configured kernel. The kernel the main search used is recorded in the search parameters (scoring:mass_error_kernel, scoring:mass_error_sd_resolved, scoring:mass_error_shift_resolved) in the single-file, chunked and chunk-major multi-file paths. calibration:enabled gains 'auto', now the default: the pass runs for high-resolution fragment tolerances (<= 0.1 Da / <= 100 ppm, the resolution proxy of the deisotoping choice) and is skipped otherwise; 'true' and 'false' keep their meaning. HyperScore::computeMassAccuracy takes an optional kernel center and HyperScore::matchedFragmentErrorsPpm exposes the matched ions' errors; both are bound in pyOpenMS. Standalone version of #10365 on develop (previously stacked on #10335). The four ProSE idXML references gain the three kernel lines (ProSE_4, which calibrates, records its fitted kernel); hits are unchanged. The parameter is no longer a true/false flag, so a bare -Search:calibration:enabled is not read as 'true' by TOPPBase any more: the Bruker DDA calibration TOPP tests pass 'true' explicitly, and the uncalibrated Bruker DDA baseline pins 'false' to keep measuring what its PSM floor was set for. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz
…or features Add FragmentIonLikelihoodModel, a per-run likelihood model of fragment ion presence and intensity rank per ion series, precursor charge, fragment charge and relative cleavage position, with pseudo-count back-off so that a few thousand PSMs suffice. ProSE trains it per file when annotate:self_trained_ion_priors is set: the confident target PSMs (target- decoy competition q <= annotate:ion_prior_train_fdr of the native score) provide the signal counts, their reversed sequences matched against the same spectra the noise counts. Every hit then receives the additive features ion_prior_llr, ion_prior_explained and ion_prior_topk_observed, which are listed in extra_features for Percolator; the training set is recorded as ion_prior:trained and ion_prior:training_psms. Runs without decoys or with fewer than annotate:ion_prior_min_psms confident PSMs get zeros and a warning. Native scores and candidate selection are unchanged, and nothing is pre-trained or shipped. The annotation runs after PeptideIndexing and before FDR in all three search paths (single, chunked, chunk-major multi-file), so each file of a multi-file run learns its own fragmentation pattern. The model sees the singly charged fragments native scoring matches. Standalone version of #10366 on develop (previously stacked on #10335). The search parameters record annotate:self_trained_ion_priors; the four ProSE idXML references gain that line. Includes class tests for the model and the ProSE integration, a pyOpenMS binding with a test, a CHANGELOG entry and the ProSE tool documentation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz
#10378 (priors), #10379 (default and mass-accuracy scorer) and #10335 benchmarked against develop 3a47278 (#10391) on the 20-file suite, with identity checks and shuffled-entrapment runs for #10378 and #10379 on HF-X, Astral and TMTpro. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz
…10394) A peptide that occurs in several proteins was indexed once per occurrence. Its copies took several of the per-spectrum candidate slots (scoring:max_candidates_per_spectrum), and the runner-up was often the same peptide, so delta_score was 0 and the candidate-pool features counted copies. FragmentIndex gains peptide:deduplicate (default false): after peptide generation, exact modified peptides are collapsed to one representative coordinate, compared on the full peptidoform string (hashes only group candidates). SNES mother indices are unchanged. ProSE enables it by default; its PeptideIndexing step already recovers every protein mapping and the target/decoy label. Chunked searches additionally skip a peptide/charge/isotope hypothesis already scored in an earlier chunk. Split out of #10335 (0af4cf6); its index-rebuild part is in develop as #10350. The four ProSE idXML references gain the peptide:deduplicate search-parameter line; replaying the TOPP tests changes nothing else in them. Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz Co-authored-by: Claude Opus 5.5 <[email protected]>
… not deisotoped (#10397) ProSE scored every candidate against singly charged fragments only. Spectra that are not deisotoped (ion-trap CID at 0.5 Da, or fragment:deisotope=false) keep multiply charged fragments at their own m/z, so those peaks could not match, although candidate retrieval already considers fragment charges up to fragment:max_charge. New scoring:fragment_charges (auto, single, multiple). 'auto', the default, scores charges up to min(precursor charge - 1, fragment:max_charge) when the spectra are not deisotoped and charge 1 when they are, the same decision preprocessing makes. High-resolution searches therefore do not change. The precursor-calibration pass and the peak annotations use the same charges, and the ion-count fractions divide by the number of charges scored. The resolved choice is recorded as scoring:fragment_charges_resolved. Split out of #10335, which scores multiple charges together with its calibrated binomial score; on the 20-file suite of #10364 the multiple charges carry the low-resolution gain with plain HyperScore, and the calibrated score alone loses. The four ProSE idXML references gain the two search-parameter lines; replaying the TOPP tests changes nothing else (all are high resolution). Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz Co-authored-by: Claude Opus 5.5 <[email protected]>
Scripts, per-file results, entrapment and identity checks for the deduplication (#10394), fragment-charge (#10397) and raw retrieval / local fragment evidence (#10399) parts of #10335, the ablation of #10335 on develop, the history table of #10364 and the Bruker DDA emulation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz
|
Closing: the parts of this PR that improve results on the 20-file suite of #10364 are now separate PRs on develop.
What stays behind:
Details, ablation and per-file results: split-10335-20261002. Generated by Claude Code |
… spectra and local fragment evidence (#10399) * [FEATURE] ProSE: raw-spectrum candidate retrieval and local fragment evidence Port two options of #10335 onto develop: - fragment:query_spectrum (processed, raw): 'raw' queries the fragment index with all positive-intensity peaks, before deisotoping and local/top-N peak filtering, also in the calibration pass. Scoring keeps the processed list. - annotate:local_fragment_evidence: chance_match_surprise and mass_competition_evidence as annotations and Percolator features, computed on the peak list after deisotoping and before local/top-N filtering, for the fragment charges that were scored. Candidates and native scores do not change with local fragment evidence. Tests and implementation follow #10335 (commits 7ae91c0 and 46e3f65). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz * [PARAM] ProSE: raw retrieval for high-resolution spectra and local fragment evidence by default fragment:query_spectrum gets 'auto', the new default: raw retrieval for high-resolution fragment tolerances (<= 0.1 Da / <= 100 ppm, the deisotoper's boundary), processed retrieval otherwise. On the ion-trap files of the #10364 suite, raw retrieval loses 40-60% of the Percolator PSMs, because the unfiltered peaks match many random fragments at 0.5 Da and crowd out the correct candidates. The resolved mode is recorded as fragment:query_spectrum_resolved. annotate:local_fragment_evidence defaults to true. The ProSE TOPP references gain the search-parameter lines and the two feature values per hit; candidates, scores and all other values are unchanged. The multi-file test now also checks that each file gets the evidence values it gets alone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz * [DOC] ProSE: document evidence_spectra of postProcessHits_ and the tolerance requirement Fixes the Doxygen_Warning_test failure (undocumented parameter 'evidence_spectra' of ProSEAlgorithm::postProcessHits_). The CHANGELOG now states that annotate:local_fragment_evidence requires a finite, positive fragment:mass_tolerance (CodeRabbit review). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D1N3pC2AqJt57Q3v87bWxz --------- Co-authored-by: Claude <[email protected]>
ProSE loses candidate evidence during preprocessing, particularly on sparse Astral spectra. Low-resolution CID also needs fragment-charge-aware scoring that accounts for chance matches. This PR adds native scoring and retrieval options, with resolution-dependent scoring defaults and an explicit compatibility path.
Reproduce all reported benchmarks
Download the public reproduction bundle · Read the pinned protocol · ZIP SHA256
The bundle records 182 saved search configurations / 546 per-seed result counts across the broad, retrieval, ranking and deduplication experiments. It includes public input URLs and hashes, exact sampling and database preparation, pinned source versions and experimental patches, the C++ build harness, full per-job parameters, PIN normalization, Percolator seeds/FDR evaluation, expected result checks and rejected variants. It contains recipes, metadata and reference checks; large mzML inputs, native/PIN/Percolator output tables and executables are regenerated by the commands below.
The reproduction material is pinned on a separate branch; this documentation addition does not change the PR's code or benchmark results.
Packaging validation: all 20 selected mzML and three combined FASTA hashes were checked; historical source patches apply to their pinned bases. Fresh downloads reproduced the full FASTA, Percolator package/binary and a byte-identical Velos sample. The public launcher reproduced one CID search and all three Percolator seed counts; the Astral gap categories were recomputed. The publicly downloaded ZIP and all 127 manifest file hashes were verified. The documentation step did not rerun all 182 searches.
Complete replication protocol: dependencies, inputs, builds, commands and evaluation
This bundle makes the experiments reproducible without access to a chat or private
file store. It contains 182 saved search configurations and 546 per-seed result
counts, original source patches, the C++ harness, full sampling metadata,
public source URLs, checksums, PIN normalization and evaluation code. It does not
contain the large source mzML files, native result tables or engine executables;
the commands below regenerate them. Expected PIN SHA256 and per-seed counts allow
checking the regenerated results. Retained/rejected experiments are both recorded;
the 182 includes 86 broad, 49 retrieval, 21 ranking and 26 deduplication experiments.
1. Environment and dependencies
Recorded platform: Linux x86_64, Ubuntu 24.04-compatible runtime, Python 3.12.14,
GCC 13.3, C++23, OpenMP, CMake 4.4.3, Rust 1.87.0. Search processes used four OpenMP
threads and at most two searches at once within an 8-GiB memory limit. The public
launcher is deliberately serial. Allow at least 15 GB of free disk for a small
subset; substantially more for retaining outputs from all 182 runs. Source data
total 13.16 GB; the largest download is 2.73 GB. The downloader processes files
one at a time and removes verified originals after sampling unless --keep-raw is
set. Time measurements from the original concurrent runs are not speed claims.
From the extracted bundle root, install system prerequisites (
g++-13,make,git,curl,pkg-config,libssl-dev, and the Ubuntu 24.04 runtime packagelibboost-filesystem1.83.0). Install Rust using the official rustup instructionsif needed; ANDES' pinned rust-toolchain.toml selects 1.87.0. Then:
native_dedup/provenance/python_packages.jsonrecords the complete original Pythonpackage inventory, including plotting packages not needed for rerunning searches.
The harness compiles ProSEAlgorithm, FragmentIndex, HyperScore and
TheoreticalSpectrumGenerator from source and links the unchanged support library
from the pinned official pyOpenMS wheel. This is not a full clean OpenMS build,
and Python bindings were not rebuilt for this deduplication follow-up.
2. Recreate the exact inputs
# Start with one CID measurement, or omit the dataset name for all 20. python3 reproduce.py inputs velos_125_R1 python3 reproduce.py check-inputs velos_125_R1The manifest is
broad_benchmark/manifest.json.inputs.jsonfreezes originaldownload sizes/SHA256 and selected mzML hashes. Full original IDs, acquisition
metadata, precursor m/z/charge and selected scan identities are preserved under
broad_benchmark/provenance/<dataset>.json.Selection: take the 8,000 smallest SHA256(dataset ID + NUL + original native ID)
values among nonempty MS2 spectra with selected-ion m/z, known charge 2–5 and no
profile-spectrum flag; sort the selected spectra by RT. Preserve peak arrays and
instrument references. Normalize non-scan native IDs to scan=N for both engines,
keeping originals in provenance. For timsTOF, represent exporter userParam CID
also as CV MS:1000133; analyzer metadata remains TOF. See the exact
prepare.py.Any downloaded/prepared hash mismatch aborts; do not update expected checksums to
silence it. Existing mismatched inputs must be investigated before searching.
FASTA source:
https://archive.openms.de/openms/benchmarks/pride-benchmarks/lfq/QExactiveHF/ProteoBench_Module_2/ProteoBenchFASTA_MixedSpecies_HYE.fasta
The complete FASTA is 16,670,994 bytes / 31,889 targets, SHA256
d9ac434d88492c10c8e9a587ee7dbc9480fa0995fa07a6ba35a7da8abf39aa25, Git blobd832aa92d3f3869ab17ba24a0a8b190b38e64858in bigbio/quantms-test-datasets.An earlier truncated copy invalidated earlier HYE comparisons; those are excluded.
Human/yeast selects accessions ending HUMAN/YEAST or containing Cont; human-only
selects HUMAN or Cont. Decoys are one full protein-sequence reversal with DECOY
prefix. Both engines receive the same concatenated target-decoy FASTA, and ANDES
is explicitly forbidden to generate another set.
prepare_databases.pyis exact.35614831eddb913fab678c63461d6b4cb44ca73f5aebe2ead1a00020d791def6efbf5ac224bf51fca252f58cd55df5e2aad7eddd824d0dee9959b086e147bb596f86369103a9003560661f559cbd5bd1c37e55187670f662d69f91f81359a3ab3. Build the exact source variants
versions.jsondefines every build key and patch.builduses separate detachedworktrees and preserves existing outputs. Do not edit these source worktrees.
bcbc2f13052bbfb90b9441bed1e298a67b0981c7native_gap/provenance/window.patchnative_gap/provenance/query.patchnative_gap/provenance/charge_bound.patch46e3f6573fc70877e863bb3fa8a87af89a13ac50native_rank/provenance/mass.patchnative_rank/provenance/rejected_local_with_tests.patch48dc1c22adc25ca2656448676f0ba2a663ccb6fenative_dedup/provenance/first.patch0af4cf62dc9e0ab944102a0647df1ecd431e32bbb7eaece219ef45198eb233030cf9d69075988f72Published retrieval/mass/dedup trees are recorded in the corresponding provenance
folders. Experiments used frozen prototypes; their patches above preserve the
source actually measured. The final compact dedup implementation has tested tree
3ffb32ea9ac43d3e0a833863d6b6c38e602fcb72. Do not replace all historical binarieswith final defaults: deduplication changed the default. For final-code validation,
use --binary bin/final explicitly on native_dedup jobs; the original follow-up
verified eight final native/PIN comparisons, including legacy controls.
python3 reproduce.py build baseline python3 reproduce.py build dedup python3 reproduce.py build andes # To test the published implementation itself: python3 reproduce.py build final deps/cmake/data/bin/cmake --build builds/final -j2 deps/cmake/data/bin/ctest --test-dir builds/final --output-on-failureOnly final source is expected to pass the final regression-test expectations.
Some frozen exploratory patches contain early test expectations later corrected.
The helper builds only the search target for historical variants.
4. Run the saved experiments
Do not repeat a job into a nonempty output directory; use a fresh --output-root.
The last command assumes those jobs have not already been run there.
To reproduce every recorded experiment from scratch, build baseline, window,
query, charge_bound, mass, local, dedup and andes, prepare all inputs, then run:
Every job in
jobs.jsonincludes its source key, full parameter dictionary,original command, expected normalized PIN SHA256, candidate row count, resolved
settings, input hashes, native count and seed counts. Paths in the original logs
describe the original machine; the launcher rewrites input/output paths and runs
the pinned binary. Outputs are retained under
reruns/<stage>/<dataset>/<arm>/: native.tsv, search.idXML (ProSE), native.pin,input.pin, target/decoy tables for s1/s42/s137, logs, parameters and comparison.json.
Any PIN/count discrepancy is recorded and causes failure; floating-point/platform
differences are possible and must be reported rather than silently accepted.
5. Shared search and rescoring protocol
Saved per-job parameters are authoritative. The common space is full Trypsin/P
(ANDES Trypsin), two missed cleavages, length 7–40, known charges 2–5, fixed CAM(C),
at most one variable Oxidation(M), and fixed TMT6plex or TMTpro on K and peptide
N-terminus where indicated. Precursors ±20 ppm, except TMTpro ±50 ppm. ProSE isotope
errors −2..1 correspond to ANDES −1..2 because their signs differ. Calibration is
off. Fragments: 0.5 Da for Velos CID/Lumos CID-TMT, 20 ppm for high resolution.
ProSE candidate cap 50 and report top 10, except explicitly recorded diagnostic
variants. Engine-specific peak processing and scoring features remain native.
ANDES auto uses its pinned models, --candidate-index mmap,
--mmap-window-cache-candidates 200000, --fragment-index-slice-da 10,
--decoy-strategy none, --decoy-prefix DECOY, --threads 4, --precursor-cal off,
--protocol standard for unlabelled/TMT for labelled data, --top-n 10. Full commands
are saved in jobs.json. timsTOF auto selects the reported LowRes fallback; the
separate andes_highres arm forces hcd_qexactive_tryp and is diagnostic only.
PIN normalization (
native_dedup/export.py): assign every candidate of a scanthe same observed neutral ExpMass = (precursor_mz − 1.007276466771) × charge;
CalcMass is AASequence.getMonoWeight(). Use isotope difference 1.0033548378 with
the engine-specific sign for dm/absdm. Normalize sequence/modification notation,
scan IDs, lengths and internal cleavage counts. Remove RT-prediction columns and
verify every numeric feature is finite. No external predicted RT/intensity
features are added. The exact feature columns come from each engine's native PIN.
The launcher runs this automatically and checks that Percolator read every PIN
row. Accepted PSMs have q-value ≤0.01; average three seeds within a file, then
average files within an instrument group. Do not pool separate-file FDR estimates.
Native TDC uses one top candidate per scan, favors decoys at exact score ties,
adds complete equal-score groups, and uses (D+1)/T≤0.01. Use score for ProSE;
ANDES strong mode uses RawScore, otherwise RankScore+EdgeScore, as in analyze.py.
gap.pyrecreates the five Astral sequence-assignment categories at seed 42;both the requested ProSE arm and the three ANDES controls must have been run.
Native/PCL counts alone do not establish actual FDR. ANDES agreement is a comparison,
not ground truth; sequence agreement ignores modifications and equates I/L.
Seeds are not biological replicates. Astral A2 was exploratory. ANDES has known
benchmark-series overlap, so no blind-test or training-set-independence claim is
made. The archive's Eclipse folder contains Exploris 480 data. No performance
validation is claimed for SCIEX/Waters, ETD/DIA, full raw conversion, quantification,
or broad PTM localization. All these limits remain in the PR description.
MANIFEST.sha256hashes the bundle files. Source mzML files and FASTAs have theirown hashes in inputs.json/databases.json; newly generated search results are
checked against jobs.json. Public source URLs and checksums, not private artifact
links or unspecified engine HEAD revisions, define the reproduction contract.
Native changes
Initial methionine loss is implemented separately in #10358, enabled by default in ProSE. That option was not part of the historical benchmarks below.
The final-window peak-retention change is also available as the independent #10357, based on current
develop, with focused regression tests. The historical benchmark sources and results below remain pinned to the original experiments.scoring:method=autoandscoring:fragment_charges=autoselect HyperScore/single at configured fragment tolerance ≤0.1 Da or ≤100 ppm, calibrated/multiple otherwise. The calibrated score replaces factorial rewards with log-space binomial-tail evidence. It is a ranking statistic, not a calibrated PSM p-value.annotate:local_fragment_evidence=trueoptionally adds local peak-density surprise and fragment-assignment competition, computed before window/top-N filtering. It defaults to false.peaks:window_type=autokeeps the full local top-N quota in the last high-resolution 100-Da window. The previous width-scaled quota could discard even a strong singleton peak. Selection preserves aligned data arrays, with deterministic intensity ties. Low-resolution auto retains the existing filter.jumprestores the old filter;jump_fullexplicitly uses a full quota at every resolution.fragment:query_spectrum=rawretrieves candidates from original positive-intensity peaks before deisotoping/local filtering while scoring the processed spectra. The same candidate source is used by calibration and all single-file/chunked/multi-file paths. Additional peak lists are released before post-processing. This follows a separation observed in ANDES, without importing its trained scoring models.Raw retrieval remains opt-in;
processedis its default. It helps Astral, HF-X and Lumos LFQ, but has regressions on TMTpro and one timsTOF measurement, and incurs additional query work/memory. Higher candidate limits, looser ion-count thresholds, a different deisotoping charge bound and calibrated high-resolution scoring did not give consistent additional gains and were not adopted.Compatibility:
peaks:window_type=jumpplusfragment:query_spectrum=processedreproduces pre-follow-up preprocessing/retrieval. Additionally usescoring:method=hyperscoreandscoring:fragment_charges=singlefor pre-PR scoring. High-resolution scoring remains HyperScore/single, but its default peak filtering now changes.Follow-up: deduplicate peptidoforms before candidate selection
Repeated protein occurrences could occupy multiple candidate slots and distort runner-up and candidate-pool statistics.
peptide:deduplicate=trueis now the ProSE default for enumerated non-SNES indices. Exact modified sequences are collapsed before fragment emission; full protein mappings and target/decoy annotations are recovered against the complete FASTA. Shared target/decoy sequences remaintarget+decoy. Modification positions, actual I/L sequences, charges and isotope hypotheses remain distinct. Chunked scoring counts a hypothesis once across chunks; it retains extra identity keys in memory and still applies its candidate cap per chunk. Standalone FragmentIndex retains false by default; ProSE false restores legacy behavior. Compact fingerprints use exact sequence comparisons on hash ties, preserving collision safety and representative order.Also fixes an independently reproduced FragmentIndex rebuild bug: building twice accumulated old peptide coordinates (minimal probe 1 → 2, now 1 → 1). Rebuild replaces old buffers and failed builds remain unbuilt.
The rebuild fix was subsequently split into #10350 and merged into
developon 2026-09-30. It is already available upstream; the pinned historical benchmark sources still include it.Paired default-only evaluation, 20 measurements / 160,000 MS2 / three Percolator seeds:
Native TDC yield is unchanged on all 20 default comparisons. The benefit is chiefly better candidate lists/statistics for Percolator. Worst individual default loss: Astral B1 −1.27%; other losses include Exploris 10855 −0.76%, timsTOF 30 min −0.64%, Lumos LFQ 5199 −0.08%. This does not establish absence of HCD regressions.
On the three Astral runs with raw retrieval and mass accuracy, deduplication increases mean-PSM sums 7,551.7 → 7,818.0 (+3.53%), native 6,571 → 6,595 (+0.37%). Adding the existing optional local Percolator features increases 7,818.0 → 8,337.3 (+6.64%), with identical native counts. ANDES: 9,221.3. Relative shortfall becomes 18.11% → 15.22% → 9.59%. Cumulative yield gain versus
bcbc2f1: 32.09%, closing 69.62% of the original yield gap. These combinations remain opt-in; combined-feature validation is limited to three Astral measurements. No change to auto-score selection.All 26 new PINs contain zero redundant hypotheses (same scan/modified sequence/label/charge/isotope/mass). At seed 42, agreement with the 9,366 ANDES Astral assignments rises 6,717 → 7,304; missing top-10 sequences 426 → 402, no-candidate 23 → 23, below native rank one 718 → 679, rank-one-but-unaccepted 1,482 → 958. ANDES is not ground truth; most remaining disagreement concerns ranking/acceptance.
Validation: 26 searches + 78 Percolator runs, 8 final native/PIN byte comparisons including explicit legacy controls, and 3/3 targeted C++ tests. New tests cover candidate caps, complete protein evidence, shared/pure decoys, PTM sites/terminal contexts, charge/isotope hypotheses, single/chunked/multi-file pool statistics, and rebuilding/failed builds. The final compact implementation is byte-identical to the measured prototype in the checked cases. No public function signatures/bindings changed. Existing support-library build limitations below apply. Exact tested/published tree:
3ffb32ea9ac43d3e0a833863d6b6c38e602fcb72.Previous follow-up: native mass-accuracy ranking
Adds opt-in
scoring:method=mass_accuracyandscoring:mass_error_sd=7.0ppm. A Gaussian weight multiplies matched intensities and terminal-ion counts; fractional count rewards use nonnegative log-gamma terms. Matching tolerances and unweighted annotations are preserved. The same scorer runs during calibration and all single/chunked/multi-file searches, with C++ and Python APIs. The kernel assumes fragment errors centered at zero and is not fitted by precursor calibration. Auto scoring defaults are unchanged.A fixed 7-ppm kernel was motivated by ANDES'
PpmGaussianScorefeature. This is a native weighted HyperScore, not a copy of ANDES' strong-score formula or trained models. The paired comparison enables raw retrieval in both arms and adds no Percolator features.Values are mean accepted PSMs per measurement over seeds 1/42/137. Native percentage changes use separate-file native TDC counts. Astral improves 10.86% after Percolator and 23.24% natively (5,332 → 6,571) versus the previous raw-query arm; all nine paired Astral seed changes are positive. This closes 30.70% of the remaining yield gap to ANDES, leaving an 18.11% shortfall. The cumulative gain versus
bcbc2f1is 19.65%. These are yield comparisons, not independently established true-FDR gains.The option remains explicit: worst individual loss is −2.26% on Exploris/TMTpro 10855. Existing auto/default paths are byte-identical in final native/PIN checks on five instruments (Velos CID, Lumos CID/TMT, HF-X, Exploris TMTpro, timsTOF). Exploratory local evidence as the main native score was rejected after large CID losses. Adding the existing local Percolator features to mass weighting gives +6.56% on A2 against a matched local-feature control, but this combination has not been validated across instruments.
At seed 42, among 9,366 ANDES-accepted Astral sequence assignments, agreement increases 6,089 → 6,717; missing top-10 sequences 497 → 426, candidates below native rank one 1,041 → 718, rank-one-but-unaccepted assignments 1,716 → 1,482. The no-candidate count stays 23. ANDES assignments are not ground truth. At that stage redundant peptidoform rows were a separate diagnosed issue; the new deduplication follow-up above addresses it.
Validation for this follow-up: 21 searches + 63 Percolator runs, plus six final-build byte checks. All three targeted C++ tests pass; new coverage includes analytical mass weights, error units/detail semantics, invalid inputs, and single/chunked/multi-file dispatch and calibration. Entire modified binding module passes C++ syntax compilation; Python test added but not executed against a rebuilt extension. The targeted support-library build limitation below still applies. Exact tested/published source tree:
45b600076bdfc25aac867ef8022e82051ec96430.Earlier multi-instrument benchmark, before deduplication
20 measurements, six instrument models, seven groups, 8,000 MS2 spectra per measurement. Percolator 3.09.0
-Y -U, q≤0.01, means across runs and seeds 1/42/137. Per-file FDR evaluations are averaged, not pooled into a joint FDR. “Before” isbcbc2f1(the prior auto/auto PR state); “default” adds the filter fix; “raw” additionally enables original-peak retrieval. Local evidence is off in this table.The earlier low-resolution scoring improvement is preserved: auto/auto versus explicit HyperScore/single gives +8.8% on the three Velos runs and +2.2% on the three Lumos CID/TMT runs. This follow-up's default filter leaves all six low-resolution PINs and all seed results byte-identical.
The filter alone changes group yield by +2.01% Astral, +0.88% HF-X, +0.27% Lumos LFQ, −0.40% Exploris TMTpro and −0.83% timsTOF. Its worst individual loss is −1.16% (timsTOF 50 min). Raw retrieval's worst individual loss is −3.03% on that run. These are measured tradeoffs, not a claim of no HCD regressions.
Across the three Astral runs, raw retrieval improves native
(D+1)/T≤0.01yield from 4,837 to 5,332 (+10.23%) and Percolator yield by 7.93%. It closes 17.2% of the previous PSM-yield gap to ANDES, leaving a 26.1% relative shortfall. On exploratory A2 alone: 1,852.3 → 2,091.0 PSMs (+12.88%); adding the existing optional local evidence gives 2,261.7 (+22.10%). The latter combination was not validated across the full matrix and is not a new default.Gap after retrieval, before mass weighting
For the 9,366 ANDES-accepted Astral sequence assignments at seed 42:
Missing candidates/top-10 sequences decrease 70.3% (1,750 → 520). Most remaining disagreement now concerns ranking/acceptance. ANDES assignments are a comparison set, not ground truth; sequences are compared without modifications and with I/L equivalence.
Validation and reproducibility
HyperScore_test,ProSEAlgorithm_test,FragmentIndex_test). Coverage includes last-window quotas, singleton peaks, aligned peak arrays/RT order, preservation of original isotope peaks for retrieval, candidate recovery despite strict scoring peak selection, calibration and chunked multi-file searches.git diff --checkpass. The public reproduction bundle retains parameters, input/result checks, evaluation code and rejected experimental patches; its launcher regenerates native/PIN tables and all target/decoy Percolator outputs.Inputs are frozen within each comparison: target/decoy FASTA, Trypsin/P, two missed cleavages, length 7–40, fixed CAM(C), at most one oxidation(M), matching label modifications, known precursor charges 2–5, 20-ppm precursor tolerance (50 ppm for TMTpro), 20-ppm or 0.5-Da fragment tolerance, equivalent signed isotope hypotheses, calibration off. PIN masses are consistently normalized; externally predicted RT/intensity features are excluded. Native evaluation uses a rank-one competition, decoy-favoring exact ties and whole score groups with
(D+1)/T≤0.01.Data correction: this table uses the completely verified HYE FASTA (31,889 targets, complete target SHA256
d9ac434d88492c10c8e9a587ee7dbc9480fa0995fa07a6ba35a7da8abf39aa25). Earlier HF-X benchmark tables in this PR used an incomplete HYE copy and are superseded; they must not be used as validation of identification yield. The archive's “Eclipse” folder contains Exploris-480 data according to mzML metadata. ANDES auto takes its previously reported low-resolution CID fallback on timsTOF, so that primary cross-engine comparison is not resolution-matched; the paired within-ProSE tests remain valid.Sources: OpenMS benchmark archive, timsTOF study PXD053748, ANDES source pinned to
b7eaece219ef45198eb233030cf9d69075988f72. Baseline ProSE isbcbc2f13052bbfb90b9441bed1e298a67b0981c7.Nominal q-values are not independently measured true FDR. Seeds measure rescorer variation, not biological replication. A2 was exploratory; the remaining files broaden instrument/run coverage but are not a blinded benchmark. SCIEX/Waters, ETD and DIA performance are not established here. Raw retrieval also costs more query work (A2 roughly 22 s filter-only vs 47 s raw under concurrent load; not a controlled runtime benchmark).
Summary by CodeRabbit