Repository navigation
MSGFPlusAdapter: add -allow_dense_centroided_peaks flag - #9461
Conversation
|
@timosachsenberg The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-06-08 14:54:30.556526724 +0000
+++ AUTHORS.new 2026-06-08 14:54:35.938424885 +0000
@@ -22,8 +22,8 @@
- Chirag Dave
- Chris Bauer
- Chris Bielow
- - Christie Mathews
- Christian Ehrlich
+ - Christie Mathews
- Clemens Groepl
- Cornelia Friedle
- Daniel Jameson |
|
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 (6)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughMSGFPlusAdapter adds a boolean CLI flag allow_dense_centroided_peaks that, when set, appends -allowDenseCentroidedPeaks 1 to the MSGF+ invocation. Tests and expected outputs are updated to include the new parameter value. ChangesMSGF+ Dense Centroided Peaks Feature
Suggested labels: Suggested reviewers:
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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.
🧹 Nitpick comments (1)
src/tests/topp/THIRDPARTY/third_party_tests.cmake (1)
116-116: ⚡ Quick winWhitelist patterns are inconsistent with established convention.
The whitelist entries on line 116 use shortened patterns that differ from the convention established in line 103:
"MSGFPlusAdapter:1:out\""and"MSGFPlusAdapter:1:mzid_out\""include a trailing quote but omit the full attribute pattern"MSGFPlusAdapter:1:allow_dense_centroided_peaks"is a bare substringThe established pattern from line 103 is:
"UserParam type=\"string\" name=\"MSGFPlusAdapter:1:database\" value="While substring matching may work, the shortened patterns are less precise and could match unintended lines. For consistency and maintainability, consider using the full pattern:
♻️ Suggested patterns matching established convention
-add_test("TOPP_MSGFPlusAdapter_2_out1" ${DIFF} -in1 MSGFPlusAdapter_2_out1.tmp.idXML -in2 ${DATA_DIR_TOPP}/THIRDPARTY/MSGFPlusAdapter_1_out.idXML -whitelist "IdentificationRun date" "SearchParameters id=\"SP_0\" db=" "UserParam type=\"stringList\" name=\"spectra_data\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:in\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:executable\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:database\" value=" "MSGFPlusAdapter:1:out\"" "MSGFPlusAdapter:1:mzid_out\"" "MSGFPlusAdapter:1:allow_dense_centroided_peaks") +add_test("TOPP_MSGFPlusAdapter_2_out1" ${DIFF} -in1 MSGFPlusAdapter_2_out1.tmp.idXML -in2 ${DATA_DIR_TOPP}/THIRDPARTY/MSGFPlusAdapter_1_out.idXML -whitelist "IdentificationRun date" "SearchParameters id=\"SP_0\" db=" "UserParam type=\"stringList\" name=\"spectra_data\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:in\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:executable\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:database\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:out\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:mzid_out\" value=" "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:allow_dense_centroided_peaks\" value=")🤖 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/topp/THIRDPARTY/third_party_tests.cmake` at line 116, The whitelist for the test "TOPP_MSGFPlusAdapter_2_out1" uses shortened/ambiguous substrings; update the three entries ("MSGFPlusAdapter:1:out\"", "MSGFPlusAdapter:1:mzid_out\"", and "MSGFPlusAdapter:1:allow_dense_centroided_peaks") to the full attribute-style patterns consistent with the existing convention (e.g. use the same form as "UserParam type=\"string\" name=\"MSGFPlusAdapter:1:database\" value="), so replace those shortened substrings with fully qualified UserParam patterns that include type, name and value= (properly escaped) for MSGFPlusAdapter:1:out, MSGFPlusAdapter:1:mzid_out and MSGFPlusAdapter:1:allow_dense_centroided_peaks.
🤖 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.
Nitpick comments:
In `@src/tests/topp/THIRDPARTY/third_party_tests.cmake`:
- Line 116: The whitelist for the test "TOPP_MSGFPlusAdapter_2_out1" uses
shortened/ambiguous substrings; update the three entries
("MSGFPlusAdapter:1:out\"", "MSGFPlusAdapter:1:mzid_out\"", and
"MSGFPlusAdapter:1:allow_dense_centroided_peaks") to the full attribute-style
patterns consistent with the existing convention (e.g. use the same form as
"UserParam type=\"string\" name=\"MSGFPlusAdapter:1:database\" value="), so
replace those shortened substrings with fully qualified UserParam patterns that
include type, name and value= (properly escaped) for MSGFPlusAdapter:1:out,
MSGFPlusAdapter:1:mzid_out and MSGFPlusAdapter:1:allow_dense_centroided_peaks.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3a476170-7ff5-432f-9bcd-cb0e87d747f2
📒 Files selected for processing (3)
src/tests/topp/THIRDPARTY/MSGFPlusAdapter_1_out.idXMLsrc/tests/topp/THIRDPARTY/third_party_tests.cmakesrc/topp/MSGFPlusAdapter.cpp
Expose MS-GF+'s -allowDenseCentroidedPeaks option so that high-resolution centroided MS2 spectra whose median consecutive-peak distance is below ~50 ppm are searched instead of being misclassified as profile spectra and silently skipped. Squashed/rebased revival of PR #6606 (originally by Matthias Bernt), ported onto the refactored std::vector<String> process_params. The flag is passed as two separate argv tokens ("-allowDenseCentroidedPeaks" "1") rather than a single space-joined token, so MS-GF+ actually parses it (boost::process maps each vector element to one argv entry, with no whitespace splitting). - register the flag in MSGFPlusAdapter - record the new parameter in the MSGFPlusAdapter_1 reference idXML (it is written to SearchParameters for every run via writeParametersToMetaValues) - add TOPP_MSGFPlusAdapter_2 smoke test that enables the flag - update the PSMFeatureExtractor_1/2/3 references, which consume MSGFPlusAdapter_1_out.idXML as input fixture, so the new (positionally significant) UserParam line stays aligned in their idXML/mzid output Note: the new MSGFPlus test only verifies the flag is accepted and recorded; a dedicated dense-centroided fixture that fails without the flag is still TODO. Co-authored-by: Matthias Bernt <[email protected]> Co-authored-by: Julianus Pfeuffer <[email protected]> Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
01c99db to
cb0656d
Compare
Two issues addressed: 1. Serialize TOPP_MSGFPlusAdapter_2 after TOPP_MSGFPlusAdapter_1 in CTest (DEPENDS). Both tests share the same proteins.fasta and spectra.mzML; MSGF+ creates temp/cache files alongside those inputs, causing file-access conflicts on Windows when the two tests run in parallel. Parallel execution was never safe for these tests — they were just never co-scheduled until test 2 was added in #9461. 2. Fix scan-number extraction from SpecID in the legacy TSV fallback path (MSGFPlusAdapter.cpp). PR #9450 changed elements[1] from OpenMS::String to std::string and replaced `elements[1].suffix('=').toInt()` with `StringUtils::toInt32(elements[1])`. For SpecIDs of the form "controllerType=0 controllerNumber=1 scan=17" the old call extracted the integer after the last '='; the new call tries to convert the whole string and throws ConversionError. Restore the correct behaviour with rfind('=') + substr. https://claude.ai/code/session_01RjUeua8ecNatvyBSSjfeGe Co-authored-by: Claude <[email protected]>
Description
Exposes MS-GF+'s
-allowDenseCentroidedPeaksoption inMSGFPlusAdapter. When set, high-resolution centroided MS2 spectra whose median consecutive-peak distance is below ~50 ppm are searched instead of being misclassified by MS-GF+ as profile spectra and silently skipped.This revives and finishes #6606 (originally by @bernt-matthias), rebased onto current
developand squashed to a single clean commit. It also fixes two defects that were latent in the original PR:"-allowDenseCentroidedPeaks","1") instead of one space-joined string.process_paramsis an argv vector (boost::process::args), so each element becomes one argv entry with no whitespace splitting — the original"-allowDenseCentroidedPeaks 1"would have reached MS-GF+ as a single unparseable argument.SearchParameters(viawriteParametersToMetaValues, in registration order). BecauseFuzzyDiffcompares lines positionally, the newUserParamline is added to the referenceMSGFPlusAdapter_1_out.idXMLrather than merely whitelisted (a whitelist cannot absorb an inserted line).Changes
allow_dense_centroided_peaksflag inMSGFPlusAdapter.-allowDenseCentroidedPeaks 1to MS-GF+ when the flag is set.MSGFPlusAdapter_1reference idXML.TOPP_MSGFPlusAdapter_2: runs the adapter with the flag enabled.Testing
Verified locally against a real MS-GF+ run (MSGFPlus.jar, Java 21): the adapter runs succeed with the flag, the parameter is recorded as
true/false, and direct diffs of the produced idXML/mzid against the references differ only in already-whitelisted lines (out/mzid_out/allow_dense_centroided_peaks/date/ paths).Remaining / follow-up
Closes #6606
Summary by CodeRabbit
New Features
Tests