comparison SpectraMerger.xml @ 9:bf529c279902 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:20:00 +0000
parents 106130886208
children e08b7d2880f4
comparison
equal deleted inserted replaced
8:70ec9c3048a2 9:bf529c279902
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: [Signal processing and preprocessing]--> 3 <!--Proposed Tool Section: [Signal processing and preprocessing]-->
4 <tool id="SpectraMerger" name="SpectraMerger" version="2.3.0"> 4 <tool id="SpectraMerger" name="SpectraMerger" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
5 <description>Merges spectra (each MS level separately), increasing S/N ratios.</description> 5 <description>Merges spectra (each MS level separately), increasing S/N ratios.</description>
6 <macros> 6 <macros>
7 <token name="@EXECUTABLE@">SpectraMerger</token> 7 <token name="@EXECUTABLE@">SpectraMerger</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[SpectraMerger 15 @EXT_FOO@
16 #import re
14 17
15 #if $param_in: 18 ## Preprocessing
16 -in $param_in 19 mkdir in &&
17 #end if 20 ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
18 #if $param_out: 21 mkdir out &&
19 -out $param_out
20 #end if
21 #if $param_merging_method:
22 -merging_method
23 #if " " in str($param_merging_method):
24 "$param_merging_method"
25 #else
26 $param_merging_method
27 #end if
28 #end if
29 #if $param_algorithm_average_gaussian_spectrum_type:
30 -algorithm:average_gaussian:spectrum_type
31 #if " " in str($param_algorithm_average_gaussian_spectrum_type):
32 "$param_algorithm_average_gaussian_spectrum_type"
33 #else
34 $param_algorithm_average_gaussian_spectrum_type
35 #end if
36 #end if
37 #if $param_algorithm_average_gaussian_ms_level:
38 -algorithm:average_gaussian:ms_level $param_algorithm_average_gaussian_ms_level
39 #end if
40 #if $param_algorithm_average_gaussian_rt_FWHM:
41 -algorithm:average_gaussian:rt_FWHM $param_algorithm_average_gaussian_rt_FWHM
42 #end if
43 #if $param_algorithm_average_tophat_spectrum_type:
44 -algorithm:average_tophat:spectrum_type
45 #if " " in str($param_algorithm_average_tophat_spectrum_type):
46 "$param_algorithm_average_tophat_spectrum_type"
47 #else
48 $param_algorithm_average_tophat_spectrum_type
49 #end if
50 #end if
51 #if $param_algorithm_average_tophat_ms_level:
52 -algorithm:average_tophat:ms_level $param_algorithm_average_tophat_ms_level
53 #end if
54 #if $param_algorithm_average_tophat_rt_range:
55 -algorithm:average_tophat:rt_range $param_algorithm_average_tophat_rt_range
56 #end if
57 #if $param_algorithm_average_tophat_rt_unit:
58 -algorithm:average_tophat:rt_unit
59 #if " " in str($param_algorithm_average_tophat_rt_unit):
60 "$param_algorithm_average_tophat_rt_unit"
61 #else
62 $param_algorithm_average_tophat_rt_unit
63 #end if
64 #end if
65 22
66 #if $rep_param_algorithm_block_method_ms_levels: 23 ## Main program call
67 -algorithm:block_method:ms_levels 24
68 #for token in $rep_param_algorithm_block_method_ms_levels: 25 set -o pipefail &&
69 #if " " in str(token): 26 @EXECUTABLE@ -write_ctd ./ &&
70 "$token.param_algorithm_block_method_ms_levels" 27 python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' &&
71 #else 28 @EXECUTABLE@ -ini @EXECUTABLE@.ctd
72 $token.param_algorithm_block_method_ms_levels 29 -in
73 #end if 30 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)'
74 #end for 31 -out
75 #end if 32 'out/output.${gxy2omsext("mzml")}'
76 #if $param_algorithm_block_method_rt_block_size: 33
77 -algorithm:block_method:rt_block_size $param_algorithm_block_method_rt_block_size 34 ## Postprocessing
78 #end if 35 && mv 'out/output.${gxy2omsext("mzml")}' '$out'
79 #if $param_algorithm_block_method_rt_max_length: 36 #if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS
80 -algorithm:block_method:rt_max_length $param_algorithm_block_method_rt_max_length 37 && mv '@EXECUTABLE@.ctd' '$ctd_out'
81 #end if 38 #end if]]></command>
82 #if $param_algorithm_precursor_method_mz_tolerance: 39 <configfiles>
83 -algorithm:precursor_method:mz_tolerance $param_algorithm_precursor_method_mz_tolerance 40 <inputs name="args_json" data_style="paths"/>
84 #end if 41 <configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
85 #if $param_algorithm_precursor_method_rt_tolerance: 42 </configfiles>
86 -algorithm:precursor_method:rt_tolerance $param_algorithm_precursor_method_rt_tolerance
87 #end if
88 #if $adv_opts.adv_opts_selector=='advanced':
89 #if $adv_opts.param_force:
90 -force
91 #end if
92 #if $adv_opts.param_algorithm_mz_binning_width:
93 -algorithm:mz_binning_width $adv_opts.param_algorithm_mz_binning_width
94 #end if
95 #if $adv_opts.param_algorithm_mz_binning_width_unit:
96 -algorithm:mz_binning_width_unit
97 #if " " in str($adv_opts.param_algorithm_mz_binning_width_unit):
98 "$adv_opts.param_algorithm_mz_binning_width_unit"
99 #else
100 $adv_opts.param_algorithm_mz_binning_width_unit
101 #end if
102 #end if
103 #if $adv_opts.param_algorithm_sort_blocks:
104 -algorithm:sort_blocks
105 #if " " in str($adv_opts.param_algorithm_sort_blocks):
106 "$adv_opts.param_algorithm_sort_blocks"
107 #else
108 $adv_opts.param_algorithm_sort_blocks
109 #end if
110 #end if
111 #if $adv_opts.param_algorithm_average_gaussian_cutoff:
112 -algorithm:average_gaussian:cutoff $adv_opts.param_algorithm_average_gaussian_cutoff
113 #end if
114 #end if
115 ]]></command>
116 <inputs> 43 <inputs>
117 <param name="param_in" type="data" format="mzml" optional="False" label="Input mzML file" help="(-in) "/> 44 <param name="in" argument="-in" type="data" format="mzml" optional="false" label="Input mzML file" help=" select mzml data sets(s)"/>
118 <param name="param_merging_method" display="radio" type="select" optional="False" value="average_gaussian" label="Method of merging which should be used" help="(-merging_method) "> 45 <param name="merging_method" argument="-merging_method" display="radio" type="select" optional="false" label="Method of merging which should be used" help="">
119 <option value="average_gaussian" selected="true">average_gaussian</option> 46 <option value="average_gaussian" selected="true">average_gaussian</option>
120 <option value="average_tophat">average_tophat</option> 47 <option value="average_tophat">average_tophat</option>
121 <option value="precursor_method">precursor_method</option> 48 <option value="precursor_method">precursor_method</option>
122 <option value="block_method">block_method</option> 49 <option value="block_method">block_method</option>
50 <expand macro="list_string_san"/>
123 </param> 51 </param>
124 <param name="param_algorithm_average_gaussian_spectrum_type" display="radio" type="select" optional="False" value="automatic" label="Spectrum type of the MS level to be averaged" help="(-spectrum_type) "> 52 <section name="algorithm" title="Algorithm section for merging spectra" help="" expanded="false">
125 <option value="profile">profile</option> 53 <param name="mz_binning_width" argument="-algorithm:mz_binning_width" type="float" optional="true" min="0.0" value="5.0" label="minimum m/z distance for two data points (profile data) or peaks (centroided data) to be considered distinct" help="Closer data points or peaks will be merged"/>
126 <option value="centroid">centroid</option> 54 <param name="mz_binning_width_unit" argument="-algorithm:mz_binning_width_unit" display="radio" type="select" optional="false" label="Unit in which the distance between two data points or peaks is given" help="">
127 <option value="automatic" selected="true">automatic</option>
128 </param>
129 <param name="param_algorithm_average_gaussian_ms_level" type="integer" min="1" optional="True" value="1" label="Average spectra of this level" help="(-ms_level) All other spectra remain unchanged"/>
130 <param name="param_algorithm_average_gaussian_rt_FWHM" type="float" min="0.0" max="1e+11" optional="True" value="5.0" label="FWHM of Gauss curve in seconds to be averaged ove" help="(-rt_FWHM) "/>
131 <param name="param_algorithm_average_tophat_spectrum_type" display="radio" type="select" optional="False" value="automatic" label="Spectrum type of the MS level to be averaged" help="(-spectrum_type) ">
132 <option value="profile">profile</option>
133 <option value="centroid">centroid</option>
134 <option value="automatic" selected="true">automatic</option>
135 </param>
136 <param name="param_algorithm_average_tophat_ms_level" type="integer" min="1" optional="True" value="1" label="Average spectra of this level" help="(-ms_level) All other spectra remain unchanged"/>
137 <param name="param_algorithm_average_tophat_rt_range" type="float" min="0.0" max="1e+11" optional="True" value="5.0" label="RT range to be averaged over, i.e" help="(-rt_range) +/-(RT range)/2 from each spectrum"/>
138 <param name="param_algorithm_average_tophat_rt_unit" display="radio" type="select" optional="False" value="scans" label="Unit for RT range" help="(-rt_unit) ">
139 <option value="scans" selected="true">scans</option>
140 <option value="seconds">seconds</option>
141 </param>
142 <repeat name="rep_param_algorithm_block_method_ms_levels" min="0" max="1" title="param_algorithm_block_method_ms_levels">
143 <param name="param_algorithm_block_method_ms_levels" type="text" min="1" optional="True" size="30" value="1" label="Merge spectra of this level" help="(-ms_levels) All spectra with other MS levels remain untouched">
144 <sanitizer>
145 <valid initial="string.printable">
146 <remove value="'"/>
147 <remove value="&quot;"/>
148 </valid>
149 </sanitizer>
150 </param>
151 </repeat>
152 <param name="param_algorithm_block_method_rt_block_size" type="integer" min="1" optional="True" value="5" label="Maximum number of scans to be summed up" help="(-rt_block_size) "/>
153 <param name="param_algorithm_block_method_rt_max_length" type="float" min="0.0" max="1e+11" optional="True" value="0.0" label="Maximum RT size of the block in seconds (0.0 = no size restriction)" help="(-rt_max_length) "/>
154 <param name="param_algorithm_precursor_method_mz_tolerance" type="float" min="0.0" optional="True" value="0.0001" label="Max m/z distance of the precursor entries of two spectra to be merged in [Da]" help="(-mz_tolerance) "/>
155 <param name="param_algorithm_precursor_method_rt_tolerance" type="float" min="0.0" optional="True" value="5.0" label="Max RT distance of the precursor entries of two spectra to be merged in [s]" help="(-rt_tolerance) "/>
156 <expand macro="advanced_options">
157 <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
158 <param name="param_algorithm_mz_binning_width" type="float" min="0.0" optional="True" value="5.0" label="minimum m/z distance for two data points (profile data) or peaks (centroided data) to be considered distinct" help="(-mz_binning_width) Closer data points or peaks will be merged"/>
159 <param name="param_algorithm_mz_binning_width_unit" display="radio" type="select" optional="False" value="ppm" label="Unit in which the distance between two data points or peaks is given" help="(-mz_binning_width_unit) ">
160 <option value="Da">Da</option> 55 <option value="Da">Da</option>
161 <option value="ppm" selected="true">ppm</option> 56 <option value="ppm" selected="true">ppm</option>
57 <expand macro="list_string_san"/>
162 </param> 58 </param>
163 <param name="param_algorithm_sort_blocks" display="radio" type="select" optional="False" value="RT_ascending" label="Sort blocks by &lt;?&gt; before merging them (useful for precursor order)" help="(-sort_blocks) "> 59 <param name="sort_blocks" argument="-algorithm:sort_blocks" display="radio" type="select" optional="false" label="Sort blocks by &lt;?&gt; before merging them (useful for precursor order)" help="">
164 <option value="RT_ascending" selected="true">RT_ascending</option> 60 <option value="RT_ascending" selected="true">RT_ascending</option>
165 <option value=" RT_descending"> RT_descending</option> 61 <option value=" RT_descending"> RT_descending</option>
62 <expand macro="list_string_san"/>
166 </param> 63 </param>
167 <param name="param_algorithm_average_gaussian_cutoff" type="float" min="0.0" max="1.0" optional="True" value="0.01" label="Intensity cutoff for Gaussian" help="(-cutoff) The Gaussian RT profile decreases from 1 at its apex to 0 at infinity. Spectra for which the intensity of the Gaussian drops below the cutoff do not contribute to the average"/> 64 <section name="average_gaussian" title="" help="" expanded="false">
65 <param name="spectrum_type" argument="-algorithm:average_gaussian:spectrum_type" display="radio" type="select" optional="false" label="Spectrum type of the MS level to be averaged" help="">
66 <option value="profile">profile</option>
67 <option value="centroid">centroid</option>
68 <option value="automatic" selected="true">automatic</option>
69 <expand macro="list_string_san"/>
70 </param>
71 <param name="ms_level" argument="-algorithm:average_gaussian:ms_level" type="integer" optional="true" min="1" value="1" label="Average spectra of this level" help="All other spectra remain unchanged"/>
72 <param name="rt_FWHM" argument="-algorithm:average_gaussian:rt_FWHM" type="float" optional="true" min="0.0" max="100000000000.0" value="5.0" label="FWHM of Gauss curve in seconds to be averaged ove" help=""/>
73 <param name="cutoff" argument="-algorithm:average_gaussian:cutoff" type="float" optional="true" min="0.0" max="1.0" value="0.01" label="Intensity cutoff for Gaussian" help="The Gaussian RT profile decreases from 1 at its apex to 0 at infinity. Spectra for which the intensity of the Gaussian drops below the cutoff do not contribute to the average"/>
74 </section>
75 <section name="average_tophat" title="" help="" expanded="false">
76 <param name="spectrum_type" argument="-algorithm:average_tophat:spectrum_type" display="radio" type="select" optional="false" label="Spectrum type of the MS level to be averaged" help="">
77 <option value="profile">profile</option>
78 <option value="centroid">centroid</option>
79 <option value="automatic" selected="true">automatic</option>
80 <expand macro="list_string_san"/>
81 </param>
82 <param name="ms_level" argument="-algorithm:average_tophat:ms_level" type="integer" optional="true" min="1" value="1" label="Average spectra of this level" help="All other spectra remain unchanged"/>
83 <param name="rt_range" argument="-algorithm:average_tophat:rt_range" type="float" optional="true" min="0.0" max="100000000000.0" value="5.0" label="RT range to be averaged ove" help="i.e. +/-(RT range)/2 from each spectrum"/>
84 <param name="rt_unit" argument="-algorithm:average_tophat:rt_unit" display="radio" type="select" optional="false" label="Unit for RT range" help="">
85 <option value="scans" selected="true">scans</option>
86 <option value="seconds">seconds</option>
87 <expand macro="list_string_san"/>
88 </param>
89 </section>
90 <section name="block_method" title="" help="" expanded="false">
91 <param name="ms_levels" argument="-algorithm:block_method:ms_levels" type="text" optional="true" value="1" label="Merge spectra of this level" help="All spectra with other MS levels remain untouched (space separated list, in order to allow for spaces in list items surround them by single quotes)">
92 <expand macro="list_integer_valsan">
93 <validator type="expression" message="a space separated list of integer values in the range 1: is required"><![CDATA[len(value.split(' ')) == len([_ for _ in value.split(' ') if 1 <= int(_)])
94 ]]></validator>
95 </expand>
96 </param>
97 <param name="rt_block_size" argument="-algorithm:block_method:rt_block_size" type="integer" optional="true" min="1" value="5" label="Maximum number of scans to be summed up" help=""/>
98 <param name="rt_max_length" argument="-algorithm:block_method:rt_max_length" type="float" optional="true" min="0.0" max="100000000000.0" value="0.0" label="Maximum RT size of the block in seconds (0.0 = no size restriction)" help=""/>
99 </section>
100 <section name="precursor_method" title="" help="" expanded="false">
101 <param name="mz_tolerance" argument="-algorithm:precursor_method:mz_tolerance" type="float" optional="true" min="0.0" value="0.0001" label="Max m/z distance of the precursor entries of two spectra to be merged in [Da]" help=""/>
102 <param name="rt_tolerance" argument="-algorithm:precursor_method:rt_tolerance" type="float" optional="true" min="0.0" value="5.0" label="Max RT distance of the precursor entries of two spectra to be merged in [s]" help=""/>
103 </section>
104 </section>
105 <expand macro="adv_opts_macro">
106 <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overwrite tool specific checks" help=""/>
107 <param name="test" argument="-test" type="hidden" optional="true" value="False" label="Enables the test mode (needed for internal use only)" help="">
108 <expand macro="list_string_san"/>
109 </param>
168 </expand> 110 </expand>
111 <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="true">
112 <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
113 </param>
169 </inputs> 114 </inputs>
170 <outputs> 115 <outputs>
171 <data name="param_out" format="mzml"/> 116 <data name="out" label="${tool.name} on ${on_string}: out" format="mzml"/>
117 <data name="ctd_out" format="xml" label="${tool.name} on ${on_string}: ctd">
118 <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter>
119 </data>
172 </outputs> 120 </outputs>
173 <help>Merges spectra (each MS level separately), increasing S/N ratios. 121 <tests>
122 <expand macro="autotest_SpectraMerger"/>
123 <expand macro="manutest_SpectraMerger"/>
124 </tests>
125 <help><![CDATA[Merges spectra (each MS level separately), increasing S/N ratios.
174 126
175 127
176 For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_SpectraMerger.html</help> 128 For more information, visit http://www.openms.de/documentation/TOPP_SpectraMerger.html]]></help>
129 <expand macro="references"/>
177 </tool> 130 </tool>