Repository navigation
Rename PeptideDataBaseSearchFI to ProSE - #9137
Conversation
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…header Rename the class declaration, constructor, and all method signatures from PeptideSearchEngineFIAlgorithm to ProSEAlgorithm inside the library header. Update doc comment to reference ProSE TOPP tool. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…source Rename all ~30 occurrences of PeptideSearchEngineFIAlgorithm to ProSEAlgorithm in the library source file. Also update the search engine identifier from "PeptideDataBaseSearchFI" to "ProSE" and the identifier prefix from "PDBSFI_" to "ProSE_". Update the include directive to reference the renamed header. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…m_test Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…pyOpenMS bindings Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
… names Update PSEFIA.cpp comment references in test, FragmentIndex.h doc comment, and BrukerTimsFile_test.cpp include/usage. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRenames the fragment-index-based peptide search tool and algorithm: Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pyOpenMS/bindings/bind_misc.cpp (1)
3338-3352: 🛠️ Refactor suggestion | 🟠 MajorAdd copy/deepcopy bindings for
ProSEAlgorithmto match pyOpenMS binding contract.
ProSEAlgorithmcurrently exposes only the default constructor (Line 3351). Please also expose copy constructor,__copy__, and__deepcopy__like other bound classes.♻️ Proposed patch
auto prosealgorithm_class = nb::class_<OpenMS::ProSEAlgorithm, OpenMS::DefaultParamHandler>(m, "ProSEAlgorithm", @@ - .def(nb::init<>()) + .def(nb::init<>()) + .def(nb::init<const OpenMS::ProSEAlgorithm&>()) + .def("__copy__", [](const OpenMS::ProSEAlgorithm& self) { return OpenMS::ProSEAlgorithm(self); }) + .def("__deepcopy__", [](const OpenMS::ProSEAlgorithm& self, nb::dict) { return OpenMS::ProSEAlgorithm(self); }, "memo"_a) // in-memory search with prot_ids output parameter (4-arg, most specific — must be first)As per coding guidelines: "Class bindings must include default constructor
nb::init<>(), copy constructornb::init<const ClassName &>(),__copy__method, and__deepcopy__method with memo parameter."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pyOpenMS/bindings/bind_misc.cpp` around lines 3338 - 3352, Add copy/deepcopy bindings for ProSEAlgorithm: update the nb::class_<OpenMS::ProSEAlgorithm,...>("ProSEAlgorithm",...) registration to include nb::init<const OpenMS::ProSEAlgorithm &>() for the copy constructor and add Python-facing methods .def("__copy__", [](const OpenMS::ProSEAlgorithm &self){ return OpenMS::ProSEAlgorithm(self); }) and .def("__deepcopy__", [](const OpenMS::ProSEAlgorithm &self, py::dict /*memo*/){ return OpenMS::ProSEAlgorithm(self); }) so the class matches the pyOpenMS binding contract (default ctor, copy ctor, __copy__, __deepcopy__).
🧹 Nitpick comments (3)
src/topp/ProSE.cpp (1)
159-159: Prefer'\n'overendlin touched log lines.Line 159, Line 291, Line 346, and Line 411 use
endl; please switch to'\n'to avoid forced stream flushes in hot logging paths.Suggested diff
- OPENMS_LOG_INFO << "[ProSE] Percolator rescoring enabled: deferring protein FDR to post-rescoring." << endl; + OPENMS_LOG_INFO << "[ProSE] Percolator rescoring enabled: deferring protein FDR to post-rescoring." << '\n'; - OPENMS_LOG_INFO << "[ProSE] Rescoring " << in_list[i] << " with Percolator..." << endl; + OPENMS_LOG_INFO << "[ProSE] Rescoring " << in_list[i] << " with Percolator..." << '\n'; - OPENMS_LOG_INFO << "[ProSE] Merged protein inference + FDR: " - << merged_protein_ids[0].getHits().size() << " proteins at " - << user_protein_fdr * 100 << "% FDR" << endl; + OPENMS_LOG_INFO << "[ProSE] Merged protein inference + FDR: " + << merged_protein_ids[0].getHits().size() << " proteins at " + << user_protein_fdr * 100 << "% FDR" << '\n'; - OPENMS_LOG_ERROR << "ProSE finished with " << failed_count - << " file(s) failing out of " << in_list.size() << "." << endl; + OPENMS_LOG_ERROR << "ProSE finished with " << failed_count + << " file(s) failing out of " << in_list.size() << "." << '\n';As per coding guidelines: "Avoid
std::endlfor performance reasons; prefer\nin C++".Also applies to: 291-291, 346-348, 411-412
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/topp/ProSE.cpp` at line 159, Replace the use of std::endl in the logging statements with '\n' to avoid unnecessary stream flushes: locate the OPENMS_LOG_INFO calls that print "[ProSE] Percolator rescoring enabled: deferring protein FDR to post-rescoring." and the other ProSE log messages (the OPENMS_LOG_INFO invocations around the rescoring/status messages you touched) and change the trailing << endl to << '\n'; ensure no other stream-flushing manipulators remain in those statements so logging uses '\n' instead of std::endl.src/pyOpenMS/bindings/bind_misc.cpp (1)
30-30: Consider movingProSEAlgorithmbinding tobind_analysis.cppfor module-location consistency.
ProSEAlgorithmis underOpenMS/ANALYSIS/...but is added inbind_misc.cpp(Line 30 and Lines 3322-3407). This works for the rename, but a follow-up relocation would align with the current pyOpenMS domain mapping rule.As per coding guidelines: "Add
#includeand class binding in the appropriate binding file based on C++ module location (... ANALYSIS/ → bind_analysis.cpp ...)."Also applies to: 3322-3407
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pyOpenMS/bindings/bind_misc.cpp` at line 30, Move the ProSEAlgorithm binding out of bind_misc.cpp into the analysis bindings file: remove the `#include` <OpenMS/ANALYSIS/ID/ProSEAlgorithm.h> and the ProSEAlgorithm class binding block currently in bind_misc.cpp (the block covering the ProSEAlgorithm binding) and add the include and the same class binding code into bind_analysis.cpp so bindings follow module-location convention; ensure any dependencies and export registration used by the ProSEAlgorithm binding are also moved or adjusted in bind_analysis.cpp to compile cleanly.src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp (1)
1452-1505: Prefer'\n'overstd::endlin the ProSE summary log blocks (lines 1452–1505).These logs run on every search, and the explicit flush via
std::endlis unnecessary here. Apply the same cleanup to other newly touchedOPENMS_LOG_*statements in this file.♻️ Example change
- OPENMS_LOG_INFO << "[ProSE] Unique proteins: " << unique_proteins.size() << std::endl; + OPENMS_LOG_INFO << "[ProSE] Unique proteins: " << unique_proteins.size() << '\n';Per coding guidelines: "Avoid
std::endlfor performance reasons; prefer\nin C++".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp` around lines 1452 - 1505, Replace all uses of std::endl in the ProSE summary logging block with a literal '\n' to avoid unnecessary flushes: update the OPENMS_LOG_INFO statements that print the header/footer, MS2 ID rate block, missed-cleavages string, tolerance estimation header and lines, and the configured tolerance line to end with "\n" instead of std::endl; also apply the same change to any other newly touched OPENMS_LOG_* statements in this file (search for OPENMS_LOG_INFO/ERROR/DEBUG occurrences added/modified in this patch) so none of them use std::endl.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp`:
- Around line 61-63: Replace all uses of the old PeptideSearchEngineFIAlgorithm
symbol and its exit enum with the new ProSEAlgorithm names in the test: change
imports and docstring references from PeptideSearchEngineFIAlgorithm to
ProSEAlgorithm, update all instantiations (where the test constructs
PeptideSearchEngineFIAlgorithm) to construct ProSEAlgorithm instead, and switch
any references to the old exit-code enum to ProSEAlgorithm_ExitCodes; ensure the
import line and all enum accesses (previously like
PeptideSearchEngineFIAlgorithm.ExitCodes) are updated to use ProSEAlgorithm and
ProSEAlgorithm_ExitCodes so the test matches the renamed binding.
---
Outside diff comments:
In `@src/pyOpenMS/bindings/bind_misc.cpp`:
- Around line 3338-3352: Add copy/deepcopy bindings for ProSEAlgorithm: update
the nb::class_<OpenMS::ProSEAlgorithm,...>("ProSEAlgorithm",...) registration to
include nb::init<const OpenMS::ProSEAlgorithm &>() for the copy constructor and
add Python-facing methods .def("__copy__", [](const OpenMS::ProSEAlgorithm
&self){ return OpenMS::ProSEAlgorithm(self); }) and .def("__deepcopy__",
[](const OpenMS::ProSEAlgorithm &self, py::dict /*memo*/){ return
OpenMS::ProSEAlgorithm(self); }) so the class matches the pyOpenMS binding
contract (default ctor, copy ctor, __copy__, __deepcopy__).
---
Nitpick comments:
In `@src/openms/source/ANALYSIS/ID/ProSEAlgorithm.cpp`:
- Around line 1452-1505: Replace all uses of std::endl in the ProSE summary
logging block with a literal '\n' to avoid unnecessary flushes: update the
OPENMS_LOG_INFO statements that print the header/footer, MS2 ID rate block,
missed-cleavages string, tolerance estimation header and lines, and the
configured tolerance line to end with "\n" instead of std::endl; also apply the
same change to any other newly touched OPENMS_LOG_* statements in this file
(search for OPENMS_LOG_INFO/ERROR/DEBUG occurrences added/modified in this
patch) so none of them use std::endl.
In `@src/pyOpenMS/bindings/bind_misc.cpp`:
- Line 30: Move the ProSEAlgorithm binding out of bind_misc.cpp into the
analysis bindings file: remove the `#include`
<OpenMS/ANALYSIS/ID/ProSEAlgorithm.h> and the ProSEAlgorithm class binding block
currently in bind_misc.cpp (the block covering the ProSEAlgorithm binding) and
add the include and the same class binding code into bind_analysis.cpp so
bindings follow module-location convention; ensure any dependencies and export
registration used by the ProSEAlgorithm binding are also moved or adjusted in
bind_analysis.cpp to compile cleanly.
In `@src/topp/ProSE.cpp`:
- Line 159: Replace the use of std::endl in the logging statements with '\n' to
avoid unnecessary stream flushes: locate the OPENMS_LOG_INFO calls that print
"[ProSE] Percolator rescoring enabled: deferring protein FDR to post-rescoring."
and the other ProSE log messages (the OPENMS_LOG_INFO invocations around the
rescoring/status messages you touched) and change the trailing << endl to <<
'\n'; ensure no other stream-flushing manipulators remain in those statements so
logging uses '\n' instead of std::endl.
🪄 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: 51ec675a-59b6-4fa4-af8c-73efcf9a5202
📒 Files selected for processing (21)
CHANGELOGdoc/doxygen/public/TOPP.doxygensrc/openms/include/OpenMS/ANALYSIS/ID/FragmentIndex.hsrc/openms/include/OpenMS/ANALYSIS/ID/ProSEAlgorithm.hsrc/openms/include/OpenMS/ANALYSIS/ID/sources.cmakesrc/openms/source/ANALYSIS/ID/ProSEAlgorithm.cppsrc/openms/source/ANALYSIS/ID/sources.cmakesrc/openms/source/APPLICATIONS/ToolHandler.cppsrc/pyOpenMS/bindings/bind_misc.cppsrc/tests/class_tests/openms/executables.cmakesrc/tests/class_tests/openms/source/BrukerTimsFile_test.cppsrc/tests/class_tests/openms/source/ProSEAlgorithm_test.cppsrc/tests/topp/CMakeLists.txtsrc/tests/topp/ProSE_1.inisrc/tests/topp/ProSE_1_out.idXMLsrc/tests/topp/ProSE_2.inisrc/tests/topp/ProSE_2_out.idXMLsrc/tests/topp/ProSE_4.inisrc/tests/topp/ProSE_4_out.idXMLsrc/topp/ProSE.cppsrc/topp/executables.cmake
…nMS test Fixes CI pyopenms_feature_tests failure from the rename. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add missing entries for changes merged after last changelog sync (#9131): - BREAKING: ProSE tool renamed from PeptideDataBaseSearchFI (#9137) - Add #9132 reference to asymmetric precursor tolerance entry (#9108, #9132) - Fix: BrukerTimsFile::loadDIAStreaming m/z sort for OpenSwath DIA streaming (#9135) Co-authored-by: Copilot <[email protected]>
Add missing entries for changes merged after last changelog sync (#9131): - BREAKING: ProSE tool renamed from PeptideDataBaseSearchFI (#9137) - Add #9132 reference to asymmetric precursor tolerance entry (#9108, #9132) - Fix: BrukerTimsFile::loadDIAStreaming m/z sort for OpenSwath DIA streaming (#9135) Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
Summary
PeptideDataBaseSearchFI→ProSEand the library classPeptideSearchEngineFIAlgorithm→ProSEAlgorithmTest plan
ProSEAlgorithm_testunit test passesTOPP_ProSE_*integration tests pass (including DDA and calibration tests)grep -rconfirms zero stale references to old names insrc/,doc/,CHANGELOGfrom pyopenms import ProSEAlgorithmworks🤖 Generated with Claude Code
Summary by CodeRabbit
Refactor
Documentation
Tests
Bindings