From 5545b36c3b12ad1bd0dc15379dbe5fd975115d71 Mon Sep 17 00:00:00 2001 From: Matej Trojak Date: Tue, 15 Feb 2022 09:34:20 +0100 Subject: [PATCH 1/4] Added optional log output to the MSME tool --- tools/msmetaenhancer/msmetaenhancer.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/msmetaenhancer/msmetaenhancer.xml b/tools/msmetaenhancer/msmetaenhancer.xml index fb0d4176..7d4a02e5 100644 --- a/tools/msmetaenhancer/msmetaenhancer.xml +++ b/tools/msmetaenhancer/msmetaenhancer.xml @@ -19,6 +19,9 @@ python3 ${__tool_directory__}/msmetaenhancer_wrapper.py \ --input_file "$input_file" \ --output_file "$output_file" \ + #if $options.output_log: + --log_file "$log_file"\ + #end if #if len($ordered_jobs) != 0: #set ordered_jobs = ",".join([str($job.ordered_jobs_select) for $job in $ordered_jobs]) + "," #else: @@ -46,10 +49,18 @@ + +
+ +
+ + options['output_log'] + From 3bd527a1cec416293b78a9c108e1a491bfde57f1 Mon Sep 17 00:00:00 2001 From: Matej Trojak Date: Tue, 15 Feb 2022 09:34:43 +0100 Subject: [PATCH 2/4] Added log as optional argument to MSME wrapper --- tools/msmetaenhancer/msmetaenhancer_wrapper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/msmetaenhancer/msmetaenhancer_wrapper.py b/tools/msmetaenhancer/msmetaenhancer_wrapper.py index 3f24382f..8f4ad066 100644 --- a/tools/msmetaenhancer/msmetaenhancer_wrapper.py +++ b/tools/msmetaenhancer/msmetaenhancer_wrapper.py @@ -11,9 +11,10 @@ def main(argv): parser.add_argument("--input_file", type=str, help="Path to query spectra file in MSP format.") parser.add_argument("--output_file", type=str, help="Path to output spectra file.") parser.add_argument("--jobs", type=str, help="Sequence of conversion jobs to be used.") + parser.add_argument("--log_file", type=str, help="Path to log with details of the annotation process.") args = parser.parse_args() - app = Application() + app = Application(log_file=args.log_file) # import .msp file app.load_spectra(args.input_file, file_format='msp') From 498ff97fc55f414b547a1922688b56f6a91e8114 Mon Sep 17 00:00:00 2001 From: Matej Trojak Date: Tue, 15 Feb 2022 11:16:49 +0100 Subject: [PATCH 3/4] Updated MSME version to 0.1.3 => new conversions, updated test file --- tools/msmetaenhancer/macros.xml | 19 +++-- tools/msmetaenhancer/test-data/sample_out.msp | 74 ++++++++++--------- 2 files changed, 50 insertions(+), 43 deletions(-) diff --git a/tools/msmetaenhancer/macros.xml b/tools/msmetaenhancer/macros.xml index 43ff7a49..d8f12287 100644 --- a/tools/msmetaenhancer/macros.xml +++ b/tools/msmetaenhancer/macros.xml @@ -1,5 +1,5 @@ - 0.1.2 + 0.1.3 @@ -32,26 +32,29 @@ + + - + + - + + + + + + - - - - - diff --git a/tools/msmetaenhancer/test-data/sample_out.msp b/tools/msmetaenhancer/test-data/sample_out.msp index 1c5f2425..fd4d28f1 100644 --- a/tools/msmetaenhancer/test-data/sample_out.msp +++ b/tools/msmetaenhancer/test-data/sample_out.msp @@ -4,13 +4,15 @@ MW: 2 CASNO: 1333-74-0 ID: 1 COMMENT: NIST MS# 245692, Seq# M1 -INCHIKEY: UFHFLCQGNIYNRP-UHFFFAOYSA-N +CANONICAL_SMILES: [HH] INCHI: InChI=1S/H2/h1H -IUPAC_NAME: hydrogen monohydride +INCHIKEY: UFHFLCQGNIYNRP-UHFFFAOYSA-N +ISOMERIC_SMILES: [HH] +IUPAC_NAME: molecular hydrogen SMILES: [H][H] NUM PEAKS: 2 -1.0 20.98 -2.0 999.0 +1.0 20.98 +2.0 999.0 NAME: Deuterium FORMULA: D2 @@ -18,12 +20,14 @@ MW: 4 CASNO: 7782-39-0 ID: 2 COMMENT: NIST MS# 61316, Seq# M2 -INCHIKEY: UFHFLCQGNIYNRP-VVKOMZTBSA-N +CANONICAL_SMILES: [HH] INCHI: InChI=1S/H2/h1H/i1+1D +INCHIKEY: UFHFLCQGNIYNRP-VVKOMZTBSA-N +ISOMERIC_SMILES: [2H][2H] SMILES: [2H][2H] NUM PEAKS: 2 -2.0 14.99 -4.0 999.0 +2.0 14.99 +4.0 999.0 NAME: Methane FORMULA: CH4 @@ -31,16 +35,16 @@ MW: 16 CASNO: 74-82-8 ID: 3 COMMENT: Any=100 ; NIST MS# 61313, Seq# M64 -INCHIKEY: VNWKTOKETHGBQD-UHFFFAOYSA-N INCHI: InChI=1S/CH4/h1H4 +INCHIKEY: VNWKTOKETHGBQD-UHFFFAOYSA-N IUPAC_NAME: methane NUM PEAKS: 6 -12.0 37.97 -13.0 105.9 -14.0 203.82 -15.0 886.2 -16.0 999.0 -17.0 15.99 +12.0 37.97 +13.0 105.9 +14.0 203.82 +15.0 886.2 +16.0 999.0 +17.0 15.99 NAME: Methane FORMULA: CH4 @@ -48,16 +52,16 @@ MW: 16 CASNO: 74-82-8 ID: 4 COMMENT: Any=100 ; NIST MS# 18807, Seq# R26 -INCHIKEY: VNWKTOKETHGBQD-UHFFFAOYSA-N INCHI: InChI=1S/CH4/h1H4 +INCHIKEY: VNWKTOKETHGBQD-UHFFFAOYSA-N IUPAC_NAME: methane NUM PEAKS: 6 -12.0 25.98 -13.0 85.92 -14.0 170.85 -15.0 855.23 -16.0 999.0 -17.0 10.99 +12.0 25.98 +13.0 85.92 +14.0 170.85 +15.0 855.23 +16.0 999.0 +17.0 10.99 NAME: Methane FORMULA: CH4 @@ -65,16 +69,16 @@ MW: 16 CASNO: 74-82-8 ID: 5 COMMENT: Any=100 ; NIST MS# 18809, Seq# R27 -INCHIKEY: VNWKTOKETHGBQD-UHFFFAOYSA-N INCHI: InChI=1S/CH4/h1H4 +INCHIKEY: VNWKTOKETHGBQD-UHFFFAOYSA-N IUPAC_NAME: methane NUM PEAKS: 6 -12.0 7.99 -13.0 28.97 -14.0 74.93 -15.0 753.32 -16.0 999.0 -17.0 11.99 +12.0 7.99 +13.0 28.97 +14.0 74.93 +15.0 753.32 +16.0 999.0 +17.0 11.99 NAME: Methane FORMULA: CH4 @@ -82,14 +86,14 @@ MW: 16 CASNO: 74-82-8 ID: 6 COMMENT: Any=100 ; NIST MS# 423924, Seq# R28 -INCHIKEY: VNWKTOKETHGBQD-UHFFFAOYSA-N INCHI: InChI=1S/CH4/h1H4 +INCHIKEY: VNWKTOKETHGBQD-UHFFFAOYSA-N IUPAC_NAME: methane NUM PEAKS: 6 -12.0 25.98 -13.0 74.93 -14.0 152.86 -15.0 829.25 -16.0 999.0 -17.0 10.99 +12.0 25.98 +13.0 74.93 +14.0 152.86 +15.0 829.25 +16.0 999.0 +17.0 10.99 From 123f9293667433c01beb77d6f9104fe9aa64fc1e Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Tue, 15 Feb 2022 13:18:35 +0100 Subject: [PATCH 4/4] slightly reword --- tools/msmetaenhancer/msmetaenhancer.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/msmetaenhancer/msmetaenhancer.xml b/tools/msmetaenhancer/msmetaenhancer.xml index 7d4a02e5..2edaa137 100644 --- a/tools/msmetaenhancer/msmetaenhancer.xml +++ b/tools/msmetaenhancer/msmetaenhancer.xml @@ -51,8 +51,8 @@
- +