Repository navigation
Add idparquet I/O to some quant TOPP tools - #9405
Conversation
|
@jonasscheid The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-05-25 16:00:07.695707734 +0000
+++ AUTHORS.new 2026-05-25 16:00:12.480054449 +0000
@@ -59,6 +59,7 @@
- Johannes Veit
- Johannes von Kleist
- Johan Teleman
+ - jonasscheid
- Joshua Charkow
- Juliane Schmachtenberg
- Julianus Pfeuffer |
|
@copilot resolve the merge conflicts in this pull request |
Extend the featureXML/consensusXML/idXML dispatch branches to also accept their parquet siblings. Load whitelists are multi-element; store calls pass a single concrete type derived from the input file type, preserving the size-1 .unknown fallback contract (FileHandler.h:288-294, established by 30d2f9b).
TOPP tool widens -id/-id_ext to idparquet and -out/-candidates_in/-candidates_out to featureparquet. Load whitelists are multi-element; the -out store derives a single concrete type from -id (main path) or -candidates_in (re-score path). Library change: FeatureFinderIdentificationAlgorithm::storeFeatures(candidates_out_) now passes a single concrete type derived from the candidates_out filename, with FEATUREXML fallback for TOPPAS .unknown intermediates (FileHandler.h:286-294 contract from 30d2f9b).
Touches FeatureLinkerBase.cpp, FeatureLinkerLabeled.cpp, FeatureLinkerUnlabeled.cpp. - FeatureLinkerBase covers FLULKD, FLULQT, FLWNet via common_main_ (3 binaries). - FeatureLinkerLabeled overrides registerOptionsAndFlags_; widened locally (1 binary). - FeatureLinkerUnlabeled has its own complete main_; recipe applied with FEATUREPARQUET reference-selection fallback to index 0 (FeatureXMLFile::loadSize is XML-only). Load whitelists multi-element; stores use single-concrete output derived via consensusOutTypeFor() helper. The helper is available in FeatureLinkerUnlabeled.cpp via the textual #include "FeatureLinkerBase.cpp" (static linkage, no duplication needed).
Format lists, in_type/out_type dispatch branches, and rejection guards updated
for featureparquet and consensusparquet. Stores at the featureXML and consensusXML
out_type branches now use {out_type} (single-concrete from out_type) and serve
both XML and parquet sinks from one branch.
Five new TOPP-tests (TOPP_FileConverter_32-36) exercise the full conversion-cell
matrix:
- 32 featureparquet -> featureXML (round-trip identity)
- 33 consensusparquet -> consensusXML (round-trip identity)
- 34 featureparquet -> consensusparquet (mhcquant parquet-lane promote, content verified via XML round-trip)
- 35 featureXML -> consensusparquet (cross-serialization, content verified via XML round-trip)
- 36 featureparquet -> consensusXML (cross-serialization)
Bundles .featureparquet and .consensusparquet are directories of parquet
files (one per logical table: features/consensus_features + 4 id tables).
Two committed parquet test-input fixtures (FileConverter_9_output.featureparquet,
FileConverter_14_output.consensusparquet) generated via FileConverter from
their XML siblings. Five dedicated XML output fixtures (FileConverter_32-36_output.*)
freeze the expected round-trip content (extra dataProcessing entries from each
FileConverter pass and the parquet schema's spectra_data empty-stringList
UserParam are part of the recorded baseline).
Extend featureXML/consensusXML dispatch branches with FEATUREPARQUET/CONSENSUSPARQUET. Load whitelists multi-element; store calls pass single concrete type derived from in_type. The implicit else-branch is made explicit (else if CONSENSUSXML || CONSENSUSPARQUET) for readability.
Extend featureXML/consensusXML/idXML dispatch branches with parquet siblings. Output is always mzTab, so no store-side changes are needed.
Extend featureXML/consensusXML/idXML dispatch branches with parquet siblings. Output is always tsv/csv/txt, so no store-side changes are needed.
Extend the CONSENSUSXML branch (both load and store sides) with CONSENSUSPARQUET. The store uses the single-concrete pattern from OpenMS#9396 ({infiletype}), already in use on the idXML/idparquet branch.
…ensusFeatures Verbatim mirror of the wording added to storeIdentifications in 30d2f9b. Same code-level behavior; documenting it here so future format additions to TOPP tools dispatching FeatureMap/ConsensusMap use the single-concrete type pattern and don't break TOPPAS .unknown intermediates.
Refactor loadInitialMaps_ and storeTransformedMaps_ helpers from direct FeatureXMLFile/ConsensusXMLFile dispatches to FileHandler with if-constexpr template specialization, preserving the 'avoid code duplication' intent. Add featureparquet/consensusparquet/idparquet support to the in/out/reference:file parameters and to all three dispatch branches (FEATUREXML, CONSENSUSXML, IDXML). The reference-file switch and main_ switch use case-fall-through to share each parquet+XML pair. storeTransformedMaps_ derives a single concrete output type from in_type (output format follows input format). Audit of MapAlignerBase.h:206 reference-format-must-match check: only fires for REF_RESTRICTED tools (PoseClustering, TreeGuided), which are not getting parquet support in this PR. MAI uses REF_FLEXIBLE and bypasses the check. No MapAlignerBase.h change needed. Drop unused #include <FeatureXMLFile.h> and <ConsensusXMLFile.h>.
Per-tool entries for the 8 newly-touched binaries (MapRTTransformer, MapAlignerIdentification, FeatureFinderIdentification, FileConverter, IDConflictResolver, MzTabExporter, TextExporter, IDFilter) plus a consolidated FeatureLinker* entry covering all 5 inheritance binaries. Library entry mirrors the size-1 .unknown fallback contract documentation onto storeFeatures/storeConsensusFeatures, parallel to the storeIdentifications wording from 30d2f9b. All entries reference #TBD pending the upstream PR.
5bf55c4 to
1433379
Compare
FeatureLinkerBase now advertises featureparquet/consensusparquet in its in/out supported_formats. INIUpdater regenerates each node's parameter description from the live tool, so the FeatureLinkerUnlabeled node in the _1_noupdate and _3_old_out reference toppas files diverged. Sync the two references to the new format lists. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
📝 WalkthroughWalkthroughThis PR extends parquet file-format support across the OpenMS TOPP tool ecosystem. It documents a new FileHandler contract for ChangesParquet format support across TOPP ecosystem
Sequence DiagramsequenceDiagram
participant TOPPTool
participant FileConverter
participant FileHandler
participant FileSystem
TOPPTool->>FileConverter: request conversion/load
FileConverter->>FileHandler: loadFeatures/loadConsensusFeatures/loadIdentifications (XML/Parquet allowed_types)
FileHandler->>FileSystem: read file (XML or Parquet)
FileHandler-->>FileConverter: in-memory maps/IDs
FileConverter->>FileHandler: storeFeatures/storeConsensusFeatures/storeIdentifications (explicit out_type)
FileHandler->>FileSystem: write file (XML or Parquet)
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/topp/FeatureLinkerBase.cpp (1)
71-77:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUpdate the consensusXML-only wording.
The
keep_subelementshelp text and the design-file error still sayconsensusXMLonly, butCONSENSUSPARQUETnow follows the same path. Leaving those strings unchanged will mislead users about what the tool accepts.Also applies to: 133-136
🤖 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/topp/FeatureLinkerBase.cpp` around lines 71 - 77, Update the help text and any error messages that mention "consensusXML only" to reflect that CONSENSUSPARQUET is also supported: change the message in the registerFlag_ call for keep_subelements (registerFlag_("keep_subelements", ...)) and the design-file error handling text (the error at the block around the code handling the design file, previously referencing "consensusXML") to mention both "consensusXML and consensusparquet" (or a neutral phrase like "consensus formats") so users aren’t misled; ensure both places use the same wording.src/topp/MapAlignerIdentification.cpp (1)
340-350:⚠️ Potential issue | 🟠 Major | ⚡ Quick winReject mixed XML/parquet input lists or pick the output type per file.
Line 340 captures
in_typefrominput_files[0]once, but the feature/consensus/id load paths now accept both XML and parquet for every entry. That means a mixed list likefeatureXML + featureparquetwill still load, then every output gets forced to the first file’s concrete format at Lines 444, 465, and 499. Please either validate that all inputs in a batch use the same concrete type or deriveout_typefrom eachinput_files[i]before storing.Possible localized fix
StringList output_files = getStringList_("out"); StringList trafo_files = getStringList_("trafo_out"); FileTypes::Type in_type = FileHandler::getType(input_files[0]); + for (Size i = 1; i < input_files.size(); ++i) + { + if (FileHandler::getType(input_files[i]) != in_type) + { + writeLogError_("Error: all input files must use the same concrete file format."); + return ILLEGAL_PARAMETERS; + } + }Also applies to: 444-445, 463-465, 499-506
🤖 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/topp/MapAlignerIdentification.cpp` around lines 340 - 350, The code currently captures FileTypes::Type in_type from input_files[0] and then assumes that concrete format for all loads/outputs (affecting code paths around in_type, out_type and calls handling FEATUREXML/FEATUREPARQUET/CONSENSUS*), which breaks for mixed input lists; either validate that every entry in input_files has the same concrete FileTypes::Type as in_type and fail early with a clear error, or change the logic to determine out_type per file (e.g., compute FileHandler::getType(input_files[i]) inside the loop that loads/stores and use that per-file out_type when selecting XML vs parquet load/save branches such as the branches referenced by in_type/out_type and the transformation/storage code), updating every place that currently uses the single in_type/out_type assumption so each file uses its own derived type before storing.
🧹 Nitpick comments (1)
src/openms/source/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.cpp (1)
957-958: ⚡ Quick winAdd braces around the single-statement if block.
The conditional assignment spans two lines and should use braces for consistency with the project's coding guidelines. As per coding guidelines, braces are required even for single-line blocks (trivial one-liners may stay single-line, but this is not one).
♻️ Proposed fix
- if (candidates_out_type != FileTypes::FEATUREPARQUET) - candidates_out_type = FileTypes::FEATUREXML; + if (candidates_out_type != FileTypes::FEATUREPARQUET) + { + candidates_out_type = FileTypes::FEATUREXML; + }As per coding guidelines: "Always use braces, even for single-line blocks (trivial one-liners may stay single-line)."
🤖 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/openms/source/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.cpp` around lines 957 - 958, The conditional assignment to candidates_out_type lacks braces; update the if statement that checks "candidates_out_type != FileTypes::FEATUREPARQUET" to use a braced block and move the assignment into it (set candidates_out_type = FileTypes::FEATUREXML inside the braces) while preserving existing indentation and formatting around the FeatureFinderIdentificationAlgorithm::... code area.
🤖 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/topp/FeatureFinderIdentification.cpp`:
- Around line 172-179: The output format validation currently rejects "unknown"
for the 'out' and 'candidates_out' outputs; update the calls to setValidFormats_
associated with registerOutputFile_("out", ...) and
registerOutputFile_("candidates_out", ...) to include "unknown" in their allowed
format lists so that runtime-inferred types and TOPPAS/intermediate-file flows
can pass through to the singleton fallback. Ensure the two setValidFormats_
invocations for symbols "out" and "candidates_out" include "unknown" alongside
their existing entries.
In `@src/topp/FeatureLinkerUnlabeled.cpp`:
- Around line 133-149: The parquet branch currently falls back to
reference_index = 0 making selection order-dependent; instead perform a
lightweight first pass to estimate feature counts for parquet files and pick the
file with the largest count like the XML branch does. In
FeatureLinkerUnlabeled.cpp, when file_type == FileTypes::FEATUREPARQUET iterate
the ins list and for each parquet input use the minimal reader/metadata API
(analogous to FeatureXMLFile::loadSize for XML) to obtain the feature count (or
row count) without fully materializing maps, track max_count and set
reference_index to the index with the largest count; keep the XML path using
FeatureXMLFile::loadSize unchanged and reuse the same reference_index variable.
In `@src/topp/FileConverter.cpp`:
- Around line 472-480: The CSV/OMS writer compatibility checks only accept XML
enum types and therefore reject inputs that were loaded from Parquet; update the
conditional checks that gate CSV and OMS writing to also accept
FileTypes::FEATUREPARQUET and FileTypes::CONSENSUSPARQUET. Specifically, where
FileConverter.cpp inspects in_type/out_type around the blocks that call
FileHandler().loadConsensusFeatures(...) (populating cm) and the analogous
feature map loader (populating fm), add the parquet enum values
(FileTypes::CONSENSUSPARQUET and FileTypes::FEATUREPARQUET) to the same boolean
branches that currently list FileTypes::CONSENSUSXML and FileTypes::FEATUREXML
so CSV and OMS writers see the loaded cm/fm as compatible.
In `@src/topp/IDConflictResolver.cpp`:
- Around line 92-93: The valid output formats for the "out" output are too
restrictive and must include "unknown" so TOPPAS intermediate outputs are
accepted; update the setValidFormats_ call for the "out" output (the call to
setValidFormats_("out", ListUtils::create<String>(...))) to include "unknown" in
the list (e.g. add "unknown" alongside
"featureXML,consensusXML,featureparquet,consensusparquet") so the resolver
accepts store paths with unknown extensions while still listing the concrete
types.
In `@src/topp/IDFilter.cpp`:
- Around line 125-126: The output format whitelist for the "out" output
currently set by setValidFormats_("out",
{"idXML","consensusXML","idparquet","consensusparquet"}) is missing ".unknown",
which prevents TOPPAS fallback when out is type-inferred from infiletype; update
the valid formats for the "out" output in IDFilter.cpp (the setValidFormats_
call for "out") to include ".unknown" so argument validation allows the
inferred/unknown type fallback used by TOPPAS.
In `@src/topp/MzTabExporter.cpp`:
- Line 91: The CLI description passed to TOPPBase still refers only to "XML
formats" while setValidFormats_("in", ...) was expanded to include parquet;
update the description string you pass into the MzTabExporter/TOPPBase
constructor (or the setProgramDescription/setDescription call) to mention both
XML and Parquet (or say "XML and Parquet formats" / "supported input formats:
XML, Parquet, MZID") so the -help output matches the formats registered by
setValidFormats_("in", ListUtils::create<String>(...)).
In `@src/topp/TextExporter.cpp`:
- Line 613: The CLI now accepts parquet inputs but the user-facing descriptions
and subsection labels in TextExporter.cpp are still XML-only; update the
displayed/help strings to mention "parquet" alongside "XML" wherever formats are
listed (e.g., update the call site and nearby descriptive strings associated
with setValidFormats_ and any tool page/subsection labels or
getDescription()/getSubsection() text in this file) so generated docs/help
reflect supported "featureparquet, consensusparquet, idparquet" as well as the
XML variants.
---
Outside diff comments:
In `@src/topp/FeatureLinkerBase.cpp`:
- Around line 71-77: Update the help text and any error messages that mention
"consensusXML only" to reflect that CONSENSUSPARQUET is also supported: change
the message in the registerFlag_ call for keep_subelements
(registerFlag_("keep_subelements", ...)) and the design-file error handling text
(the error at the block around the code handling the design file, previously
referencing "consensusXML") to mention both "consensusXML and consensusparquet"
(or a neutral phrase like "consensus formats") so users aren’t misled; ensure
both places use the same wording.
In `@src/topp/MapAlignerIdentification.cpp`:
- Around line 340-350: The code currently captures FileTypes::Type in_type from
input_files[0] and then assumes that concrete format for all loads/outputs
(affecting code paths around in_type, out_type and calls handling
FEATUREXML/FEATUREPARQUET/CONSENSUS*), which breaks for mixed input lists;
either validate that every entry in input_files has the same concrete
FileTypes::Type as in_type and fail early with a clear error, or change the
logic to determine out_type per file (e.g., compute
FileHandler::getType(input_files[i]) inside the loop that loads/stores and use
that per-file out_type when selecting XML vs parquet load/save branches such as
the branches referenced by in_type/out_type and the transformation/storage
code), updating every place that currently uses the single in_type/out_type
assumption so each file uses its own derived type before storing.
---
Nitpick comments:
In `@src/openms/source/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.cpp`:
- Around line 957-958: The conditional assignment to candidates_out_type lacks
braces; update the if statement that checks "candidates_out_type !=
FileTypes::FEATUREPARQUET" to use a braced block and move the assignment into it
(set candidates_out_type = FileTypes::FEATUREXML inside the braces) while
preserving existing indentation and formatting around the
FeatureFinderIdentificationAlgorithm::... code area.
🪄 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: fc9b42fa-b827-4c12-bd41-ffbfa2a2b5b6
⛔ Files ignored due to path filters (10)
src/tests/topp/FileConverter_14_output.consensusparquet/consensus_features.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_14_output.consensusparquet/protein_groups.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_14_output.consensusparquet/proteins.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_14_output.consensusparquet/psms.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_14_output.consensusparquet/search_params.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_9_output.featureparquet/features.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_9_output.featureparquet/protein_groups.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_9_output.featureparquet/proteins.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_9_output.featureparquet/psms.parquetis excluded by!**/*.parquetsrc/tests/topp/FileConverter_9_output.featureparquet/search_params.parquetis excluded by!**/*.parquet
📒 Files selected for processing (22)
CHANGELOGsrc/openms/include/OpenMS/FORMAT/FileHandler.hsrc/openms/source/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.cppsrc/tests/topp/CMakeLists.txtsrc/tests/topp/FileConverter_32_output.featureXMLsrc/tests/topp/FileConverter_33_output.consensusXMLsrc/tests/topp/FileConverter_34_output.consensusXMLsrc/tests/topp/FileConverter_35_output.consensusXMLsrc/tests/topp/FileConverter_36_output.consensusXMLsrc/tests/topp/INIUpdater_1_noupdate.toppassrc/tests/topp/INIUpdater_3_old_out.toppassrc/topp/FeatureFinderIdentification.cppsrc/topp/FeatureLinkerBase.cppsrc/topp/FeatureLinkerLabeled.cppsrc/topp/FeatureLinkerUnlabeled.cppsrc/topp/FileConverter.cppsrc/topp/IDConflictResolver.cppsrc/topp/IDFilter.cppsrc/topp/MapAlignerIdentification.cppsrc/topp/MapRTTransformer.cppsrc/topp/MzTabExporter.cppsrc/topp/TextExporter.cpp
| registerOutputFile_("out", "<file>", "", "Output file: Features"); | ||
| setValidFormats_("out", {"featureXML"}); | ||
| setValidFormats_("out", {"featureXML", "featureparquet"}); | ||
| registerOutputFile_("lib_out", "<file>", "", "Output file: Assay library", false); | ||
| setValidFormats_("lib_out", {"traML"}); | ||
| registerOutputFile_("chrom_out", "<file>", "", "Output file: Chromatograms", false); | ||
| setValidFormats_("chrom_out", {"mzML"}); | ||
| registerOutputFile_("candidates_out", "<file>", "", "Output file: Feature candidates (before filtering and model fitting)", false); | ||
| setValidFormats_("candidates_out", {"featureXML"}); | ||
| setValidFormats_("candidates_out", {"featureXML", "featureparquet"}); |
There was a problem hiding this comment.
Allow .unknown for inferred output formats.
out and candidates_out now have their concrete type selected at runtime, so rejecting *.unknown here breaks TOPPAS/intermediate-file flows before the singleton fallback can kick in. Please add unknown to both output format lists.
Suggested change
- setValidFormats_("out", {"featureXML", "featureparquet"});
+ setValidFormats_("out", {"featureXML", "featureparquet", "unknown"});
...
- setValidFormats_("candidates_out", {"featureXML", "featureparquet"});
+ setValidFormats_("candidates_out", {"featureXML", "featureparquet", "unknown"});🤖 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/topp/FeatureFinderIdentification.cpp` around lines 172 - 179, The output
format validation currently rejects "unknown" for the 'out' and 'candidates_out'
outputs; update the calls to setValidFormats_ associated with
registerOutputFile_("out", ...) and registerOutputFile_("candidates_out", ...)
to include "unknown" in their allowed format lists so that runtime-inferred
types and TOPPAS/intermediate-file flows can pass through to the singleton
fallback. Ensure the two setValidFormats_ invocations for symbols "out" and
"candidates_out" include "unknown" alongside their existing entries.
| if (file_type == FileTypes::FEATUREXML || file_type == FileTypes::FEATUREPARQUET) | ||
| { | ||
| // use map with highest number of features as reference: | ||
| Size max_count(0); | ||
| FeatureXMLFile f; | ||
| for (Size i = 0; i < ins.size(); ++i) | ||
| // FeatureXMLFile::loadSize is XML-only; for parquet fall back to index 0. | ||
| if (file_type == FileTypes::FEATUREXML) | ||
| { | ||
| Size s = f.loadSize(ins[i]); | ||
| if (s > max_count) | ||
| Size max_count(0); | ||
| FeatureXMLFile f; | ||
| for (Size i = 0; i < ins.size(); ++i) | ||
| { | ||
| max_count = s; | ||
| reference_index = i; | ||
| Size s = f.loadSize(ins[i]); | ||
| if (s > max_count) | ||
| { | ||
| max_count = s; | ||
| reference_index = i; | ||
| } | ||
| } |
There was a problem hiding this comment.
Parquet input makes reference selection order-dependent.
For XML, the reference map is still chosen as the largest input, but parquet now silently falls back to reference_index = 0. That changes the grouping behavior based on CLI order and can produce different results from the XML path for the same data. Please derive a comparable size for parquet too, even if that requires a lightweight first pass.
🤖 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/topp/FeatureLinkerUnlabeled.cpp` around lines 133 - 149, The parquet
branch currently falls back to reference_index = 0 making selection
order-dependent; instead perform a lightweight first pass to estimate feature
counts for parquet files and pick the file with the largest count like the XML
branch does. In FeatureLinkerUnlabeled.cpp, when file_type ==
FileTypes::FEATUREPARQUET iterate the ins list and for each parquet input use
the minimal reader/metadata API (analogous to FeatureXMLFile::loadSize for XML)
to obtain the feature count (or row count) without fully materializing maps,
track max_count and set reference_index to the index with the largest count;
keep the XML path using FeatureXMLFile::loadSize unchanged and reuse the same
reference_index variable.
| registerOutputFile_("out", "<file>", "", "Output file (data with one peptide identification per feature)"); | ||
| setValidFormats_("out", ListUtils::create<String>("featureXML,consensusXML")); | ||
| setValidFormats_("out", ListUtils::create<String>("featureXML,consensusXML,featureparquet,consensusparquet")); |
There was a problem hiding this comment.
Keep unknown as a valid output extension here.
This tool writes a single concrete output type derived from in_type, so excluding unknown will reject valid TOPPAS intermediate outputs even though the store path can resolve them.
Suggested change
- setValidFormats_("out", ListUtils::create<String>("featureXML,consensusXML,featureparquet,consensusparquet"));
+ setValidFormats_("out", ListUtils::create<String>("featureXML,consensusXML,featureparquet,consensusparquet,unknown"));🤖 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/topp/IDConflictResolver.cpp` around lines 92 - 93, The valid output
formats for the "out" output are too restrictive and must include "unknown" so
TOPPAS intermediate outputs are accepted; update the setValidFormats_ call for
the "out" output (the call to setValidFormats_("out",
ListUtils::create<String>(...))) to include "unknown" in the list (e.g. add
"unknown" alongside "featureXML,consensusXML,featureparquet,consensusparquet")
so the resolver accepts store paths with unknown extensions while still listing
the concrete types.
| registerOutputFile_("out", "<file>", "", "output file "); | ||
| setValidFormats_("out", {"idXML","consensusXML","idparquet"}); | ||
| setValidFormats_("out", {"idXML","consensusXML","idparquet","consensusparquet"}); |
There was a problem hiding this comment.
Add .unknown to the output format whitelist.
out is effectively type-inferred from infiletype, so omitting unknown blocks the TOPPAS fallback path at argument validation time.
Suggested change
- setValidFormats_("out", {"idXML","consensusXML","idparquet","consensusparquet"});
+ setValidFormats_("out", {"idXML","consensusXML","idparquet","consensusparquet","unknown"});📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| registerOutputFile_("out", "<file>", "", "output file "); | |
| setValidFormats_("out", {"idXML","consensusXML","idparquet"}); | |
| setValidFormats_("out", {"idXML","consensusXML","idparquet","consensusparquet"}); | |
| registerOutputFile_("out", "<file>", "", "output file "); | |
| setValidFormats_("out", {"idXML","consensusXML","idparquet","consensusparquet","unknown"}); |
🤖 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/topp/IDFilter.cpp` around lines 125 - 126, The output format whitelist
for the "out" output currently set by setValidFormats_("out",
{"idXML","consensusXML","idparquet","consensusparquet"}) is missing ".unknown",
which prevents TOPPAS fallback when out is type-inferred from infiletype; update
the valid formats for the "out" output in IDFilter.cpp (the setValidFormats_
call for "out") to include ".unknown" so argument validation allows the
inferred/unknown type fallback used by TOPPAS.
Valid findings fixed: - FileConverter: CSV/IBSpectra and OMS output gates rejected already-loaded parquet maps despite featureparquet/consensusparquet being advertised inputs. Widen the in_type guards so consensusparquet->ibspectra and feature/consensusparquet->oms reach the same code path as their XML counterparts (verified: featureparquet->oms is byte-identical to featureXML->oms; consensusparquet->ibspectra now matches consensusXML behavior). - MzTabExporter/TextExporter: tool descriptions still said "XML formats"; updated to mention parquet. - FeatureLinkerBase: keep_subelements flag help and the fractionated-design error said "consensusXML" only; now mention consensusparquet (also fixed an "als"->"as" typo). Regenerated the two INIUpdater .toppas references that embed the keep_subelements description. Skipped (with reason): - "Add unknown to setValidFormats_" (out params, 3x): TOPPBase already accepts UNKNOWN/.unknown extensions for in/out (TOPPBase.cpp ~1428/1495/1514) and setValidFormats_(force_OpenMS_format=true) would throw "format 'unknown' is invalid" at registration. Would break tool startup; not applied. - FeatureLinkerUnlabeled parquet reference selection: no lightweight parquet feature-count API exists (FeatureMapArrowIO only does full import/export); index-0 is a correct documented fallback. Enhancement, not a bug. - MapAlignerIdentification single in_type for mixed input lists: only affects mixed-format input lists with .unknown outputs; uniform lists (the norm) work. Belongs with the broader output-track-coupling discussion. - Brace nitpick: braceless single-statement if is valid and idiomatic here. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/topp/MzTabExporter.cpp (1)
115-122:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix typo in comment.
Line 118 contains a duplicate word: "study variable variable level" should be "study variable level".
✏️ Proposed fix
- // For featureXML/featureparquet we export a "Summary Quantification" file. This means we don't need to report feature quantification values at the assay level - // but only at the (single) study variable variable level. + // For featureXML/featureparquet we export a "Summary Quantification" file. This means we don't need to report feature quantification values at the assay level + // but only at the (single) study variable level.🤖 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/topp/MzTabExporter.cpp` around lines 115 - 122, In the if-block checking in_type == FileTypes::FEATUREXML || in_type == FileTypes::FEATUREPARQUET (around the FeatureMap/ FileHandler().loadFeatures code), fix the comment that currently reads "study variable variable level" by removing the duplicate word so it reads "study variable level"; update the comment text only (no code changes).
🤖 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.
Outside diff comments:
In `@src/topp/MzTabExporter.cpp`:
- Around line 115-122: In the if-block checking in_type == FileTypes::FEATUREXML
|| in_type == FileTypes::FEATUREPARQUET (around the FeatureMap/
FileHandler().loadFeatures code), fix the comment that currently reads "study
variable variable level" by removing the duplicate word so it reads "study
variable level"; update the comment text only (no code changes).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c04e46e3-67dd-4e64-a7c4-dd05d54aab79
📒 Files selected for processing (6)
src/tests/topp/INIUpdater_1_noupdate.toppassrc/tests/topp/INIUpdater_3_old_out.toppassrc/topp/FeatureLinkerBase.cppsrc/topp/FileConverter.cppsrc/topp/MzTabExporter.cppsrc/topp/TextExporter.cpp
🚧 Files skipped from review as they are similar to previous changes (4)
- src/tests/topp/INIUpdater_1_noupdate.toppas
- src/topp/TextExporter.cpp
- src/topp/FeatureLinkerBase.cpp
- src/topp/FileConverter.cpp
This PR extends the idparquet I/O introduced in #9396 (rescore-chain tools) to the QUANT-chain TOPP tools. 11 user-facing binaries gain
featureparquet/consensusparquet/idparquetread+write.Tools touched (via 9 source files): MapAlignerIdentification (refactored to FileHandler + parquet), MapRTTransformer, FeatureFinderIdentification, FeatureLinker* (FLUKD + 4 siblings via shared base), IDConflictResolver, FileConverter (+ 5 new TOPP-tests for cross-format coverage), IDFilter (consensusparquet), MzTabExporter, TextExporter (read-only — outputs stay in their native mzTab/tsv formats).
Implementation pattern: uniform across tools —
setValidFormats_entries widened to include the parquet variants; load/store dispatch routes through the existingFeatureMapArrowIO/ConsensusMapArrowIO/IdentificationDataArrowIOmachinery. OnlyMapAlignerIdentificationneeded structural work — a small refactor to useFileHandlerinstead of duplicated format-sniffing logic.Depends on #9400 (FeatureMap MetaValue + ProteinIdentification identifier parity) — already merged. The
setPrimaryMSRunPathround-trip andspectra_datalinkage fixes from #9400 are required for the QUANT chain to round-trip cleanly through parquet; without them, MzTabExporter fails on consensusparquet input.Validation: end-to-end run through nf-core/mhcquant
test_fullprofile (PXD011628 immunopeptidomics, 6 raw files, PBMC009 + PBMC007), comparing every intermediate + final output of both lanes. Detailed report below — headline: 16/18 pairs all-pass; the 2 "diverged" mzTab pairs have identical section-row counts and differ only inms_run-locationordering (cosmetic non-determinism, separate follow-up).RESULTS_consolidated.html
Summary by CodeRabbit
New Features
Documentation
Tests
Chores