Skip to content

[ProSE] Default 10/20 ppm tolerances + suffix-aware decoy detection - #9632

Closed
timosachsenberg wants to merge 3 commits into
developfrom
feat/prose-default-tolerances-suffix-decoys
Closed

timosachsenberg wants to merge 3 commits into
developfrom
feat/prose-default-tolerances-suffix-decoys

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two small ProSE (ProSEAlgorithm) changes requested by the user:

  1. New default mass tolerances matching typical high-resolution Orbitrap settings:

    • precursor:mass_tolerance_lower / _upper: 20 → 10 ppm
    • fragment:mass_tolerance: 10 → 20 ppm
  2. Suffix-aware decoy detection. Previously ProSE classified a protein as a decoy only when its accession started with decoy_prefix (StringUtils::hasPrefix). Databases that tag decoys at the end (e.g. PROT_DECOY) were silently treated as targets. Now both orientations of the same marker are recognised — no new parameter:

    • isDecoyAccession_() tests the marker as prefix or suffix.
    • detectDecoyStringPosition_() inspects the database and passes the correct decoy_string_position (prefix/suffix) to PeptideIndexing, instead of the previously hardcoded "prefix".

    The decoy_prefix parameter description was updated to reflect that the marker is matched as either prefix or suffix.

Tests

Added two sections to ProSEAlgorithm_test.cpp:

  • verifies the new default tolerances (10/10/20 ppm),
  • verifies prefix/suffix decoy classification and database-driven position detection.

ctest -R ProSEAlgorithm_test passes locally.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated default precursor/fragment mass tolerance values (precursor lower: 10.0; fragment: 20.0).
    • Improved decoy detection/handling, including consistent decoy marker orientation and more reliable decoy-aware FDR behavior.
  • Documentation
    • Refreshed ProSE tool parameter documentation for -Search:decoys (auto|generate|ignore).
  • Tests
    • Extended tests for default tolerance settings and decoy detection/augmentation behavior across decoy modes.
  • Chores
    • Updated TOPP test configurations and INI files to use -Search:decoys auto / string-based decoy modes.

…tion

Change the ProSEAlgorithm defaults to a precursor mass tolerance of
10 ppm (lower/upper) and a fragment mass tolerance of 20 ppm, matching
typical high-resolution Orbitrap settings.

Recognise pre-existing decoys whether the configured decoy marker is a
prefix or a suffix of the protein accession (e.g. "DECOY_PROT" or
"PROT_DECOY"). No extra parameter: isDecoyAccession_() tests both
orientations, and detectDecoyStringPosition_() picks the right
"decoy_string_position" for PeptideIndexing from the database itself.

Adds test coverage for the new defaults and the prefix/suffix detection.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

ProSEAlgorithm introduces a DecoyMode_ enum and DecoyStrategy_ struct to model decoy handling explicitly. SearchResult and SearchContext now carry resolved decoy metadata (decoy_string, decoy_is_prefix, have_decoys) through all search paths instead of relying on runtime inference from parameters. The decoys parameter changes from boolean to a mode string (auto|generate|ignore), and FASTAContainer::findDecoyString() gains a quiet parameter to suppress logging during internal detection. Default precursor lower tolerance changes to 10.0 (was 20.0) and fragment tolerance to 20.0 (was 10.0). All four search paths (chunked, in-memory, single-file, multi-file) now resolve and propagate the consistent decoy strategy to PeptideIndexing and FDR stages.

Changes

ProSEAlgorithm decoy strategy model and metadata propagation

