diff EICExtractor.xml @ 11:2bd3c83eed94 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author galaxyp
date Wed, 09 Sep 2020 12:58:22 +0000
parents e8a9dc186db5
children 0546885ddaf9
line wrap: on
line diff
--- a/EICExtractor.xml	Fri May 17 10:01:56 2019 -0400
+++ b/EICExtractor.xml	Wed Sep 09 12:58:22 2020 +0000
@@ -1,103 +1,112 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!--This is a configuration file for the integration of a tools into Galaxy (https://galaxyproject.org/). This file was automatically generated using CTDConverter.-->
 <!--Proposed Tool Section: [Quantitation]-->
-<tool id="EICExtractor" name="EICExtractor" version="2.3.0">
+<tool id="EICExtractor" name="EICExtractor" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Extracts intensities from dedicates positions in a LC/MS map</description>
   <macros>
     <token name="@EXECUTABLE@">EICExtractor</token>
     <import>macros.xml</import>
+    <import>macros_autotest.xml</import>
+    <import>macros_test.xml</import>
   </macros>
-  <expand macro="references"/>
+  <expand macro="requirements"/>
   <expand macro="stdio"/>
-  <expand macro="requirements"/>
-  <command detect_errors="aggressive"><![CDATA[EICExtractor
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
--in
-  #for token in $param_in:
-    $token
-  #end for
--in_header
-  #for token in $param_in_header:
-    $token
-  #end for
-#if $param_pos:
-  -pos $param_pos
-#end if
-#if $param_rt_tol:
-  -rt_tol $param_rt_tol
+## Preprocessing
+mkdir in &&
+${ ' '.join(["ln -s '%s' 'in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _]) }
+#if $in_header:
+  mkdir in_header &&
+  ${ ' '.join(["ln -s '%s' 'in_header/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_header if _]) }
 #end if
-#if $param_mz_tol:
-  -mz_tol $param_mz_tol
-#end if
-#if $param_rt_collect:
-  -rt_collect $param_rt_collect
-#end if
-#if $param_out:
-  -out $param_out
+mkdir pos &&
+ln -s '$pos' 'pos/${re.sub("[^\w\-_]", "_", $pos.element_identifier)}.$gxy2omsext($pos.ext)' &&
+mkdir out &&
+#if "out_debug_TIC_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir auto_rt_out_debug_TIC &&
 #end if
-#if $param_auto_rt_enabled:
-  -auto_rt:enabled
-#end if
-#if $param_auto_rt_out_debug_TIC:
-  -auto_rt:out_debug_TIC $param_auto_rt_out_debug_TIC
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_out_separator:
-  -out_separator     "$adv_opts.param_out_separator"
-#end if
-    #if $adv_opts.param_force:
-  -force
+
+## Main program call
+
+set -o pipefail &&
+@EXECUTABLE@ -write_ctd ./ &&
+python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' &&
+@EXECUTABLE@ -ini @EXECUTABLE@.ctd
+-in
+${' '.join(["'in/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _])}
+#if $in_header:
+  -in_header
+  ${' '.join(["'in_header/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_header if _])}
 #end if
-    #if $adv_opts.param_auto_rt_FHWM:
-  -auto_rt:FHWM $adv_opts.param_auto_rt_FHWM
+-pos
+'pos/${re.sub("[^\w\-_]", "_", $pos.element_identifier)}.$gxy2omsext($pos.ext)'
+-out
+'out/output.${gxy2omsext("csv")}'
+#if "out_debug_TIC_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -auto_rt:out_debug_TIC
+  'auto_rt_out_debug_TIC/output.${gxy2omsext("mzml")}'
 #end if
-    #if $adv_opts.param_auto_rt_SNThreshold:
-  -auto_rt:SNThreshold $adv_opts.param_auto_rt_SNThreshold
+#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
+  | tee '$stdout'
 #end if
+
+## Postprocessing
+&& mv 'out/output.${gxy2omsext("csv")}' '$out'
+#if "out_debug_TIC_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'auto_rt_out_debug_TIC/output.${gxy2omsext("mzml")}' '$auto_rt_out_debug_TIC'
 #end if
-]]></command>
+#if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS
+  && mv '@EXECUTABLE@.ctd' '$ctd_out'
+#end if]]></command>
+  <configfiles>
+    <inputs name="args_json" data_style="paths"/>
+    <configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
+  </configfiles>
   <inputs>
-    <param name="param_in" type="data" format="mzml" multiple="true" optional="False" size="30" label="Input raw data file" help="(-in) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="in" argument="-in" type="data" format="mzml" multiple="true" optional="false" label="Input raw data file" help=" select mzml data sets(s)"/>
+    <param name="in_header" argument="-in_header" type="data" format="txt" multiple="true" optional="true" label="[for Waters data only] Read additional information from _HEADER.TXT" help="Provide one for each raw input file select txt data sets(s)"/>
+    <param name="pos" argument="-pos" type="data" format="edta" optional="false" label="Input config file stating where to find signal" help=" select edta data sets(s)"/>
+    <param name="rt_tol" argument="-rt_tol" type="float" optional="true" value="3.0" label="RT tolerance in [s] for finding max peak (whole RT range around RT middle)" help=""/>
+    <param name="mz_tol" argument="-mz_tol" type="float" optional="true" value="10.0" label="m/z tolerance in [ppm] for finding a peak" help=""/>
+    <param name="rt_collect" argument="-rt_collect" type="integer" optional="true" value="1" label="# of scans up &amp; down in RT from highest point for ppm estimation in result" help=""/>
+    <section name="auto_rt" title="Parameters for automatic detection of injection RT peaks (no need to specify them in 'pos' input file)" help="" expanded="false">
+      <param name="enabled" argument="-auto_rt:enabled" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Automatically detect injection peaks from TIC and quantify all m/z x RT combinations" help=""/>
+      <param name="FHWM" argument="-auto_rt:FHWM" type="float" optional="true" value="5.0" label="Expected full width at half-maximum of each raw RT peak in [s]" help="Gaussian smoothing filter with this width is applied to TIC"/>
+      <param name="SNThreshold" argument="-auto_rt:SNThreshold" type="float" optional="true" value="5.0" label="S/N threshold for a smoothed raw peak to pass peak picking" help="Higher thesholds will result in less peaks"/>
+    </section>
+    <expand macro="adv_opts_macro">
+      <param name="out_separator" argument="-out_separator" type="text" optional="true" value="," label="Separator character for output CSV file" help="">
+        <expand macro="list_string_san"/>
+      </param>
+      <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overwrite tool specific checks" help=""/>
+      <param name="test" argument="-test" type="hidden" optional="true" value="False" label="Enables the test mode (needed for internal use only)" help="">
+        <expand macro="list_string_san"/>
+      </param>
+    </expand>
+    <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="true">
+      <option value="out_debug_TIC_FLAG">out_debug_TIC (Optional output file (for first input) containing the smoothed TIC, S/N levels and picked RT positions)</option>
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
     </param>
-    <param name="param_in_header" type="data" format="txt" multiple="true" optional="True" size="30" label="[for Waters data only] Read additional information from _HEADER.TXT" help="(-in_header) Provide one for each raw input file">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
-    </param>
-    <param name="param_pos" type="data" format="tabular" optional="False" label="Input config file stating where to find signal" help="(-pos) "/>
-    <param name="param_rt_tol" type="float" value="3.0" label="RT tolerance in [s] for finding max peak (whole RT range around RT middle)" help="(-rt_tol) "/>
-    <param name="param_mz_tol" type="float" value="10.0" label="m/z tolerance in [ppm] for finding a peak" help="(-mz_tol) "/>
-    <param name="param_rt_collect" type="integer" value="1" label="# of scans up &amp; down in RT from highest point for ppm estimation in result" help="(-rt_collect) "/>
-    <param name="param_auto_rt_enabled" display="radio" type="boolean" truevalue="-auto_rt:enabled" falsevalue="" checked="false" optional="True" label="Automatically detect injection peaks from TIC and quantify all m/z x RT combinations" help="(-enabled) "/>
-    <expand macro="advanced_options">
-      <param name="param_out_separator" type="text" size="30" value="," label="Separator character for output CSV file" help="(-out_separator) ">
-        <sanitizer>
-          <valid initial="string.printable">
-            <remove value="'"/>
-            <remove value="&quot;"/>
-          </valid>
-        </sanitizer>
-      </param>
-      <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
-      <param name="param_auto_rt_FHWM" type="float" value="5.0" label="Expected full width at half-maximum of each raw RT peak in [s]" help="(-FHWM) Gaussian smoothing filter with this width is applied to TIC"/>
-      <param name="param_auto_rt_SNThreshold" type="float" value="5.0" label="S/N threshold for a smoothed raw peak to pass peak picking" help="(-SNThreshold) Higher thesholds will result in less peaks"/>
-    </expand>
   </inputs>
   <outputs>
-    <data name="param_out" format="tabular"/>
-    <data name="param_auto_rt_out_debug_TIC" format="mzml"/>
+    <data name="out" label="${tool.name} on ${on_string}: out" format="csv"/>
+    <data name="auto_rt_out_debug_TIC" label="${tool.name} on ${on_string}: auto_rt:out_debug_TIC" format="mzml">
+      <filter>OPTIONAL_OUTPUTS is not None and "out_debug_TIC_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <data name="ctd_out" format="xml" label="${tool.name} on ${on_string}: ctd">
+      <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
   </outputs>
-  <help>Extracts intensities from dedicates positions in a LC/MS map
+  <tests>
+    <expand macro="autotest_EICExtractor"/>
+    <expand macro="manutest_EICExtractor"/>
+  </tests>
+  <help><![CDATA[Extracts intensities from dedicates positions in a LC/MS map
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_EICExtractor.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_EICExtractor.html]]></help>
+  <expand macro="references"/>
 </tool>