Mercurial > repos > recetox > msmetaenhancer
changeset 3:f387ebd6b734 draft
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/msmetaenhancer commit 6858f7bc3c3cf68fd5002a2241c79923b2ca9acd"
author | recetox |
---|---|
date | Fri, 06 May 2022 12:21:30 +0000 |
parents | 8338640d8676 |
children | 1359df83efec |
files | macros.xml msmetaenhancer.xml msmetaenhancer_wrapper.py |
diffstat | 3 files changed, 21 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/macros.xml Mon Apr 25 06:29:43 2022 +0000 +++ b/macros.xml Fri May 06 12:21:30 2022 +0000 @@ -1,5 +1,5 @@ <macros> - <token name="@TOOL_VERSION@">0.2.1</token> + <token name="@TOOL_VERSION@">0.2.2</token> <xml name="creator"> <creator>
--- a/msmetaenhancer.xml Mon Apr 25 06:29:43 2022 +0000 +++ b/msmetaenhancer.xml Fri May 06 12:21:30 2022 +0000 @@ -1,4 +1,4 @@ -<tool id="msmetaenhancer" name="MSMetaEnhancer" version="@TOOL_VERSION@+galaxy1"> +<tool id="msmetaenhancer" name="MSMetaEnhancer" version="@TOOL_VERSION@+galaxy0"> <description>annotate MS data</description> <macros> @@ -19,8 +19,9 @@ python3 ${__tool_directory__}/msmetaenhancer_wrapper.py \ --input_file "$input_file" \ --output_file "$output_file" \ - #if $options.output_log: - --log_file "$log_file"\ + #if $options.logging.output_log: + --log_file "$log_file" \ + --log_level "$options.logging.log_level" \ #end if #if len($ordered_jobs) != 0: #set ordered_jobs = ",".join([str($job.ordered_jobs_select) for $job in $ordered_jobs]) + "," @@ -51,15 +52,25 @@ </param> <section name="options" title="Options"> - <param label="Save the log file" name="output_log" type="boolean" truevalue="TRUE" falsevalue="FALSE" - checked="false" help="Preserve a log with details about the annotation process."/> + <conditional name="logging"> + <param label="Save the log file" name="output_log" type="boolean" truevalue="TRUE" falsevalue="FALSE" + checked="false" help="Preserve a log with details about the annotation process."/> + <when value="TRUE"> + <param name="log_level" type="select" label="Log level" + help="Severity of log messages present in the log file."> + <option value="error">ERROR</option> + <option value="warning">WARNING</option> + <option value="info" selected="true">INFO</option> + </param> + </when> + </conditional> </section> </inputs> <outputs> <data label="MSMetaEnhancer on ${on_string}" name="output_file" format="msp" /> <data label="Log of MSMetaEnhancer on ${on_string}" name="log_file" format="txt"> - <filter>options['output_log']</filter> + <filter>options['logging']['output_log']</filter> </data> </outputs>
--- a/msmetaenhancer_wrapper.py Mon Apr 25 06:29:43 2022 +0000 +++ b/msmetaenhancer_wrapper.py Fri May 06 12:21:30 2022 +0000 @@ -12,9 +12,11 @@ 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.") + parser.add_argument("--log_level", type=str, default='info', + help="Severity of log messages present in the log file.") args = parser.parse_args() - app = Application(log_file=args.log_file) + app = Application(log_level=args.log_level, log_file=args.log_file) # set matchms logging level to avoid extensive messages in stdout while reading file set_matchms_logger_level("ERROR")