Layer / File(s) Summary
Decoy metadata contracts
src/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.h
SearchResult and SearchContext gain decoy_string, decoy_is_prefix, and have_decoys fields to carry resolved decoy metadata through the search workflow and into downstream protein-FDR and PeptideIndexing stages.
Strategy types and helper method declarations
src/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.h
Introduces protected enum DecoyMode_ (AUTO, GENERATE, IGNORE), protected struct DecoyStrategy_ with marker and orientation fields, protected method resolveDecoyStrategy_() to resolve concrete decoy behavior from FASTA and mode, and protected method fragmentIndexParameters_() to provide FragmentIndex-safe parameters.
Default tolerance and decoy mode parameter updates
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
Changes precursor:mass_tolerance_lower default from 20.0 to 10.0, fragment:mass_tolerance default from 10.0 to 20.0; replaces boolean decoys parameter with string modes (auto|generate|ignore) and updates help text and decoy_prefix documentation.
Internal setup and decoy mode mapping
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
Adds FASTA container header for detection logic; updates updateMembers_() to derive DecoyMode_ enum from the decoys parameter string.
Silent decoy detection support
src/openms/include/OpenMS/DATASTRUCTURES/FASTAContainer.h, src/openms/source/*
FASTAContainer::findDecoyString() gains optional quiet parameter (default false) that suppresses ERROR and WARN log messages when unable to determine decoy string or position, allowing internal silent detection during strategy resolution.
Strategy resolution and decoy-augmented database building
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
Implements resolveDecoyStrategy_() to detect existing decoys (or lack thereof) in input FASTA using quiet mode, decide whether to generate or strip based on DecoyMode_, and return DecoyStrategy_ with effective marker string and prefix/suffix orientation; implements buildDecoyAugmentedDB_() accepting DecoyStrategy_ and building accessions using the resolved marker.
prepareContext() strategy resolution
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
prepareContext() resolves decoy strategy once, populates context fields (decoy_string, decoy_is_prefix, have_decoys) for use in PeptideIndexing and PSM-level FDR downstream, and builds decoy-augmented database using the resolved strategy.
search() entry point with strategy routing
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
search() method resolves decoy strategy, uses it for single-chunk or chunked database decisions, sets context decoy metadata fields for single-chunk case, and routes strategy parameter to chunked search path.
Chunked search path implementation
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
searchChunked_() signature updated to accept resolved DecoyStrategy_ parameter; calibration and chunk-loop FragmentIndex initialization switch to fragmentIndexParameters_() (suppressing decoy generation); PeptideIndexing configuration receives decoy_string and decoy_string_position from strategy; PSM FDR gating uses strategy.have_decoys instead of prefix-only detection.
In-memory context-based search
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
In-memory search path populates PeptideIndexing decoy_string and decoy_string_position from context-resolved strategy fields; PSM FDR gating uses ctx.have_decoys; warning text updated for decoys=ignore/no-decoys case.
Single-file search with picked-protein FDR
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
Single-file path resolves decoy strategy from input FASTA, uses strategy.have_decoys and strategy marker/orientation for picked-protein FDR instead of inferring from decoy_prefix_ prefix scan alone.
Multi-file searchWithModificationAnalysis
src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
Multi-file search resolves decoy strategy once from shared input FASTA and stores into MultiFileResult fields (decoy_string, decoy_is_prefix, have_decoys); uses strategy across all per-file processing: calibration, scoring, PeptideIndexing, and PSM-level FDR for both chunked and non-chunked shared-context variants.
ProSE.cpp tool integration
src/topp/ProSE.cpp
Tool documentation updated to explain -Search:decoys mode semantics (auto, generate, ignore); merged-output workflow uses mfres.decoy_string and mfres.decoy_is_prefix resolved by the search (instead of user parameter) for picked-protein FDR, and gates FDR application on mfres.have_decoys.
Test infrastructure and white-box helpers
src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp
Test subclass exposes resolveDecoyStrategy_ and DecoyStrategy_ via using-declarations for testing internal strategy resolution.
Test coverage for parameter defaults and strategy resolution
src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp
New test asserts default mass tolerance values (precursor 10.0 ppm, fragment 20.0 ppm); comprehensive test exercises strategy resolution across auto/generate/ignore modes with and without existing decoys, validates strategy fields and augmented-database entry counts.
Test fixture and synthetic test migrations
src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp
Updates shared calibration fixture from decoys=false to decoys=ignore; updates open-search, FDR modification, closed-search, ion-mobility, edge-case, context-equivalence, and multi-file tests to use decoys=ignore or decoys=auto consistent with new mode semantics.
TOPP test configuration updates
src/tests/topp/CMakeLists.txt, src/tests/topp/ProSE_*.ini
TOPP CMakeLists.txt explicitly passes -Search:decoys auto for DDA tests; INI files update decoys parameter from boolean false to string ignore with restrictions="auto,generate,ignore".

Possibly related issues

  • ProSE improvements #9630: This PR directly implements the items from that issue — adding decoy detection support for both prefix and suffix markers via the new resolveDecoyStrategy_() helper, and correcting the default precursor tolerance to 10.0 ppm and fragment tolerance to 20.0 ppm.

Poem

🐇 A rabbit sniffs the FASTA trail,
With prefix here and suffix there —
No decoy string shall ever fail
To be detected with such care!
The tolerances now sit just right,
Ten for precursor, twenty bright. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately captures both main changes: updated default 10/20 ppm tolerances and suffix-aware decoy detection. It is concise, specific, and clearly summarizes the primary objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/prose-default-tolerances-suffix-decoys

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp`:
- Line 127: The "decoy_prefix" parameter on line 127 lacks validation to ensure
it is non-empty when decoy generation is enabled. This causes a critical issue
where empty decoy markers result in identical decoy and target identifiers at
line 815 (where `e.identifier = decoy_prefix_ + e.identifier`), breaking the
decoy-based FDR logic. Add validation logic to enforce that the decoy_prefix
parameter must be non-empty when decoy generation is enabled, and raise an error
or throw an exception if this constraint is violated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af608372-ce09-4e43-aa18-192d54e3f866

📥 Commits

Reviewing files that changed from the base of the PR and between 147205a and 5cc0416.

📒 Files selected for processing (3)
  • src/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.h
  • src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
  • src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp

timosachsenberg and others added 2 commits June 19, 2026 13:54
)

* [ProSE] Auto decoy mode: detect existing or generate, with suffix support

Replace the boolean 'decoys' (true/false) with a three-way mode that lets
the user decide less:

  - auto (default): ensure decoys are available for target-decoy FDR — reuse
    decoys already present in the database (marker auto-detected via
    DecoyHelper, prefix or suffix, falling back to decoy_prefix for custom
    markers) or generate them from the targets if none are found.
  - generate: always (re)build decoys from the targets; any pre-existing
    decoys are stripped first to avoid decoy-of-decoy entries.
  - ignore: search the targets only; any decoys in the database are removed.

A single resolveDecoyStrategy_() resolves the decoy handling once per input
database into a DecoyStrategy_ (generate / strip / effective marker+position
/ have_decoys). The result is threaded through every search path (in-memory,
chunked, single-context, file-based, multi-file) via the SearchContext and a
new searchChunked_ parameter, so PeptideIndexing and picked-protein FDR use
the same decoys that were searched. This fixes prior latent bugs where the
marker/position for external (non-DECOY_, or suffix) decoys was hardcoded.

The effective marker is also surfaced on MultiFileSearchResult so the ProSE
tool's -out_merged protein-FDR step recognises the right decoys.

FragmentIndex declares its own unused boolean 'decoys' flag; ProSE now hands
it FI-safe parameters (fragmentIndexParameters_) so the enum value never trips
FI's validation.

Supersedes the prefix/suffix helpers from the parent branch with the more
capable DecoyHelper-based detection. Updates the class test (auto/generate/
ignore + custom-marker fallback), the TOPP reference inis, and the DDA test
commands (the old valueless -Search:decoys flag now takes an explicit value).

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

* [ProSE] Silence DecoyHelper noise on target-only databases

DecoyHelper::findDecoyString logged ERROR/WARN ("Unable to determine decoy
string...") whenever fewer than 40% of proteins carried a decoy marker. For
ProSE's auto/generate modes a target-only database is a normal case (decoys
are then synthesised), so the message was misleading noise.

Add an opt-in 'quiet' flag (default false → unchanged for all existing
callers such as PeptideIndexing) that suppresses these log lines, and pass
quiet=true from ProSE's resolveDecoyStrategy_, which handles the negative
result itself.

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

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp`:
- Around line 211-310: Add a new test case after the existing test cases that
specifically validates the suffix-decoy strategy path. Create a test scenario
with FASTAEntry identifiers that use decoy markers as suffixes (e.g.,
"sp|P1|A_DECOY") instead of prefixes, configure the decoy_prefix parameter
accordingly, call resolveDecoyStrategy_() and buildDecoyAugmentedDB_() with this
suffix-based database, and verify that the returned DecoyStrategy_ object has
is_prefix set to false while still correctly identifying and handling the
decoys. This ensures the suffix path in resolveDecoyStrategy_() is explicitly
tested and cannot regress undetected.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 372428e3-47ce-4c5c-8119-f2995f14de89

📥 Commits

Reviewing files that changed from the base of the PR and between 5cc0416 and efa8d19.

📒 Files selected for processing (9)
  • src/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.h
  • src/openms/include/OpenMS/DATASTRUCTURES/FASTAContainer.h
  • src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp
  • src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp
  • src/tests/topp/CMakeLists.txt
  • src/tests/topp/ProSE_1.ini
  • src/tests/topp/ProSE_2.ini
  • src/tests/topp/ProSE_4.ini
  • src/topp/ProSE.cpp

Comment on lines +211 to +310
START_SECTION(([EXTRA] resolveDecoyStrategy_ / buildDecoyAugmentedDB_: auto/generate/ignore))
{
// Target+decoy database (50% decoys, conventional DECOY_ prefix).
const std::vector<FASTAFile::FASTAEntry> td_db = {
FASTAFile::FASTAEntry("sp|P1|A", "", "PEPTIDEKAAR"),
FASTAFile::FASTAEntry("sp|P2|B", "", "SAMPLERPEPTIDEK"),
FASTAFile::FASTAEntry("DECOY_sp|P1|A", "", "RAAKEDITPEP"),
FASTAFile::FASTAEntry("DECOY_sp|P2|B", "", "KEDITPEPRELPMAS") };
// Target-only database.
const std::vector<FASTAFile::FASTAEntry> t_db = {
FASTAFile::FASTAEntry("sp|P1|A", "", "PEPTIDEKAAR"),
FASTAFile::FASTAEntry("sp|P2|B", "", "SAMPLERPEPTIDEK") };

auto count_prefix = [](const std::vector<FASTAFile::FASTAEntry>& db, const std::string& pre)
{
Size n = 0;
for (const auto& e : db) if (e.identifier.rfind(pre, 0) == 0) ++n;
return n;
};

// --- auto: reuse existing decoys (detected), do not generate -------------
{
ProSEAlgorithm_test algo;
Param p = algo.getParameters();
p.setValue("decoys", "auto");
algo.setParameters(p);
ProSEAlgorithm_test::DecoyStrategy_ s = algo.resolveDecoyStrategy_(td_db);
TEST_EQUAL(s.generate, false)
TEST_EQUAL(s.strip_existing, false)
TEST_EQUAL(s.have_decoys, true)
TEST_STRING_EQUAL(s.decoy_string, "DECOY_")
TEST_EQUAL(s.is_prefix, true)
// DB is searched unchanged.
std::vector<FASTAFile::FASTAEntry> built = algo.buildDecoyAugmentedDB_(td_db, s);
TEST_EQUAL(built.size(), 4)
TEST_EQUAL(count_prefix(built, "DECOY_"), 2)
}

// --- auto: no decoys present -> generate them ---------------------------
{
ProSEAlgorithm_test algo;
Param p = algo.getParameters();
p.setValue("decoys", "auto");
algo.setParameters(p);
ProSEAlgorithm_test::DecoyStrategy_ s = algo.resolveDecoyStrategy_(t_db);
TEST_EQUAL(s.generate, true)
TEST_EQUAL(s.strip_existing, false)
TEST_EQUAL(s.have_decoys, true)
TEST_STRING_EQUAL(s.decoy_string, "DECOY_")
std::vector<FASTAFile::FASTAEntry> built = algo.buildDecoyAugmentedDB_(t_db, s);
TEST_EQUAL(built.size(), 4) // 2 targets + 2 generated decoys
TEST_EQUAL(count_prefix(built, "DECOY_"), 2)
}

// --- ignore: strip existing decoys, search targets only -----------------
{
ProSEAlgorithm_test algo;
Param p = algo.getParameters();
p.setValue("decoys", "ignore");
algo.setParameters(p);
ProSEAlgorithm_test::DecoyStrategy_ s = algo.resolveDecoyStrategy_(td_db);
TEST_EQUAL(s.generate, false)
TEST_EQUAL(s.strip_existing, true)
TEST_EQUAL(s.have_decoys, false)
std::vector<FASTAFile::FASTAEntry> built = algo.buildDecoyAugmentedDB_(td_db, s);
TEST_EQUAL(built.size(), 2) // decoys removed
TEST_EQUAL(count_prefix(built, "DECOY_"), 0)
}

// --- generate: strip pre-existing decoys, then regenerate from targets ---
{
ProSEAlgorithm_test algo;
Param p = algo.getParameters();
p.setValue("decoys", "generate");
algo.setParameters(p);
ProSEAlgorithm_test::DecoyStrategy_ s = algo.resolveDecoyStrategy_(td_db);
TEST_EQUAL(s.generate, true)
TEST_EQUAL(s.strip_existing, true)
TEST_EQUAL(s.have_decoys, true)
std::vector<FASTAFile::FASTAEntry> built = algo.buildDecoyAugmentedDB_(td_db, s);
TEST_EQUAL(built.size(), 4) // 2 targets + 2 freshly generated
TEST_EQUAL(count_prefix(built, "DECOY_"), 2)
}

// --- custom marker outside the common vocabulary: literal fall-back -----
{
ProSEAlgorithm_test algo;
Param p = algo.getParameters();
p.setValue("decoys", "auto");
p.setValue("decoy_prefix", "BOGUS_");
algo.setParameters(p);
const std::vector<FASTAFile::FASTAEntry> custom_db = {
FASTAFile::FASTAEntry("sp|P1|A", "", "PEPTIDEKAAR"),
FASTAFile::FASTAEntry("BOGUS_sp|P1|A", "", "RAAKEDITPEP") };
ProSEAlgorithm_test::DecoyStrategy_ s = algo.resolveDecoyStrategy_(custom_db);
TEST_EQUAL(s.generate, false) // existing decoys recognised via fall-back
TEST_EQUAL(s.have_decoys, true)
TEST_STRING_EQUAL(s.decoy_string, "BOGUS_")
TEST_EQUAL(s.is_prefix, true)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add an explicit suffix-decoy strategy test case.

This section validates only prefix-oriented decoy markers. The suffix path (is_prefix == false) for resolveDecoyStrategy_() is not asserted, so the core suffix-aware behavior can regress undetected.

Suggested test addition
   // --- custom marker outside the common vocabulary: literal fall-back -----
   {
     ProSEAlgorithm_test algo;
@@
     TEST_STRING_EQUAL(s.decoy_string, "BOGUS_")
     TEST_EQUAL(s.is_prefix, true)
   }
+
+  // --- auto: reuse existing suffix decoys -------------------------------
+  {
+    ProSEAlgorithm_test algo;
+    Param p = algo.getParameters();
+    p.setValue("decoys", "auto");
+    algo.setParameters(p);
+    const std::vector<FASTAFile::FASTAEntry> suffix_db = {
+      FASTAFile::FASTAEntry("sp|P1|A", "", "PEPTIDEKAAR"),
+      FASTAFile::FASTAEntry("sp|P2|B", "", "SAMPLERPEPTIDEK"),
+      FASTAFile::FASTAEntry("sp|P1|A_DECOY", "", "RAAKEDITPEP"),
+      FASTAFile::FASTAEntry("sp|P2|B_DECOY", "", "KEDITPEPRELPMAS") };
+    ProSEAlgorithm_test::DecoyStrategy_ s = algo.resolveDecoyStrategy_(suffix_db);
+    TEST_EQUAL(s.generate, false)
+    TEST_EQUAL(s.strip_existing, false)
+    TEST_EQUAL(s.have_decoys, true)
+    TEST_EQUAL(s.is_prefix, false)
+  }

Based on learnings from PR objectives, suffix-aware decoy classification is a required behavior and should be explicitly covered in tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tests/class_tests/openms/source/ProSEAlgorithm_test.cpp` around lines 211
- 310, Add a new test case after the existing test cases that specifically
validates the suffix-decoy strategy path. Create a test scenario with FASTAEntry
identifiers that use decoy markers as suffixes (e.g., "sp|P1|A_DECOY") instead
of prefixes, configure the decoy_prefix parameter accordingly, call
resolveDecoyStrategy_() and buildDecoyAugmentedDB_() with this suffix-based
database, and verify that the returned DecoyStrategy_ object has is_prefix set
to false while still correctly identifying and handling the decoys. This ensures
the suffix path in resolveDecoyStrategy_() is explicitly tested and cannot
regress undetected.

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.

1 participant