Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -230,10 +233,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.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MetaProSIP -in_mzML <centroided spectra>.mzML -in_fasta <database>.fasta \
-out_csv <results>.csv -out_peptide_centric_csv <peptide results>.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
Expand Down
4 changes: 4 additions & 0 deletions src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 23 additions & 1 deletion src/tests/topp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/tests/topp/MetaProSIP_1_output_1.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/tests/topp/MetaProSIP_1_output_2.csv
Original file line number Diff line number Diff line change
@@ -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

Loading
Loading