comparison MapRTTransformer.xml @ 9:fd6de4cdb9e9 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
author galaxyp
date Thu, 03 Sep 2020 16:22:43 +0000
parents 0fc718253aab
children 88ac532206c7
comparison
equal deleted inserted replaced
8:fb13ec50bf72 9:fd6de4cdb9e9
1 <?xml version='1.0' encoding='UTF-8'?> 1 <?xml version='1.0' encoding='UTF-8'?>
2 <!--This is a configuration file for the integration of a tools into Galaxy (https://galaxyproject.org/). This file was automatically generated using CTDConverter.--> 2 <!--This is a configuration file for the integration of a tools into Galaxy (https://galaxyproject.org/). This file was automatically generated using CTDConverter.-->
3 <!--Proposed Tool Section: [Map Alignment]--> 3 <!--Proposed Tool Section: [Map Alignment]-->
4 <tool id="MapRTTransformer" name="MapRTTransformer" version="2.3.0"> 4 <tool id="MapRTTransformer" name="MapRTTransformer" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
5 <description>Applies retention time transformations to maps.</description> 5 <description>Applies retention time transformations to maps.</description>
6 <macros> 6 <macros>
7 <token name="@EXECUTABLE@">MapRTTransformer</token> 7 <token name="@EXECUTABLE@">MapRTTransformer</token>
8 <import>macros.xml</import> 8 <import>macros.xml</import>
9 <import>macros_autotest.xml</import>
10 <import>macros_test.xml</import>
9 </macros> 11 </macros>
10 <expand macro="references"/> 12 <expand macro="requirements"/>
11 <expand macro="stdio"/> 13 <expand macro="stdio"/>
12 <expand macro="requirements"/> 14 <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
13 <command detect_errors="aggressive"><![CDATA[MapRTTransformer 15 @EXT_FOO@
16 #import re
14 17
15 #if $param_in: 18 ## Preprocessing
16 -in $param_in 19 #if $in:
20 mkdir in &&
21 ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
17 #end if 22 #end if
18 #if $param_out: 23 #if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
19 -out $param_out 24 mkdir out &&
20 #end if 25 #end if
21 #if $param_trafo_in: 26 mkdir trafo_in &&
22 -trafo_in $param_trafo_in 27 ln -s '$trafo_in' 'trafo_in/${re.sub("[^\w\-_]", "_", $trafo_in.element_identifier)}.$gxy2omsext($trafo_in.ext)' &&
28 #if "trafo_out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
29 mkdir trafo_out &&
23 #end if 30 #end if
24 #if $param_trafo_out: 31
25 -trafo_out $param_trafo_out 32 ## Main program call
33
34 set -o pipefail &&
35 @EXECUTABLE@ -write_ctd ./ &&
36 python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' &&
37 @EXECUTABLE@ -ini @EXECUTABLE@.ctd
38 #if $in:
39 -in
40 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)'
26 #end if 41 #end if
27 #if $param_invert: 42 #if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
28 -invert 43 -out
44 'out/output.${in.ext}'
29 #end if 45 #end if
30 #if $param_store_original_rt: 46 -trafo_in
31 -store_original_rt 47 'trafo_in/${re.sub("[^\w\-_]", "_", $trafo_in.element_identifier)}.$gxy2omsext($trafo_in.ext)'
48 #if "trafo_out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
49 -trafo_out
50 'trafo_out/output.${gxy2omsext("trafoxml")}'
32 #end if 51 #end if
33 #if $param_model_type: 52 #if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
34 -model:type 53 | tee '$stdout'
35 #if " " in str($param_model_type):
36 "$param_model_type"
37 #else
38 $param_model_type
39 #end if
40 #end if 54 #end if
41 #if $param_model_linear_symmetric_regression: 55
42 -model:linear:symmetric_regression 56 ## Postprocessing
57 #if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
58 && mv 'out/output.${in.ext}' '$out'
43 #end if 59 #end if
44 #if $param_model_b_spline_wavelength: 60 #if "trafo_out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
45 -model:b_spline:wavelength $param_model_b_spline_wavelength 61 && mv 'trafo_out/output.${gxy2omsext("trafoxml")}' '$trafo_out'
46 #end if 62 #end if
47 #if $param_model_b_spline_num_nodes: 63 #if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS
48 -model:b_spline:num_nodes $param_model_b_spline_num_nodes 64 && mv '@EXECUTABLE@.ctd' '$ctd_out'
49 #end if 65 #end if]]></command>
50 #if $param_model_b_spline_extrapolate: 66 <configfiles>
51 -model:b_spline:extrapolate 67 <inputs name="args_json" data_style="paths"/>
52 #if " " in str($param_model_b_spline_extrapolate): 68 <configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
53 "$param_model_b_spline_extrapolate" 69 </configfiles>
54 #else
55 $param_model_b_spline_extrapolate
56 #end if
57 #end if
58 #if $param_model_b_spline_boundary_condition:
59 -model:b_spline:boundary_condition $param_model_b_spline_boundary_condition
60 #end if
61 #if $param_model_lowess_span:
62 -model:lowess:span $param_model_lowess_span
63 #end if
64 #if $param_model_lowess_num_iterations:
65 -model:lowess:num_iterations $param_model_lowess_num_iterations
66 #end if
67 #if $param_model_lowess_delta:
68 -model:lowess:delta $param_model_lowess_delta
69 #end if
70 #if $param_model_lowess_interpolation_type:
71 -model:lowess:interpolation_type
72 #if " " in str($param_model_lowess_interpolation_type):
73 "$param_model_lowess_interpolation_type"
74 #else
75 $param_model_lowess_interpolation_type
76 #end if
77 #end if
78 #if $param_model_lowess_extrapolation_type:
79 -model:lowess:extrapolation_type
80 #if " " in str($param_model_lowess_extrapolation_type):
81 "$param_model_lowess_extrapolation_type"
82 #else
83 $param_model_lowess_extrapolation_type
84 #end if
85 #end if
86 #if $param_model_interpolated_interpolation_type:
87 -model:interpolated:interpolation_type
88 #if " " in str($param_model_interpolated_interpolation_type):
89 "$param_model_interpolated_interpolation_type"
90 #else
91 $param_model_interpolated_interpolation_type
92 #end if
93 #end if
94 #if $param_model_interpolated_extrapolation_type:
95 -model:interpolated:extrapolation_type
96 #if " " in str($param_model_interpolated_extrapolation_type):
97 "$param_model_interpolated_extrapolation_type"
98 #else
99 $param_model_interpolated_extrapolation_type
100 #end if
101 #end if
102 #if $adv_opts.adv_opts_selector=='advanced':
103 #if $adv_opts.param_force:
104 -force
105 #end if
106 #end if
107 ]]></command>
108 <inputs> 70 <inputs>
109 <param name="param_in" type="data" format="mzml,featurexml,consensusxml,idxml" optional="True" label="Input file to transform (separated by blanks)" help="(-in) "/> 71 <param name="in" argument="-in" type="data" format="consensusxml,featurexml,idxml,mzml" optional="true" label="Input file to transform (separated by blanks)" help=" select consensusxml,featurexml,idxml,mzml data sets(s)"/>
110 <param name="param_trafo_in" type="data" format="trafoxml" optional="False" label="Transformation to apply" help="(-trafo_in) "/> 72 <param name="trafo_in" argument="-trafo_in" type="data" format="trafoxml" optional="false" label="Transformation to apply" help=" select trafoxml data sets(s)"/>
111 <param name="param_invert" display="radio" type="boolean" truevalue="-invert" falsevalue="" checked="false" optional="True" label="Invert transformation (approximatively) before applying it" help="(-invert) "/> 73 <param name="invert" argument="-invert" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Invert transformation (approximatively) before applying it" help=""/>
112 <param name="param_store_original_rt" display="radio" type="boolean" truevalue="-store_original_rt" falsevalue="" checked="false" optional="True" label="Store the original retention times (before transformation) as meta data in the output file" help="(-store_original_rt) "/> 74 <param name="store_original_rt" argument="-store_original_rt" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Store the original retention times (before transformation) as meta data in the output file" help=""/>
113 <param name="param_model_type" type="select" optional="False" value="none" label="Type of model" help="(-type) "> 75 <section name="model" title="Options to control the modeling of retention time transformations from data" help="" expanded="false">
114 <option value="none" selected="true">none</option> 76 <param name="type" argument="-model:type" type="select" optional="false" label="Type of model" help="">
115 <option value="linear">linear</option> 77 <option value="none" selected="true">none</option>
116 <option value="b_spline">b_spline</option> 78 <option value="linear">linear</option>
117 <option value="lowess">lowess</option> 79 <option value="b_spline">b_spline</option>
118 <option value="interpolated">interpolated</option> 80 <option value="lowess">lowess</option>
81 <option value="interpolated">interpolated</option>
82 <expand macro="list_string_san"/>
83 </param>
84 <section name="linear" title="Parameters for 'linear' model" help="" expanded="false">
85 <param name="symmetric_regression" argument="-model:linear:symmetric_regression" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Perform linear regression on 'y - x' vs" help="'y + x', instead of on 'y' vs. 'x'"/>
86 <param name="x_weight" argument="-model:linear:x_weight" display="radio" type="select" optional="true" label="Weight x values" help="">
87 <option value="">default (nothing chosen)</option>
88 <option value="1/x">1/x</option>
89 <option value="1/x2">1/x2</option>
90 <option value="ln(x)">ln(x)</option>
91 <option value=""></option>
92 <expand macro="list_string_san"/>
93 </param>
94 <param name="y_weight" argument="-model:linear:y_weight" display="radio" type="select" optional="true" label="Weight y values" help="">
95 <option value="">default (nothing chosen)</option>
96 <option value="1/y">1/y</option>
97 <option value="1/y2">1/y2</option>
98 <option value="ln(y)">ln(y)</option>
99 <option value=""></option>
100 <expand macro="list_string_san"/>
101 </param>
102 <param name="x_datum_min" argument="-model:linear:x_datum_min" type="float" optional="true" value="1e-15" label="Minimum x value" help=""/>
103 <param name="x_datum_max" argument="-model:linear:x_datum_max" type="float" optional="true" value="1000000000000000.0" label="Maximum x value" help=""/>
104 <param name="y_datum_min" argument="-model:linear:y_datum_min" type="float" optional="true" value="1e-15" label="Minimum y value" help=""/>
105 <param name="y_datum_max" argument="-model:linear:y_datum_max" type="float" optional="true" value="1000000000000000.0" label="Maximum y value" help=""/>
106 </section>
107 <section name="b_spline" title="Parameters for 'b_spline' model" help="" expanded="false">
108 <param name="wavelength" argument="-model:b_spline:wavelength" type="float" optional="true" min="0.0" value="0.0" label="Determines the amount of smoothing by setting the number of nodes for the B-spline" help="The number is chosen so that the spline approximates a low-pass filter with this cutoff wavelength. The wavelength is given in the same units as the data; a higher value means more smoothing. '0' sets the number of nodes to twice the number of input points"/>
109 <param name="num_nodes" argument="-model:b_spline:num_nodes" type="integer" optional="true" min="0" value="5" label="Number of nodes for B-spline fitting" help="Overrides 'wavelength' if set (to two or greater). A lower value means more smoothing"/>
110 <param name="extrapolate" argument="-model:b_spline:extrapolate" display="radio" type="select" optional="false" label="Method to use for extrapolation beyond the original data range" help="'linear': Linear extrapolation using the slope of the B-spline at the corresponding endpoint. 'b_spline': Use the B-spline (as for interpolation). 'constant': Use the constant value of the B-spline at the corresponding endpoint. 'global_linear': Use a linear fit through the data (which will most probably introduce discontinuities at the ends of the data range)">
111 <option value="linear" selected="true">linear</option>
112 <option value="b_spline">b_spline</option>
113 <option value="constant">constant</option>
114 <option value="global_linear">global_linear</option>
115 <expand macro="list_string_san"/>
116 </param>
117 <param name="boundary_condition" argument="-model:b_spline:boundary_condition" type="integer" optional="true" min="0" max="2" value="2" label="Boundary condition at B-spline endpoints: 0 (value zero), 1 (first derivative zero) or 2 (second derivative zero)" help=""/>
118 </section>
119 <section name="lowess" title="Parameters for 'lowess' model" help="" expanded="false">
120 <param name="span" argument="-model:lowess:span" type="float" optional="true" min="0.0" max="1.0" value="0.666666666666667" label="Fraction of datapoints (f) to use for each local regression (determines the amount of smoothing)" help="Choosing this parameter in the range .2 to .8 usually results in a good fit"/>
121 <param name="num_iterations" argument="-model:lowess:num_iterations" type="integer" optional="true" min="0" value="3" label="Number of robustifying iterations for lowess fitting" help=""/>
122 <param name="delta" argument="-model:lowess:delta" type="float" optional="true" value="-1.0" label="Nonnegative parameter which may be used to save computations (recommended value is 0.01 of the range of the input" help="e.g. for data ranging from 1000 seconds to 2000 seconds, it could be set to 10). Setting a negative value will automatically do this"/>
123 <param name="interpolation_type" argument="-model:lowess:interpolation_type" display="radio" type="select" optional="false" label="Method to use for interpolation between datapoints computed by lowess" help="'linear': Linear interpolation. 'cspline': Use the cubic spline for interpolation. 'akima': Use an akima spline for interpolation">
124 <option value="linear">linear</option>
125 <option value="cspline" selected="true">cspline</option>
126 <option value="akima">akima</option>
127 <expand macro="list_string_san"/>
128 </param>
129 <param name="extrapolation_type" argument="-model:lowess:extrapolation_type" display="radio" type="select" optional="false" label="Method to use for extrapolation outside the data range" help="'two-point-linear': Uses a line through the first and last point to extrapolate. 'four-point-linear': Uses a line through the first and second point to extrapolate in front and and a line through the last and second-to-last point in the end. 'global-linear': Uses a linear regression to fit a line through all data points and use it for interpolation">
130 <option value="two-point-linear">two-point-linear</option>
131 <option value="four-point-linear" selected="true">four-point-linear</option>
132 <option value="global-linear">global-linear</option>
133 <expand macro="list_string_san"/>
134 </param>
135 </section>
136 <section name="interpolated" title="Parameters for 'interpolated' model" help="" expanded="false">
137 <param name="interpolation_type" argument="-model:interpolated:interpolation_type" display="radio" type="select" optional="false" label="Type of interpolation to apply" help="">
138 <option value="linear">linear</option>
139 <option value="cspline" selected="true">cspline</option>
140 <option value="akima">akima</option>
141 <expand macro="list_string_san"/>
142 </param>
143 <param name="extrapolation_type" argument="-model:interpolated:extrapolation_type" display="radio" type="select" optional="false" label="Type of extrapolation to apply: two-point-linear: use the first and last data point to build a single linear model, four-point-linear: build two linear models on both ends using the first two / last two points, global-linear: use all points to build a single linear model" help="Note that global-linear may not be continuous at the border">
144 <option value="two-point-linear" selected="true">two-point-linear</option>
145 <option value="four-point-linear">four-point-linear</option>
146 <option value="global-linear">global-linear</option>
147 <expand macro="list_string_san"/>
148 </param>
149 </section>
150 </section>
151 <expand macro="adv_opts_macro">
152 <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overwrite tool specific checks" help=""/>
153 <param name="test" argument="-test" type="hidden" optional="true" value="False" label="Enables the test mode (needed for internal use only)" help="">
154 <expand macro="list_string_san"/>
155 </param>
156 </expand>
157 <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="false">
158 <option value="out_FLAG">out (Type of extrapolation to apply: two-point-linear: use the first and last data point to build a single linear model, four-point-linear: build two linear models on both ends using the first two / last two points, global-linear: use all points to build a single linear model)</option>
159 <option value="trafo_out_FLAG">trafo_out (Type of extrapolation to apply: two-point-linear: use the first and last data point to build a single linear model, four-point-linear: build two linear models on both ends using the first two / last two points, global-linear: use all points to build a single linear model)</option>
160 <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
119 </param> 161 </param>
120 <param name="param_model_linear_symmetric_regression" display="radio" type="boolean" truevalue="-model:linear:symmetric_regression" falsevalue="" checked="false" optional="True" label="Perform linear regression on 'y - x' vs" help="(-symmetric_regression) 'y + x', instead of on 'y' vs. 'x'"/>
121 <param name="param_model_b_spline_wavelength" type="float" min="0.0" optional="True" value="0.0" label="Determines the amount of smoothing by setting the number of nodes for the B-spline" help="(-wavelength) The number is chosen so that the spline approximates a low-pass filter with this cutoff wavelength. The wavelength is given in the same units as the data; a higher value means more smoothing. '0' sets the number of nodes to twice the number of input points"/>
122 <param name="param_model_b_spline_num_nodes" type="integer" min="0" optional="True" value="5" label="Number of nodes for B-spline fitting" help="(-num_nodes) Overrides 'wavelength' if set (to two or greater). A lower value means more smoothing"/>
123 <param name="param_model_b_spline_extrapolate" display="radio" type="select" optional="False" value="linear" label="Method to use for extrapolation beyond the original data range" help="(-extrapolate) 'linear': Linear extrapolation using the slope of the B-spline at the corresponding endpoint. 'b_spline': Use the B-spline (as for interpolation). 'constant': Use the constant value of the B-spline at the corresponding endpoint. 'global_linear': Use a linear fit through the data (which will most probably introduce discontinuities at the ends of the data range)">
124 <option value="linear" selected="true">linear</option>
125 <option value="b_spline">b_spline</option>
126 <option value="constant">constant</option>
127 <option value="global_linear">global_linear</option>
128 </param>
129 <param name="param_model_b_spline_boundary_condition" type="integer" min="0" max="2" optional="True" value="2" label="Boundary condition at B-spline endpoints: 0 (value zero), 1 (first derivative zero) or 2 (second derivative zero)" help="(-boundary_condition) "/>
130 <param name="param_model_lowess_span" type="float" min="0.0" max="1.0" optional="True" value="0.666666666667" label="Fraction of datapoints (f) to use for each local regression (determines the amount of smoothing)" help="(-span) Choosing this parameter in the range .2 to .8 usually results in a good fit"/>
131 <param name="param_model_lowess_num_iterations" type="integer" min="0" optional="True" value="3" label="Number of robustifying iterations for lowess fitting" help="(-num_iterations) "/>
132 <param name="param_model_lowess_delta" type="float" value="-1.0" label="Nonnegative parameter which may be used to save computations (recommended value is 0.01 of the range of the input," help="(-delta) e.g. for data ranging from 1000 seconds to 2000 seconds, it could be set to 10). Setting a negative value will automatically do this"/>
133 <param name="param_model_lowess_interpolation_type" display="radio" type="select" optional="False" value="cspline" label="Method to use for interpolation between datapoints computed by lowess" help="(-interpolation_type) 'linear': Linear interpolation. 'cspline': Use the cubic spline for interpolation. 'akima': Use an akima spline for interpolation">
134 <option value="linear">linear</option>
135 <option value="cspline" selected="true">cspline</option>
136 <option value="akima">akima</option>
137 </param>
138 <param name="param_model_lowess_extrapolation_type" display="radio" type="select" optional="False" value="four-point-linear" label="Method to use for extrapolation outside the data range" help="(-extrapolation_type) 'two-point-linear': Uses a line through the first and last point to extrapolate. 'four-point-linear': Uses a line through the first and second point to extrapolate in front and and a line through the last and second-to-last point in the end. 'global-linear': Uses a linear regression to fit a line through all data points and use it for interpolation">
139 <option value="two-point-linear">two-point-linear</option>
140 <option value="four-point-linear" selected="true">four-point-linear</option>
141 <option value="global-linear">global-linear</option>
142 </param>
143 <param name="param_model_interpolated_interpolation_type" display="radio" type="select" optional="False" value="cspline" label="Type of interpolation to apply" help="(-interpolation_type) ">
144 <option value="linear">linear</option>
145 <option value="cspline" selected="true">cspline</option>
146 <option value="akima">akima</option>
147 </param>
148 <param name="param_model_interpolated_extrapolation_type" display="radio" type="select" optional="False" value="two-point-linear" label="Type of extrapolation to apply: two-point-linear: use the first and last data point to build a single linear model, four-point-linear: build two linear models on both ends using the first two / last two points, global-linear: use all points to build a single linear model" help="(-extrapolation_type) Note that global-linear may not be continuous at the border">
149 <option value="two-point-linear" selected="true">two-point-linear</option>
150 <option value="four-point-linear">four-point-linear</option>
151 <option value="global-linear">global-linear</option>
152 </param>
153 <expand macro="advanced_options">
154 <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
155 </expand>
156 </inputs> 162 </inputs>
157 <outputs> 163 <outputs>
158 <data name="param_out" metadata_source="param_in" format="input"/> 164 <data name="out" label="${tool.name} on ${on_string}: out" format_source="in" metadata_source="in">
159 <data name="param_trafo_out" format="trafoxml"/> 165 <filter>OPTIONAL_OUTPUTS is not None and "out_FLAG" in OPTIONAL_OUTPUTS</filter>
166 </data>
167 <data name="trafo_out" label="${tool.name} on ${on_string}: trafo_out" format="trafoxml">
168 <filter>OPTIONAL_OUTPUTS is not None and "trafo_out_FLAG" in OPTIONAL_OUTPUTS</filter>
169 </data>
170 <data name="stdout" format="txt" label="${tool.name} on ${on_string}: stdout">
171 <filter>OPTIONAL_OUTPUTS is None</filter>
172 </data>
173 <data name="ctd_out" format="xml" label="${tool.name} on ${on_string}: ctd">
174 <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter>
175 </data>
160 </outputs> 176 </outputs>
161 <help>Applies retention time transformations to maps. 177 <tests>
178 <expand macro="autotest_MapRTTransformer"/>
179 <expand macro="manutest_MapRTTransformer"/>
180 </tests>
181 <help><![CDATA[Applies retention time transformations to maps.
162 182
163 183
164 For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_MapRTTransformer.html</help> 184 For more information, visit http://www.openms.de/documentation/TOPP_MapRTTransformer.html]]></help>
185 <expand macro="references"/>
165 </tool> 186 </tool>