Repository navigation
Feature/msstats - #3485
Feature/msstats#3485
Conversation
…h manually In MSstatsConverter
…esign TSV The BioReplicate column for MSstats is currently missing
in general it still seems large but in this case it compresses to < 500 kb which I am fine with. It would be nice to have more tractable testcases as well, generally it is better to have well-reasoned test cases that cover edge cases than just some random file from an experiment. If something goes wrong, it is hard to reason what went wrong and why |
| String _condition, | ||
| String _bioreplicate, | ||
| String _run, | ||
| String _fraction |
There was a problem hiding this comment.
can you make all these const String& ?
| SampleSection( | ||
| std::vector< std::vector < String > > content, | ||
| std::map< unsigned, Size > sample_to_rowindex, | ||
| std::map< String, Size > columnname_to_columnindex |
There was a problem hiding this comment.
make all of these const-ref?
|
|
||
| /// return if each fraction number is associated with the same number of runs | ||
| bool sameNrOfRunsPerFraction() const; | ||
| ExperimentalDesign(MSFileSection msfile_section, SampleSection sample_section); |
There was a problem hiding this comment.
I assume this replaces #3339 and #3332
can you add tests to the pyOpenMS test file: https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/tests/unittests/test000.py ?
@timosachsenberg @lukaszimmermann are you ready to merge?
some (small) changes, including test that the Experimental Design can be accessed from pyOpenMS are required and then we are ready.
|
I'll add the pyOpenMS tests. |
e837814 to
e07b576
Compare
e07b576 to
3afc580
Compare
|
@hroest stupid question but where does the test file need to go? |
probably |
|
great, looks ready to merge from my end 👍 |
…rting on an unidentifiable input fatalErrorIf_ took its exit code as an `int` and threw it, while main_ catches `const ExitCodes&`. C++ exception matching does not convert an int to an enum, and TOPPBase has no catch-all, so the throw escaped main() and the process died: $ MSstatsConverter -in unidentifiable.dat -in_design design.tsv -out out.csv Warning: Could not determine format of input file 'unidentifiable.dat'! MSstatsConverter.cpp(198): FATAL: Input type is not consensusXML! terminate called after throwing an instance of 'int' Aborted (core dumped) # exit 134 Changing the parameter to ExitCodes makes the thrown object match the existing handler; the tool now returns ILLEGAL_PARAMETERS (6). Verified: exit 134 -> exit 6. This is not a regression. It has been on develop since the tool was merged in #3485 (ab6cf7e, 2018-05-30), introduced two months earlier by 04e4be8, which changed `catch(int)` to `catch(const ExitCodes&)` while making the helper take and throw an int -- the pre-merge feature-branch version, with `catch(int)` matching `throw 1`, was correct and is the only version that ever worked. It went unnoticed because the path is narrow, not because it was unreachable: TOPPBase has warned rather than refused on an undeterminable input type since ~2008, but FileHandler::getType sniffs content as well as extension, so a recognized-but-wrong file (.mzML, .tsv) is rejected cleanly before main_ runs, and a misnamed but valid consensusXML is identified by content and processed normally. Only a file unidentifiable by BOTH extension and content reaches fatalErrorIf_. Regression test: TOPP_MSstatsConverter_unknown_input_type asserts the EXACT exit code via a new check_exit_code.cmake helper. ctest's WILL_FAIL cannot express this -- it treats a crash and a clean error alike, so it would have passed on the bug -- and PASS_REGULAR_EXPRESSION ignores the exit code entirely (the FATAL line is printed in both cases). Confirmed to fail on purpose: with the int restored the test reports "Expected exit code 6, got 'Subprocess aborted'". TriqlerConverter had the identical copy-paste defect; it is removed in #9898. A repo-wide sweep found no other TOPP tool throwing a numeric type without a matching handler (MSFraggerAdapter throws ints but catches them). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01S7QNzj4dhRnX5htcHZFmDm
…rting on an unidentifiable input (#9901) fatalErrorIf_ took its exit code as an `int` and threw it, while main_ catches `const ExitCodes&`. C++ exception matching does not convert an int to an enum, and TOPPBase has no catch-all, so the throw escaped main() and the process died: $ MSstatsConverter -in unidentifiable.dat -in_design design.tsv -out out.csv Warning: Could not determine format of input file 'unidentifiable.dat'! MSstatsConverter.cpp(198): FATAL: Input type is not consensusXML! terminate called after throwing an instance of 'int' Aborted (core dumped) # exit 134 Changing the parameter to ExitCodes makes the thrown object match the existing handler; the tool now returns ILLEGAL_PARAMETERS (6). Verified: exit 134 -> exit 6. This is not a regression. It has been on develop since the tool was merged in #3485 (ab6cf7e, 2018-05-30), introduced two months earlier by 04e4be8, which changed `catch(int)` to `catch(const ExitCodes&)` while making the helper take and throw an int -- the pre-merge feature-branch version, with `catch(int)` matching `throw 1`, was correct and is the only version that ever worked. It went unnoticed because the path is narrow, not because it was unreachable: TOPPBase has warned rather than refused on an undeterminable input type since ~2008, but FileHandler::getType sniffs content as well as extension, so a recognized-but-wrong file (.mzML, .tsv) is rejected cleanly before main_ runs, and a misnamed but valid consensusXML is identified by content and processed normally. Only a file unidentifiable by BOTH extension and content reaches fatalErrorIf_. Regression test: TOPP_MSstatsConverter_unknown_input_type asserts the EXACT exit code via a new check_exit_code.cmake helper. ctest's WILL_FAIL cannot express this -- it treats a crash and a clean error alike, so it would have passed on the bug -- and PASS_REGULAR_EXPRESSION ignores the exit code entirely (the FATAL line is printed in both cases). Confirmed to fail on purpose: with the int restored the test reports "Expected exit code 6, got 'Subprocess aborted'". TriqlerConverter had the identical copy-paste defect; it is removed in #9898. A repo-wide sweep found no other TOPP tool throwing a numeric type without a matching handler (MSFraggerAdapter throws ints but catches them). Claude-Session: https://claude.ai/code/session_01S7QNzj4dhRnX5htcHZFmDm Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
No description provided.