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/msmetaenhancer.xml b/tools/msmetaenhancer/msmetaenhancer.xml index fb0d4176..2edaa137 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'] + 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') 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