From cb3a767bdb9c5fa6e57e8c4ef4adf3243ec122c9 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 11:05:25 +0000 Subject: [PATCH 1/4] Fix out-of-bounds reads, merge window, peak fraction and R package installation Bugs found in review of the move (OpenMS-MetaProSIP#1); all predate it: - apex neighbours: max_trace_int_idx < size - i wrapped when i > size, so the guard passed and read past mono_trace (a feature without a convex hull leaves one trace point) - merge window: after the loop over [low, high), the coefficient at high, the first one beyond the window, was added as well (two places); abundances are now the sum over the window only - a feature whose identifications all have empty hit lists indexed an empty hit list; it is skipped - observed_peak_fraction compared the fraction of missing peaks; it is now the minimum fraction of observed peaks, as documented (same at the default 0.5), and an empty window has none - weight_merge_window must not be negative (the merge loops would start behind their end) - 18O with averagine pseudo-features: one isotopic pattern per oxygen was made, but the decomposition and the correlation use one per isotopic trace (two per oxygen, as for sequences), so the decomposition read past the patterns; the decomposition also no longer reads past a pattern or the pattern list - R: a missing package was installed from an http:// CRAN mirror after update.packages(); missing packages are now reported with an install hint - QC heat map: heatmap.2 needs at least 2x2, so one peptide or -heatmap_bins 1 gave no plot; those are drawn with image(); the PNG is at least 200 px high and the bin labels use the real bin bounds Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN --- src/topp/MetaProSIP.cpp | 93 ++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 38 deletions(-) diff --git a/src/topp/MetaProSIP.cpp b/src/topp/MetaProSIP.cpp index 73c4f86..f32ba3d 100644 --- a/src/topp/MetaProSIP.cpp +++ b/src/topp/MetaProSIP.cpp @@ -512,7 +512,8 @@ class MetaProSIPReporting for (Size i = 0; i != binned_ria[0].size(); ++i) { - std::string label =StringUtils::toStr(i * (100 / binned_ria[0].size())) + "%-" + StringUtils::toStr((i + 1) * (100 / binned_ria[0].size())) + "%"; + const double bin_width = 100.0 / binned_ria[0].size(); + std::string label = StringUtils::toStr(std::lround(i * bin_width)) + "%-" + StringUtils::toStr(std::lround((i + 1) * bin_width)) + "%"; col_labels.push_back(label); } @@ -541,7 +542,8 @@ class MetaProSIPReporting if (file_extension == "png") { - current_script.addLine("png('" + tmp_path + "/" + filename + "', width=1000, height=" + StringUtils::toStr(10 * binned_ria.size()) + ")"); + // at least 200 pixels high, so that a heat map of one or a few peptides is readable + current_script.addLine("png('" + tmp_path + "/" + filename + "', width=1000, height=" + StringUtils::toStr(std::max(200, 10 * binned_ria.size())) + ")"); } else if (file_extension == "svg") { @@ -565,7 +567,19 @@ class MetaProSIPReporting std::string col_labels_string = StringUtils::concatenate(col_labels, "\",\""); + // heatmap.2 needs at least two rows and two columns (one peptide, or heatmap_bins 1): + // plot those with image() of base R instead + current_script.addLine("if (nrow(mdat) >= 2 && ncol(mdat) >= 2) {"); current_script.addLine(R"(heatmap.2(mdat, dendrogram="none", col=colorRampPalette(c("black","red")), Rowv=FALSE, Colv=FALSE, key=FALSE, labRow=)" + labRowString + ",labCol=c(\"" + col_labels_string + R"("),trace="none", density.info="none"))"); + current_script.addLine("} else {"); + current_script.addLine("par(mar=c(6,10,2,2))"); + current_script.addLine(R"(image(x=seq_len(ncol(mdat)), y=seq_len(nrow(mdat)), z=t(mdat), col=colorRampPalette(c("black","red"))(64), axes=FALSE, xlab="", ylab=""))"); + current_script.addLine("axis(1, at=seq_len(ncol(mdat)), labels=c(\"" + col_labels_string + "\"), las=2)"); + if (!row_labels.empty()) + { + current_script.addLine("axis(2, at=seq_len(nrow(mdat)), labels=" + labRowString + ", las=1)"); + } + current_script.addLine("}"); current_script.addLine("tmp<-dev.off()"); current_script.store(tmp_path + "/" + script_filename); @@ -1369,12 +1383,18 @@ class MetaProSIPDecomposition Matrix basis_matrix(isotopic_intensities.size(), n_bins); + if (patterns.size() < n_bins) + { + throw Exception::InvalidSize(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, patterns.size(), + "fewer isotopic patterns than rate bins of the decomposition (" + StringUtils::toStr(n_bins) + ")"); + } + for (Size row = 0; row != isotopic_intensities.size(); ++row) { for (Size col = 0; col != n_bins; ++col) { const vector& pattern = patterns[col].second; - if (row <= n_bins) + if (row <= n_bins && row < pattern.size()) { basis_matrix(row, col) = pattern[row]; } @@ -1417,10 +1437,10 @@ class MetaProSIPDecomposition S_err += pow(isotopic_intensities[row] - predicted, 2); } - for (Size row = 0; row != 5; ++row) + for (Size row = 0; row != std::min(5, isotopic_intensities.size()); ++row) { double predicted = 0; - for (Size col = 0; col != 3; ++col) + for (Size col = 0; col != std::min(3, n_bins); ++col) { predicted += basis_matrix(row, col) * beta(col, 0); } @@ -1849,7 +1869,10 @@ class MetaProSIPDecomposition // calculate isotope distribution for a given peptide and varying incoperation rates // modification of isotope distribution in static ElementDB - for (double abundance = 0.0; abundance < 100.0 - 1e-8; abundance += 100.0 / (double)element_count) + // one pattern per isotopic trace, i.e. two per oxygen (18O is 2 Da heavier than 16O), as in + // calculateIsotopePatternsFor18ORange: the decomposition and the correlation use 2 * element_count + // rate bins for oxygen + for (double abundance = 0.0; abundance < 100.0 - 1e-8; abundance += 100.0 / (2.0 * element_count)) { double a = abundance / 100.0; IsotopeDistribution isotopes; @@ -2013,28 +2036,20 @@ class RIntegration } OPENMS_LOG_INFO << " success" << std::endl; } - // check dependencies - OPENMS_LOG_INFO << "Checking R dependencies. If package is not found we will try to install it in your temp directory..."; + // check dependencies. Missing packages are reported, never installed: installing would + // download and run code (and update unrelated packages) as a side effect of a QC report. + OPENMS_LOG_INFO << "Checking R dependencies..."; TextFile current_script; - current_script.addLine("LoadOrInstallPackage <-function(x)"); - current_script.addLine("{"); - current_script.addLine(" x <-as.character(substitute(x))"); - current_script.addLine(" if (isTRUE(x %in%.packages(all.available = TRUE)))"); - current_script.addLine(" {"); - current_script.addLine(" eval(parse(text = paste(\"library(\", x, \")\", sep = \"\")))"); - current_script.addLine(" }"); - current_script.addLine(" else"); - current_script.addLine(" {"); - current_script.addLine(" options(repos = structure(c(CRAN = \"http://cran.rstudio.com/\")))"); - current_script.addLine(" update.packages()"); - current_script.addLine(" eval(parse(text = paste(\"install.packages('\", x, \"')\", sep = \"\")))"); - current_script.addLine(" eval(parse(text = paste(\"library(\", x, \")\", sep = \"\")))"); - current_script.addLine(" }"); - current_script.addLine("}"); + current_script.addLine("missing <- character(0)"); for (StringList::const_iterator it = package_names.begin(); it != package_names.end(); ++it) { - current_script.addLine("LoadOrInstallPackage(" + *it + ")"); + current_script.addLine("if (!requireNamespace(\"" + *it + "\", quietly = TRUE)) missing <- c(missing, \"" + *it + "\")"); } + current_script.addLine("if (length(missing) > 0)"); + current_script.addLine("{"); + current_script.addLine(" message(\"Missing R packages: \", paste(missing, collapse = \", \"), \". Install them in R, e.g. install.packages(c(\\\"\", paste(missing, collapse = \"\\\", \\\"\"), \"\\\")).\")"); + current_script.addLine(" quit(status = 1)"); + current_script.addLine("}"); current_script.store(script_filename); @@ -2043,7 +2058,7 @@ class RIntegration if (state != ExternalProcess::RETURNSTATE::SUCCESS) { - OPENMS_LOG_ERROR << "\nProblem finding all R dependencies. Check if R and following libraries are installed:" << std::endl; + OPENMS_LOG_ERROR << "\nProblem finding all R dependencies. Check if R and the following libraries are installed (" << StringUtils::concatenate(package_names, ", ") << "):" << std::endl; for (TextFile::ConstIterator line_it = current_script.begin(); line_it != current_script.end(); ++line_it) { OPENMS_LOG_ERROR << *line_it << std::endl; @@ -2121,6 +2136,7 @@ class RIntegration registerDoubleOption_("decomposition_threshold", "", 0.7, "Minimum R-squared of decomposition that must be achieved for a peptide to be reported.", false, true); registerDoubleOption_("weight_merge_window", "", 5.0, "Decomposition coefficients within +- this rate window will be combined", false, true); + setMinFloat_("weight_merge_window", 0.0); registerDoubleOption_("min_correlation_distance_to_averagine", "", -1.0, "Minimum difference in correlation between incorporation pattern and averagine pattern. Positive values filter all RIAs passing the correlation threshold but that also show a better correlation to an averagine peptide. Disabled for values <= -1", false, true); @@ -2339,8 +2355,11 @@ class RIntegration } } - // remove correlations with only very few peaks - if ((double)zeros / (double)std::distance(intensities_begin, intensities_end) > min_observed_peak_fraction) + // remove correlations with only very few peaks: the fraction of observed (non-zero) peaks + // of the pattern must reach observed_peak_fraction; an empty window has none + const Size n_peaks = std::distance(intensities_begin, intensities_end); + const double observed_fraction = n_peaks == 0 ? 0.0 : 1.0 - (double)zeros / (double)n_peaks; + if (observed_fraction < min_observed_peak_fraction) { map_rate_to_correlation_score[rate] = 0; continue; @@ -2591,7 +2610,7 @@ class RIntegration for (Size i = 1; i <= n_scans; ++i) { double rt_after = max_trace_int_rt; - if (max_trace_int_idx < mono_trace.size() - (Int)i) + if (max_trace_int_idx + i < mono_trace.size()) { rt_after = mono_trace[max_trace_int_idx + i].getRT(); } @@ -2675,16 +2694,12 @@ class RIntegration double int_sum = 0; MapRateToScoreType::const_iterator low = map_rate_to_decomposition_weight.lower_bound(rate - weight_merge_window - 1e-4); MapRateToScoreType::const_iterator high = map_rate_to_decomposition_weight.lower_bound(rate + weight_merge_window + 1e-4); + // [low, high) holds the coefficients within +- weight_merge_window (1e-4 tolerance) for (; low != high; ++low) { int_sum += low->second; } - if (low != map_rate_to_decomposition_weight.end()) - { - int_sum += low->second; - } - sip_incorporation.abundance = int_sum; // calculate abundance as sum of all decompositions sip_incorporation.correlation = min(corr, 1.0); @@ -2857,17 +2872,13 @@ class RIntegration } // Sum up decomposition intensities for quantification in merge window + // [low, high) holds the coefficients within +- weight_merge_window (1e-4 tolerance) double int_sum = 0; for (; low != high; ++low) { int_sum += low->second; } - if (low != map_rate_to_decomposition_weight.end()) - { - int_sum += low->second; - } - sip_incorporation.abundance = int_sum; MapRateToScoreType::const_iterator corr_it = map_rate_to_correlation_score.lower_bound(rate - 1e-6); sip_incorporation.correlation = min(corr_it->second, 1.0); @@ -3251,6 +3262,12 @@ class RIntegration } } + // all identifications of this feature had empty hit lists + if (tmp_pepid.getHits().empty()) + { + continue; + } + tmp_pepid.sort(); SIPPeptide sip_peptide; From dfe05956b2d57e3456c1ac71eed815320c551bd6 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 11:05:25 +0000 Subject: [PATCH 2/4] Add regression tests; upload test outputs of failed CI tests - TOPP_MetaProSIP_4: a feature whose only identification has no hits is skipped (results as in test 1) - TOPP_MetaProSIP_5: a negative weight_merge_window is rejected - TOPP_MetaProSIP_6/7: averagine pseudo-features for the unidentified MS2 spectra of the input, with 18O (read past the patterns before) and 13C labeling - CI uploads the outputs of failed tests as an artifact Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN --- .github/actions/build/action.yml | 12 ++ src/tests/topp/CMakeLists.txt | 22 +++ src/tests/topp/MetaProSIP_2_input.featureXML | 140 +++++++++++++++++++ 3 files changed, 174 insertions(+) create mode 100644 src/tests/topp/MetaProSIP_2_input.featureXML diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index d3cc722..d5d9df6 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -230,10 +230,22 @@ runs: ############################################################################ - name: Test + id: test if: ${{ inputs.run_tests == 'true' }} shell: bash run: ctest --preset "${{ steps.preset.outputs.name }}" + ############################################################################ + # The files the failed tests wrote (*.tmp.csv, ...), to compare them with the + # expected ones without a local build. + - name: Upload the Test Outputs + if: ${{ failure() && steps.test.outcome == 'failure' }} + uses: actions/upload-artifact@v4 + with: + name: test-outputs-${{ runner.os }}-${{ runner.arch }}-${{ inputs.compiler }} + path: build/${{ steps.preset.outputs.name }}/src/tests/topp/tmp_path + if-no-files-found: warn + ############################################################################ # Saved only when the build succeeded (a failed build would pin a partial # cache as the newest of the branch); test failures still save. diff --git a/src/tests/topp/CMakeLists.txt b/src/tests/topp/CMakeLists.txt index ff68b2b..3f8ea48 100644 --- a/src/tests/topp/CMakeLists.txt +++ b/src/tests/topp/CMakeLists.txt @@ -74,6 +74,28 @@ add_test(NAME "TOPP_MetaProSIP_3" COMMAND MetaProSIP -test -in_mzML ${DATA_DIR_T set_tests_properties("TOPP_MetaProSIP_3" PROPERTIES PASS_REGULAR_EXPRESSION "heatmap_bins;Out of valid range") ## negative wraps to a huge Size list(APPEND _tool_tests "TOPP_MetaProSIP_2" "TOPP_MetaProSIP_3") +# a second feature whose only identification has no hits is skipped: the results are those of test 1 +add_test(NAME "TOPP_MetaProSIP_4" COMMAND MetaProSIP -test -in_mzML ${DATA_DIR_TOPP}/MetaProSIP_1_input.mzML -in_fasta ${DATA_DIR_TOPP}/MetaProSIP_1_input.fasta -in_featureXML ${DATA_DIR_TOPP}/MetaProSIP_2_input.featureXML -out_csv ${TESTS_TEMP_DIR}/MetaProSIP_4_output_1.tmp.csv -out_peptide_centric_csv ${TESTS_TEMP_DIR}/MetaProSIP_4_output_2.tmp.csv) +list(APPEND _tool_tests "TOPP_MetaProSIP_4") +if(OPENMS_FUZZYDIFF) + add_test(NAME "TOPP_MetaProSIP_4_out1" COMMAND ${DIFF} -in1 ${TESTS_TEMP_DIR}/MetaProSIP_4_output_1.tmp.csv -in2 ${DATA_DIR_TOPP}/MetaProSIP_1_output_1.csv) + set_tests_properties("TOPP_MetaProSIP_4_out1" PROPERTIES DEPENDS "TOPP_MetaProSIP_4") + add_test(NAME "TOPP_MetaProSIP_4_out2" COMMAND ${DIFF} -in1 ${TESTS_TEMP_DIR}/MetaProSIP_4_output_2.tmp.csv -in2 ${DATA_DIR_TOPP}/MetaProSIP_1_output_2.csv) + set_tests_properties("TOPP_MetaProSIP_4_out2" PROPERTIES DEPENDS "TOPP_MetaProSIP_4") + list(APPEND _diff_tests "TOPP_MetaProSIP_4_out1" "TOPP_MetaProSIP_4_out2") +endif() + +# reject a negative merge window: the merge loops would start behind their end +add_test(NAME "TOPP_MetaProSIP_5" COMMAND MetaProSIP -test -in_mzML ${DATA_DIR_TOPP}/MetaProSIP_1_input.mzML -in_fasta ${DATA_DIR_TOPP}/MetaProSIP_1_input.fasta -in_featureXML ${DATA_DIR_TOPP}/MetaProSIP_1_input.featureXML -out_csv ${TESTS_TEMP_DIR}/MetaProSIP_5_output_1.tmp.csv -out_peptide_centric_csv ${TESTS_TEMP_DIR}/MetaProSIP_5_output_2.tmp.csv -weight_merge_window -1) +set_tests_properties("TOPP_MetaProSIP_5" PROPERTIES PASS_REGULAR_EXPRESSION "weight_merge_window;Out of valid range") +list(APPEND _tool_tests "TOPP_MetaProSIP_5") + +# averagine pseudo-features for the unidentified MS2 spectra of the input: with 18O labeling the +# decomposition read past the isotopic patterns (one per oxygen instead of one per isotopic trace) +add_test(NAME "TOPP_MetaProSIP_6" COMMAND MetaProSIP -test -in_mzML ${DATA_DIR_TOPP}/MetaProSIP_1_input.mzML -in_fasta ${DATA_DIR_TOPP}/MetaProSIP_1_input.fasta -in_featureXML ${DATA_DIR_TOPP}/MetaProSIP_1_input.featureXML -out_csv ${TESTS_TEMP_DIR}/MetaProSIP_6_output_1.tmp.csv -out_peptide_centric_csv ${TESTS_TEMP_DIR}/MetaProSIP_6_output_2.tmp.csv -use_averagine_ids -labeling_element O) +add_test(NAME "TOPP_MetaProSIP_7" COMMAND MetaProSIP -test -in_mzML ${DATA_DIR_TOPP}/MetaProSIP_1_input.mzML -in_fasta ${DATA_DIR_TOPP}/MetaProSIP_1_input.fasta -in_featureXML ${DATA_DIR_TOPP}/MetaProSIP_1_input.featureXML -out_csv ${TESTS_TEMP_DIR}/MetaProSIP_7_output_1.tmp.csv -out_peptide_centric_csv ${TESTS_TEMP_DIR}/MetaProSIP_7_output_2.tmp.csv -use_averagine_ids) +list(APPEND _tool_tests "TOPP_MetaProSIP_6" "TOPP_MetaProSIP_7") + openms_metaprosip_test_environment(${_tool_tests}) if(_diff_tests) ## FuzzyDiff is a tool of the core: no tool registry of this build diff --git a/src/tests/topp/MetaProSIP_2_input.featureXML b/src/tests/topp/MetaProSIP_2_input.featureXML new file mode 100644 index 0000000..72aa430 --- /dev/null +++ b/src/tests/topp/MetaProSIP_2_input.featureXML @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4831.43346884947 + 666.862287171363 + 3.25608e+06 + 0 + 0 + 0.882314 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4831.43346884947 + 700.5 + 1.0e+05 + 0 + 0 + 0.5 + 2 + + + + + From 92080ae625a5c4787466f73a0f6123d0a8b52ef5 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 11:37:04 +0000 Subject: [PATCH 3/4] Address the second review of the move (OpenMS-MetaProSIP#1) - MetaProSIP: the documentation URL of --help and the CTD points to this repository; the default of TOPPBase is the page in the OpenMS documentation, which no longer has one for MetaProSIP - tests: OPENMS_TOOL_REGISTRY_PATH inherited from ctest's environment is unset where the tests run without this build's registry (it would register MetaProSIP twice); the registry check is named TOPP_MetaProSIP_* so that ctest -R MetaProSIP selects it - CI: the cache key's branch name goes through env, not the script text - .gitattributes: git does not expand braces; CRLF patterns for .cmd/.bat fixed - README: --helphelp lists all parameters; nightly.yml comment on the cache Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN --- .gitattributes | 4 ++-- .github/actions/build/action.yml | 5 ++++- .github/workflows/nightly.yml | 4 ++-- README.md | 2 +- src/tests/CMakeLists.txt | 4 ++++ src/tests/topp/CMakeLists.txt | 2 +- src/topp/MetaProSIP.cpp | 7 +++++++ 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.gitattributes b/.gitattributes index a98a2da..0d12bd7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,8 +2,8 @@ # Force UNIX line endings, so you can use the same repo e.g., on Win and WSL * text=auto eol=lf # batch files specifically need to have CRLF (win endings) -*.{cmd,[cC][mM][dD]} text eol=crlf -*.{bat,[bB][aA][tT]} text eol=crlf +*.[cC][mM][dD] text eol=crlf +*.[bB][aA][tT] text eol=crlf # Denote all files that are truly binary and should not be modified. # Images diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index d5d9df6..a3c3557 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -114,7 +114,10 @@ runs: - name: Extract the PR Number or Branch Name id: pr shell: bash - run: echo "name=${{ github.event.pull_request && github.event.number || github.ref_name }}" >>"$GITHUB_OUTPUT" + # through env, not the script text: a branch name may contain shell syntax + env: + PR_OR_BRANCH: ${{ github.event.pull_request && github.event.number || github.ref_name }} + run: echo "name=$PR_OR_BRANCH" >>"$GITHUB_OUTPUT" ############################################################################ # Restore and save are separate steps so that every run saves a fresh cache diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 642ad10..f51dd60 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -3,8 +3,8 @@ name: "Nightly" # Every night OpenMS-MetaProSIP is built and tested against the current OpenMS # develop branch, built from source. The CI of OpenMS no longer compiles MetaProSIP, # so this is where a change of the OpenMS API that breaks MetaProSIP shows up. Each -# run also refreshes the cached build of OpenMS develop that the pull requests of -# this repository use. +# run also refreshes the cached build of OpenMS develop, which the pull requests of +# this repository use once OPENMS_CORE_DEFAULT_REF in test.yml is develop again. # # Triggers: # - schedule: the source build and tests against OpenMS develop. diff --git a/README.md b/README.md index ba16819..a0f71a5 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ MetaProSIP -in_mzML .mzML -in_fasta .fasta \ -out_csv .csv -out_peptide_centric_csv .csv ``` -`MetaProSIP --help` lists all parameters. The plots of the optional quality report are +`MetaProSIP --help` lists the common parameters, `MetaProSIP --helphelp` all of them (including the advanced ones such as `qc_output_directory`). The plots of the optional quality report are made with R (`-r_executable`, packages `gplots`), whose scripts MetaProSIP writes itself. ## Citation diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index efec68e..8689e4e 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -53,6 +53,10 @@ function(openms_metaprosip_test_environment) set(_env "OPENMS_DATA_PATH=${OPENMS_DATA_DIR}") if(OPENMS_METAPROSIP_TEST_REGISTRY_PATH AND NOT _arg_NO_REGISTRY) list(APPEND _env "OPENMS_TOOL_REGISTRY_PATH=${OPENMS_METAPROSIP_TEST_REGISTRY_PATH}") + else() + ## not one inherited from the environment of ctest either (e.g. exported for running the + ## build tree by hand): it would register MetaProSIP a second time + set_property(TEST ${_arg_UNPARSED_ARGUMENTS} APPEND PROPERTY ENVIRONMENT_MODIFICATION "OPENMS_TOOL_REGISTRY_PATH=unset:") endif() set_property(TEST ${_arg_UNPARSED_ARGUMENTS} APPEND PROPERTY ENVIRONMENT ${_env}) if(WIN32) diff --git a/src/tests/topp/CMakeLists.txt b/src/tests/topp/CMakeLists.txt index 3f8ea48..9cf36c1 100644 --- a/src/tests/topp/CMakeLists.txt +++ b/src/tests/topp/CMakeLists.txt @@ -33,7 +33,7 @@ set(_diff_tests) # The generated tool registry (MetaProSIP.tsv) has to be something ToolHandler can # read, and carry every declared tool. #------------------------------------------------------------------------------ -add_test(NAME TOPP_tool_registry_is_readable +add_test(NAME TOPP_MetaProSIP_tool_registry_is_readable COMMAND ${CMAKE_COMMAND} -DREGISTRY_FILE=${OPENMS_TOOL_REGISTRY_BUILD_FILE} "-DTOOLS=${TOPP_TOOLS}" diff --git a/src/topp/MetaProSIP.cpp b/src/topp/MetaProSIP.cpp index f32ba3d..5530988 100644 --- a/src/topp/MetaProSIP.cpp +++ b/src/topp/MetaProSIP.cpp @@ -184,6 +184,13 @@ class MetaProSIP : { } + /// The documentation of MetaProSIP is not part of the OpenMS documentation (the default of + /// TOPPBase): MetaProSIP is developed and documented in its own repository. + std::string getDocumentationURL() const override + { + return "https://github.com/OpenMS/OpenMS-MetaProSIP"; + } + struct RateScorePair { double rate = -1.; From edb3a453772e0eed00177741470317ec158f283c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 12:05:11 +0000 Subject: [PATCH 4/4] Update the INT 2 and TIC fraction references for the merge-window fix With the coefficient beyond the merge window no longer added, the abundance of the 36.5 % incorporation of the test peptide drops from 146376 to 134085 (the dropped coefficient: 12291); the explained TIC fraction follows from it (0.831888 * (1432379 + 134085) / (1432379 + 146376) = 0.825412). INT 1 is unchanged: the coefficient after its window was zero. Only these two fields are updated, from the outputs of CI (artifact test-outputs-Linux-X64-g++ of run 46867742143). The other fields still match the references within FuzzyDiff's tolerance; the references date from 2019. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN --- src/tests/topp/MetaProSIP_1_output_1.csv | 2 +- src/tests/topp/MetaProSIP_1_output_2.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/topp/MetaProSIP_1_output_1.csv b/src/tests/topp/MetaProSIP_1_output_1.csv index 084d9dc..84e179a 100644 --- a/src/tests/topp/MetaProSIP_1_output_1.csv +++ b/src/tests/topp/MetaProSIP_1_output_1.csv @@ -3,5 +3,5 @@ Group 1 # Distinct Peptides # Unambiguous Proteins Median Global LR median RIA 1 Protein Accession Description # Unique Peptides Median Global LR median RIA 1 median RIA 2 CONTIG23640_802236 length=2326 numreads=28 strand:-1 frame:0 orf_location:136:990 1 0.269627132474428 0.603333333333335 36.4733333333347 Peptide Sequence RT Exp. m/z Theo. m/z Charge Score TIC fraction #non-natural weights RIA 1 INT 1 Cor. 1 RIA 2 INT 2 Cor. 2 Peak intensities Global LR - YGGAVDPTVLGGVK 80.52 666.8623 666.861538013921 2 0.174659044235501 0.831887919884233 7 0.6 1432379 1.00 36.5 146376 0.87 659720 461384 165174 49177 14782 11728 6541 7410 10868 8404 9437 9556 10203 12619 12159 15831 16288 19847 19258 22222 21275 21576 21294 22006 24019 19046 17493 19060 17884 15631 15769 13964 14131 10090 9445 9216 7297 6670 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.269627132474428 + YGGAVDPTVLGGVK 80.52 666.8623 666.861538013921 2 0.174659044235501 0.825411844249652 7 0.6 1432379 1.00 36.5 134085 0.87 659720 461384 165174 49177 14782 11728 6541 7410 10868 8404 9437 9556 10203 12619 12159 15831 16288 19847 19258 22222 21275 21576 21294 22006 24019 19046 17493 19060 17884 15631 15769 13964 14131 10090 9445 9216 7297 6670 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.269627132474428 Non-Unique Peptides Accessions Peptide Sequence Descriptions Score RT Exp. m/z Theo. m/z Charge #non-natural weights Peak intensities Global LR diff --git a/src/tests/topp/MetaProSIP_1_output_2.csv b/src/tests/topp/MetaProSIP_1_output_2.csv index 6fc33ac..0d972c9 100644 --- a/src/tests/topp/MetaProSIP_1_output_2.csv +++ b/src/tests/topp/MetaProSIP_1_output_2.csv @@ -1,3 +1,3 @@ Peptide Sequence Feature Quality Report Spectrum Quality report scores Sample Name Protein Accessions Description Unique #Ambiguity members Score RT Exp. m/z Theo. m/z Charge TIC fraction #non-natural weights Peak intensities Group Global Peptide LR RIA 1 LR of RIA 1 INT 1 Cor. 1 RIA 2 LR of RIA 2 INT 2 Cor. 2 RIA 3 LR of RIA 3 INT 3 Cor. 3 RIA 4 LR of RIA 4 INT 4 Cor. 4 RIA 5 LR of RIA 5 INT 5 Cor. 5 RIA 6 LR of RIA 6 INT 6 Cor. 6 RIA 7 LR of RIA 7 INT 7 Cor. 7 RIA 8 LR of RIA 8 INT 8 Cor. 8 RIA 9 LR of RIA 9 INT 9 Cor. 9 RIA 10 LR of RIA 10 INT 10 Cor. 10 -YGGAVDPTVLGGVK feature test_mode_enabled.mzML CONTIG23640_802236 length=2326 numreads=28 strand:-1 frame:0 orf_location:136:990 1 1 0.174659044235501 80.52 666.8623 666.8615 2 0.831887919884232 7 659720 461384 165174 49177 14782 11728 6541 7410 10868 8404 9437 9556 10203 12619 12159 15831 16288 19847 19258 22222 21275 21576 21294 22006 24019 19046 17493 19060 17884 15631 15769 13964 14131 10090 9445 9216 7297 6670 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.269627132474428 0.6 1.0 1432378.6 1.0 36.5 0.0 146375.7 0.9 +YGGAVDPTVLGGVK feature test_mode_enabled.mzML CONTIG23640_802236 length=2326 numreads=28 strand:-1 frame:0 orf_location:136:990 1 1 0.174659044235501 80.52 666.8623 666.8615 2 0.825411844249652 7 659720 461384 165174 49177 14782 11728 6541 7410 10868 8404 9437 9556 10203 12619 12159 15831 16288 19847 19258 22222 21275 21576 21294 22006 24019 19046 17493 19060 17884 15631 15769 13964 14131 10090 9445 9216 7297 6670 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.269627132474428 0.6 1.0 1432378.6 1.0 36.5 0.0 134085.5 0.9