Skip to content

[TEST] Class tests instead of TOPP runs that only match a log line (UniPEFF isoform summaries, FFId peptide count) - #10628

Merged
timosachsenberg merged 2 commits into
developfrom
test/class-tests-for-log-lines
Oct 19, 2026
Merged

timosachsenberg merged 2 commits into
developfrom
test/class-tests-for-log-lines

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Four TOPP tests started a tool a second time with the same inputs as another test, only to match one log line with PASS_REGULAR_EXPRESSION. This PR checks the same thing in class tests instead, with more precise assertions, and drops those runs.

UniPEFF isoform summaries

TOPP_UniPEFF_12_summary, TOPP_UniPEFF_15_summary_applied and TOPP_UniPEFF_15_summary_skipped each repeated a UniPEFF run to match one line of the run summary.

  • Code moved, unchanged: entry preparation moves from the anonymous namespace of UniPEFF.cpp into UniPEFFEntries (include/UniPEFFEntries.h, source/UniPEFFEntries.cpp). That covers prepareEntry() with feature classification, isoform reconstruction, half-cystine merge, disulfide handling and annotation IDs, the types it builds, and IsoformScopedTracker. The tool keeps the writers, ptmlist/OBO loading and option handling.
  • New class test: UniPEFFEntries_test rebuilds the entries of the UniPEFF_4 and UniPEFF_5 fixtures and checks, for each feature annotated on an isoform, where it ends up:
    • which canonical entry or isoform entry it goes to, and at which position;
    • that the disulfide label is set and the variant lands on the isoform;
    • which isoforms are skipped.
  • Summary counts checked: 5 not applied in 2 entries; 3 written in 1 entry and 2 not applied in 1 entry; 5 not applied with -omit_isoforms.
  • Outputs unchanged: the PEFF outputs of all UniPEFF TOPP tests are the same.

FeatureFinderIdentification peptide count

TOPP_FeatureFinderIdentification_summary_count repeated FeatureFinderIdentification_1 to match "22 peptides identified". It guarded a count that was once an uninitialised member.

  • The class test now runs run() on a small synthetic MS1 experiment: three peptides, one of them identified twice.
  • It checks the count and the summary line.
  • With the assignment in run() removed, the test fails.

Validation

  • Build is clean.
  • ctest -R 'UniPEFF|UniProtXMLFile|FeatureFinderIdentification': 58/58 passed.
  • Mutation checks:
    • removing the "not applied" increment in prepareEntry() fails UniPEFFEntries_test;
    • removing n_peptides_ = peptide_map_.size() from run() fails the FFId test.

Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Peptide summary statistics now count distinct identified peptides, even when a peptide appears more than once, and report zero when no peptides are identified.
    • Empty mass spectrometry experiments are rejected with an argument error.
  • UniPEFF
    • Isoform-specific annotations are applied to reconstructed isoforms and tracked when they cannot be applied or the isoform is not included.
    • Annotations are finalized against the sequence of the canonical entry or reconstructed isoform, and disulfide bond positions are checked against the entry sequence.

…isoform summaries, FFId peptide count

TOPP_UniPEFF_12_summary, _15_summary_applied and _15_summary_skipped each ran UniPEFF again only to
match one summary line. The entry preparation (prepareEntry() with feature classification, isoform
reconstruction, half-cystine and disulfide handling, and the isoform-scoped counts) moves from the
anonymous namespace of UniPEFF.cpp into UniPEFFEntries (include/, source/), unchanged; the tool
keeps writing, ptmlist/OBO loading and the run summary. UniPEFFEntries_test rebuilds the entries of
UniPEFF_4 and UniPEFF_5 and checks where every isoform-scoped feature goes and the counts of the
summary (5 not applied in 2 entries; 3 written in 1 entry and 2 not applied in 1 entry, 5 with
-omit_isoforms). The PEFF outputs of all UniPEFF tests are unchanged.

TOPP_FeatureFinderIdentification_summary_count ran FFId again only to match "22 peptides
identified" (the count was once an uninitialised member). The class test now runs run() on a small
MS1 experiment and checks the count and the summary line; it fails if run() does not set it.

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

This comment was marked as off-topic.

timosachsenberg commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Windows jobs: Chocolatey outage, not this PR

build-and-test (windows-2025, cl.exe) and build-wheels-windows fail in their dependency step, before configure or build. Chocolatey returns 503 (Service Unavailable) for rsync (community.chocolatey.org/api/v2). This happened on 6630fd7 and again on fed091f. No code of this PR is compiled or run in those jobs, and the outage affects the Windows jobs of any PR right now.

No fix exists yet. #10560 moved rclone and ccache to OpenMS/chocolatey-packages, but rsync still comes from the community feed. Moving rsync to that source the same way would make the jobs independent of the community feed; that belongs in its own CI PR. Once the run on fed091f has finished, I'll re-run the failed Windows jobs once.

Doxygen_Warning_test (Linux, 6630fd7): this PR's, fixed

The comments moved from the anonymous namespace of UniPEFF.cpp into UniPEFFEntries.h, where Doxygen reads them. feature/@description, <begin>/<end> and \DisulfideBond were unescaped. fed091f fixes the markup.


Generated by Claude Code

… &lt;begin&gt;, \\DisulfideBond)

The comments came from the anonymous namespace of UniPEFF.cpp, which Doxygen does not read; in
the header they made Doxygen_Warning_test fail.

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

Copy link
Copy Markdown
Contributor Author

Makes sense. Some topp tool tests should indeed be class tests

@timosachsenberg
timosachsenberg merged commit 77cccda into develop Oct 19, 2026
18 of 19 checks passed
@timosachsenberg
timosachsenberg deleted the test/class-tests-for-log-lines branch October 19, 2026 09:27
timosachsenberg pushed a commit that referenced this pull request Oct 19, 2026
…#10301, #10611, #10606, #10608, #10609, #10617, #10610, #10578 ProSE Percolator rescoring, #10628)

Only CHANGELOG conflicted; both entries are kept. Develop's changes to FalseDiscoveryRate,
IDScoreGetterSetter, ConsensusMapMergerAlgorithm, FileInfo and ProSE work on the established
classes, which this branch keeps as they are.

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 19, 2026
#10612, #10301, #10578 ProSE, #10628)

Develop's changes to the map-level identification code are ported to identification data:

- FalseDiscoveryRate::applyBasicPeptideLevel(ConsensusMap&) (#10617): in the scope, an identification
  keeps its best match and the matches tied with it whose peptide has an FDR; the others are removed
  (they would keep their search score under the FDR score type). Without decoys it keeps only targets,
  and nothing if its best match is not a target, as before. The best match is the first of the best
  score, as develop's sort makes it; q-values on a map were already lower-is-better (the FDR score
  definition). Develop's two test sections are rewritten for identification data.
- ConsensusMapMergerAlgorithm::mergeAllIDRuns() (#10618) throws Exception::MissingInformation for a
  map without runs. Identification data has no identification without its run, so the test uses a
  map without identifications.
- FileInfo (#10612) counts the occurrences per map id on the linked identifications (auto-merged).
- IsobaricWorkflow_hyperscore_peptide_out.consensusXML (#10617): one identification whose best match
  is a decoy loses its matches, as on develop; develop leaves it the score type of the search
  (hyperscore, higher is better), identification data the score type of its run (peptide q-value).
  Features, matches and values are the same as develop's.
- FeatureFinderIdentificationAlgorithm_test (#10628): the peptide identifications of the new section
  have a score type and scores, which the conversion to identification data needs.

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.

2 participants