diff OpenSwathChromatogramExtractor.xml @ 9:e9c148b32f87 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author galaxyp
date Wed, 09 Sep 2020 20:03:02 +0000
parents 24cfe1d7137e
children 71555764c24a
line wrap: on
line diff
--- a/OpenSwathChromatogramExtractor.xml	Fri May 17 09:36:59 2019 -0400
+++ b/OpenSwathChromatogramExtractor.xml	Wed Sep 09 20:03:02 2020 +0000
@@ -1,110 +1,106 @@
 <?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: [Targeted Experiments]-->
-<tool id="OpenSwathChromatogramExtractor" name="OpenSwathChromatogramExtractor" version="2.3.0">
+<tool id="OpenSwathChromatogramExtractor" name="OpenSwathChromatogramExtractor" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Extract chromatograms (XIC) from a MS2 map file.</description>
   <macros>
     <token name="@EXECUTABLE@">OpenSwathChromatogramExtractor</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[OpenSwathChromatogramExtractor
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
--in
-  #for token in $param_in:
-    $token
-  #end for
-#if $param_tr:
-  -tr $param_tr
-#end if
-#if $param_rt_norm:
-  -rt_norm $param_rt_norm
-#end if
-#if $param_out:
-  -out $param_out
-#end if
-#if $param_min_upper_edge_dist:
-  -min_upper_edge_dist $param_min_upper_edge_dist
+## Preprocessing
+mkdir in &&
+${ ' '.join(["ln -s '%s' 'in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _]) }
+mkdir tr &&
+ln -s '$tr' 'tr/${re.sub("[^\w\-_]", "_", $tr.element_identifier)}.$gxy2omsext($tr.ext)' &&
+#if $rt_norm:
+  mkdir rt_norm &&
+  ln -s '$rt_norm' 'rt_norm/${re.sub("[^\w\-_]", "_", $rt_norm.element_identifier)}.$gxy2omsext($rt_norm.ext)' &&
 #end if
-#if $param_mz_window:
-  -mz_window $param_mz_window
-#end if
-#if $param_rt_window:
-  -rt_window $param_rt_window
-#end if
-#if $param_is_swath:
-  -is_swath
-#end if
-#if $param_ppm:
-  -ppm
-#end if
-#if $param_extract_MS1:
-  -extract_MS1
-#end if
-#if $param_extraction_function:
-  -extraction_function
-  #if " " in str($param_extraction_function):
-    "$param_extraction_function"
-  #else
-    $param_extraction_function
-  #end if
+mkdir out &&
+
+## 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 _])}
+-tr
+'tr/${re.sub("[^\w\-_]", "_", $tr.element_identifier)}.$gxy2omsext($tr.ext)'
+#if $rt_norm:
+  -rt_norm
+  'rt_norm/${re.sub("[^\w\-_]", "_", $rt_norm.element_identifier)}.$gxy2omsext($rt_norm.ext)'
 #end if
-#if $param_model_type:
-  -model:type
-  #if " " in str($param_model_type):
-    "$param_model_type"
-  #else
-    $param_model_type
-  #end if
-#end if
-#if $param_model_symmetric_regression:
-  -model:symmetric_regression
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
-#end if
-#end if
-]]></command>
+-out
+'out/output.${gxy2omsext("mzml")}'
+
+## Postprocessing
+&& mv 'out/output.${gxy2omsext("mzml")}' '$out'
+#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 files separated by blank" 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 files separated by blank" help=" select mzml data sets(s)"/>
+    <param name="tr" argument="-tr" type="data" format="csv,traml" optional="false" label="transition file ('TraML' or 'csv')" help=" select csv,traml data sets(s)"/>
+    <param name="rt_norm" argument="-rt_norm" type="data" format="trafoxml" optional="true" label="RT normalization file (how to map the RTs of this run to the ones stored in the library)" help=" select trafoxml data sets(s)"/>
+    <param name="min_upper_edge_dist" argument="-min_upper_edge_dist" type="float" optional="true" value="0.0" label="Minimal distance to the edge to still consider a precursor, in Thomson" help=""/>
+    <param name="rt_window" argument="-rt_window" type="float" optional="true" value="-1.0" label="Extraction window in RT dimension (-1 means extract over the whole range)" help="This is the full window size, e.g. a value of 1000 seconds would extract 500 seconds on either side"/>
+    <param name="ion_mobility_window" argument="-ion_mobility_window" type="float" optional="true" value="-1.0" label="Extraction window in ion mobility dimension (in milliseconds)" help="This is the full window size, e.g. a value of 10 milliseconds would extract 5 milliseconds on either side"/>
+    <param name="mz_window" argument="-mz_window" type="float" optional="true" min="0.0" value="0.05" label="Extraction window in m/z dimension (in Thomson, to use ppm see -ppm flag)" help="This is the full window size, e.g. 100 ppm would extract 50 ppm on either side"/>
+    <param name="ppm" argument="-ppm" type="boolean" truevalue="true" falsevalue="false" checked="false" label="m/z extraction_window is in ppm" help=""/>
+    <param name="is_swath" argument="-is_swath" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Set this flag if the data is SWATH data" help=""/>
+    <param name="extract_MS1" argument="-extract_MS1" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Extract the MS1 transitions based on the precursor values in the TraML file (useful for extracting MS1 XIC)" help=""/>
+    <section name="model" title="Options to control the modeling of retention time transformations from data" help="" expanded="false">
+      <param name="type" argument="-model:type" display="radio" type="select" optional="false" label="Type of model" help="">
+        <option value="linear" selected="true">linear</option>
+        <option value="b_spline">b_spline</option>
+        <option value="interpolated">interpolated</option>
+        <option value="lowess">lowess</option>
+        <expand macro="list_string_san"/>
+      </param>
+      <param name="symmetric_regression" argument="-model:symmetric_regression" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Only for 'linear' model: Perform linear regression on 'y - x' vs" help="'y + x', instead of on 'y' vs. 'x'"/>
+    </section>
+    <expand macro="adv_opts_macro">
+      <param name="extraction_function" argument="-extraction_function" display="radio" type="select" optional="false" label="Function used to extract the signal" help="">
+        <option value="tophat" selected="true">tophat</option>
+        <option value="bartlett">bartlett</option>
+        <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="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
     </param>
-    <param name="param_tr" type="data" format="tabular,traml" optional="False" label="transition file ('TraML' or 'csv')" help="(-tr) "/>
-    <param name="param_rt_norm" type="data" format="trafoxml" optional="True" label="RT normalization file (how to map the RTs of this run to the ones stored in the library)" help="(-rt_norm) "/>
-    <param name="param_min_upper_edge_dist" type="float" value="0.0" label="Minimal distance to the edge to still consider a precursor, in Thomson" help="(-min_upper_edge_dist) "/>
-    <param name="param_mz_window" type="float" min="0.0" optional="True" value="0.05" label="Extraction window in m/z dimension (in Thomson, to use ppm see -ppm flag). This is the full window size," help="(-mz_window) e.g. 100 ppm would extract 50 ppm on either side"/>
-    <param name="param_rt_window" type="float" value="-1.0" label="Extraction window in RT dimension (-1 means extract over the whole range). This is the full window size," help="(-rt_window) e.g. a value of 1000 seconds would extract 500 seconds on either side"/>
-    <param name="param_is_swath" display="radio" type="boolean" truevalue="-is_swath" falsevalue="" checked="false" optional="True" label="Set this flag if the data is SWATH data" help="(-is_swath) "/>
-    <param name="param_ppm" display="radio" type="boolean" truevalue="-ppm" falsevalue="" checked="false" optional="True" label="m/z extraction_window is in ppm" help="(-ppm) "/>
-    <param name="param_extract_MS1" display="radio" type="boolean" truevalue="-extract_MS1" falsevalue="" checked="false" optional="True" label="Extract the MS1 transitions based on the precursor values in the TraML file" help="(-extract_MS1) "/>
-    <param name="param_extraction_function" display="radio" type="select" optional="False" value="tophat" label="Function used to extract the signal" help="(-extraction_function) ">
-      <option value="tophat" selected="true">tophat</option>
-      <option value="bartlett">bartlett</option>
-    </param>
-    <param name="param_model_type" display="radio" type="select" optional="False" value="linear" label="Type of model" help="(-type) ">
-      <option value="linear" selected="true">linear</option>
-      <option value="b_spline">b_spline</option>
-      <option value="interpolated">interpolated</option>
-      <option value="lowess">lowess</option>
-    </param>
-    <param name="param_model_symmetric_regression" display="radio" type="boolean" truevalue="-model:symmetric_regression" falsevalue="" checked="false" optional="True" label="Only for 'linear' model: Perform linear regression on 'y - x' vs" help="(-symmetric_regression) 'y + x', instead of on 'y' vs. 'x'"/>
-    <expand macro="advanced_options">
-      <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
-    </expand>
   </inputs>
   <outputs>
-    <data name="param_out" format="mzml"/>
+    <data name="out" label="${tool.name} on ${on_string}: out" format="mzml"/>
+    <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>Extract chromatograms (XIC) from a MS2 map file.
+  <tests>
+    <expand macro="autotest_OpenSwathChromatogramExtractor"/>
+    <expand macro="manutest_OpenSwathChromatogramExtractor"/>
+  </tests>
+  <help><![CDATA[Extract chromatograms (XIC) from a MS2 map file.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_OpenSwathChromatogramExtractor.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_OpenSwathChromatogramExtractor.html]]></help>
+  <expand macro="references"/>
 </tool>