Skip to content

MapAlignmentAlgorithmIdentification: setReference() reads all its parameters - #10568

Merged
timosachsenberg merged 1 commit into
developfrom
fix/mapalign-setreference-params
Oct 14, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
fix/mapalign-setreference-params

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

MapAlignmentAlgorithmIdentification::setReference() reads use_feature_rt, score_cutoff and score_type itself, because checkParameters_() only runs in align(). It did not read min_score and use_adducts. A reference set before the first align() call (this is what MapAlignerIdentification -reference:file does) was therefore filtered with the member defaults instead of the parameters:

  • min_score fell back to the constructor default of 0. With score_cutoff, a reference with lower-is-better scores (e.g. PEPs) kept no identifications, and setReference() threw MissingInformation ("Could not extract retention time information from the reference file").
  • use_adducts fell back to the member default false, while the parameter default is "true". In .oms input, adducted identifications of the reference were keyed without their adduct and those of the inputs with it. They shared no sequences, so the alignment had no data points ("No reference RT information left after filtering!").

Fix

setReference() now also reads min_score and use_adducts from the parameters, the same way checkParameters_() does.

Tests

  • Two new [EXTRA] sections in MapAlignmentAlgorithmIdentification_test, each with a reference set before align():
    • a feature-map reference with PEP scores, score_cutoff and min_score 0.05;
    • an IdentificationData reference whose oligo matches carry a sodium adduct.
  • Both sections fail without the fix (MissingInformation; 0 instead of 5 data points) and pass with it.
  • Locally, all 147 tests matching MapAlignerIdentification|MapAlignerTreeGuided|MapAlignmentAlgorithm*|ProteomicsLFQ pass. Outputs are unchanged: the existing -reference:file tests leave score_cutoff off and use featureXML, which has no adducts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Alignment now applies score cutoffs and adduct settings before processing reference identifications, improving results for lower-is-better scores and adducted inputs.
  • Tests
    • Added regression coverage for score cutoffs and sodium-adducted identifications.

…ameters

setReference() read 'use_feature_rt', 'score_cutoff' and 'score_type'
itself, because checkParameters_() runs only in align(), but not
'min_score' and 'use_adducts'. A reference set before the first align()
call (MapAlignerIdentification -reference:file) was therefore filtered with
the member defaults instead of the parameters:

- 'min_score' was 0: with 'score_cutoff', a reference with lower-is-better
  scores (e.g. PEPs) kept no identifications and setReference() threw
  MissingInformation ("Could not extract retention time information from
  the reference file").
- 'use_adducts' was false, its parameter default "true": adducted
  identifications of the reference (.oms input) were keyed without their
  adduct, those of the inputs with it, so they shared no sequences and the
  alignment had no data points.

Tests cover both with a reference set before align(); both fail without
the fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav

Copy link
Copy Markdown
Contributor Author

build-and-test (windows-2025, cl.exe) failed in "Dependencies: Windows", before anything was built or tested. Chocolatey got 504 (Gateway Timeout) from community.chocolatey.org while installing rsync 6.2.7. This is an infrastructure failure, not caused by this change, and there is nothing to port. I'll re-run the failed job once when the workflow run has finished.


Generated by Claude Code

@timosachsenberg
timosachsenberg merged commit 9a3a6c2 into develop Oct 14, 2026
29 of 30 checks passed
@timosachsenberg
timosachsenberg deleted the fix/mapalign-setreference-params branch October 14, 2026 18:12
timosachsenberg pushed a commit that referenced this pull request Oct 14, 2026
… regex, #10567 negative-mode ion mobility)

#10568 adds a test that a reference set before align() keys adducted
oligonucleotide matches with their adduct; it is ported to the owning
model (an oligonucleotide run whose matches carry the sodium adduct of
the ion, as NucleicAcidSearchEngine stores it). Without the fix it fails
here too (0 instead of 5 alignment points).

Conflict: CHANGELOG (both entries kept; the #10568 entry speaks of
identification data input instead of .oms, which this branch removes).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
timosachsenberg pushed a commit that referenced this pull request Oct 15, 2026
#10547)

Conflicts:
- FileConverter: develop no longer converts peaks to consensus maps
  (#10561); the native marking of unassigned identifications stays.
- ConversionHelper_test: develop's PeakMap conversion tests go with the
  conversion; this branch's identification section stays.
- MapAlignmentAlgorithmIdentification: #10576 removed better_. The map
  path takes the score direction from the run's primary score definition,
  and with use_feature_rt a feature without a passing identification is no
  alignment point (as #10576 does for peptide identifications).
- MapAlignmentAlgorithmIdentification_test: the #10576 section and the
  #10568 setReference() section build native map identifications. A map
  cannot mix score directions (the import rejects it), so the test expects
  that rejection and checks both directions separately, with an
  unidentified first feature.

MapAlignmentAlgorithmPoseClustering: develop's selectFeatures_() (#10561)
copied only the legacy identifications, while StablePairFinder here reads
the native ones through the feature links. It now uses the new
MapConversion::convert() overload for selected features, which keeps the
identification data of the selected features like the first-n overload.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
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.

3 participants