Mercurial > repos > recetox > matchms_filtering
comparison matchms_filtering.xml @ 0:3d275fbdf741 draft
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 4d2ac914c951166e386a94d8ebb8cb1becfac122"
author | recetox |
---|---|
date | Tue, 22 Mar 2022 16:08:03 +0000 |
parents | |
children | b8e9a7c7add2 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3d275fbdf741 |
---|---|
1 <tool id="matchms_filtering" name="matchMS filtering" version="@TOOL_VERSION@+galaxy1"> | |
2 <description>filter and normalize mass spectrometry data</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="creator"/> | |
7 <requirements> | |
8 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> | |
9 <requirement type="package" version="1.1.4">pandas</requirement> | |
10 </requirements> | |
11 | |
12 <environment_variables> | |
13 <environment_variable name="MPLCONFIGDIR">\$_GALAXY_JOB_TMP_DIR</environment_variable> | |
14 </environment_variables> | |
15 | |
16 <command detect_errors="exit_code"><![CDATA[ | |
17 sh ${matchms_python_cli} | |
18 ]]> </command> | |
19 | |
20 <configfiles> | |
21 <configfile name="matchms_python_cli"> | |
22 python3 ${__tool_directory__}/matchms_filtering_wrapper.py \ | |
23 --spectra "$spectra" \ | |
24 --spectra_format "$spectra.ext" \ | |
25 #if $normalise_intensities.is_true | |
26 -normalise_intensities \ | |
27 #end if | |
28 #if $default_filters.is_true | |
29 -default_filters \ | |
30 #end if | |
31 #if $clean_metadata.is_true | |
32 -clean_metadata \ | |
33 #end if | |
34 #if $relative_intensity.is_true | |
35 -relative_intensity \ | |
36 --from_intensity "$relative_intensity.from_intensity" \ | |
37 --to_intensity "$relative_intensity.to_intensity" \ | |
38 #end if | |
39 #if $mz_range.is_true | |
40 -mz_range \ | |
41 --from_mz "$mz_range.from_mz" \ | |
42 --to_mz "$mz_range.to_mz" \ | |
43 #end if | |
44 --output "$output" | |
45 </configfile> | |
46 </configfiles> | |
47 | |
48 <inputs> | |
49 <param label="Spectra file" name="spectra" type="data" format="msp,mgf" help="Mass spectra file to be filtered." /> | |
50 | |
51 <conditional name="normalise_intensities"> | |
52 <param name="is_true" label="Normalize intensities" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
53 help="Normalize intensities of peaks (and losses) to unit height."/> | |
54 </conditional> | |
55 | |
56 <conditional name="default_filters"> | |
57 <param name="is_true" label="Apply default filters" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
58 help="Collection of filters that are considered default and that do no require any (factory) arguments."/> | |
59 </conditional> | |
60 | |
61 <conditional name="clean_metadata"> | |
62 <param name="is_true" label="Clean metadata" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
63 help="Apply all adding and cleaning filters if possible, so that the spectra have canonical metadata." /> | |
64 </conditional> | |
65 | |
66 <conditional name="relative_intensity"> | |
67 <param name="is_true" label="Filter relative intensity" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
68 help="Keep only peaks within set relative intensity range (keep if maximum >= intensity >= minimum)." /> | |
69 <when value="TRUE"> | |
70 <param label="Minimum intensity" name="from_intensity" optional="true" type="float" help="Lower bound for intensity filter." /> | |
71 <param label="Maximum intensity" name="to_intensity" optional="true" type="float" help="Upper bound for intensity filter." /> | |
72 </when> | |
73 </conditional> | |
74 | |
75 <conditional name="mz_range"> | |
76 <param name="is_true" label="Filter m/z range" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
77 help="Keep only peaks between set m/z range (keep if maximum >= m/z >= minimum)." /> | |
78 <when value="TRUE"> | |
79 <param label="Minimum m/z" name="from_mz" optional="true" type="float" help="Lower bound for m/z filter." /> | |
80 <param label="Maximum m/z" name="to_mz" optional="true" type="float" help="Upper bound for m/z filter." /> | |
81 </when> | |
82 </conditional> | |
83 | |
84 </inputs> | |
85 | |
86 <outputs> | |
87 <data label="${tool.name} on ${on_string}" name="output" format_source="spectra" /> | |
88 </outputs> | |
89 | |
90 <tests> | |
91 <test> | |
92 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | |
93 <section name="normalise_intensities"> | |
94 <param name="is_true" value="TRUE"/> | |
95 </section> | |
96 <output name="output" file="filtering/normalise_intensities.msp" ftype="msp"/> | |
97 </test> | |
98 <test> | |
99 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | |
100 <section name="default_filters"> | |
101 <param name="is_true" value="TRUE"/> | |
102 </section> | |
103 <output name="output" file="filtering/default_filters.msp" ftype="msp"/> | |
104 </test> | |
105 <test> | |
106 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | |
107 <section name="clean_metadata"> | |
108 <param name="is_true" value="TRUE"/> | |
109 </section> | |
110 <output name="output" file="filtering/clean_metadata.msp" ftype="msp"/> | |
111 </test> | |
112 <test> | |
113 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | |
114 <section name="relative_intensity"> | |
115 <param name="is_true" value="TRUE"/> | |
116 <param name="from_intensity" value="0.3"/> | |
117 <param name="to_intensity" value="0.9"/> | |
118 </section> | |
119 <output name="output" file="filtering/relative_intensity.msp" ftype="msp"/> | |
120 </test> | |
121 <test> | |
122 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | |
123 <section name="mz_range"> | |
124 <param name="is_true" value="TRUE"/> | |
125 <param name="from_mz" value="300"/> | |
126 <param name="to_mz" value="800"/> | |
127 </section> | |
128 <output name="output" file="filtering/mz_range.msp" ftype="msp"/> | |
129 </test> | |
130 </tests> | |
131 | |
132 <help><![CDATA[ | |
133 Documentation | |
134 For documentation on the tool see https://github.com/matchms/matchms/blob/master/README.rst and https://matchms.readthedocs.io/en/latest/. | |
135 | |
136 Upstream Tools | |
137 +-----------+---------------+--------+-----------+ | |
138 | Name | Output File | Format | Parameter | | |
139 +===========+===============+========+===========+ | |
140 | RAMClustR | Mass spectra | msp | references| | |
141 +-----------+---------------+--------+-----------+ | |
142 | RAMClustR | Mass spectra | msp | queries | | |
143 +-----------+---------------+--------+-----------+ | |
144 | |
145 Downstream Tools | |
146 The output is an msp file after applying the specified filters. | |
147 ]]></help> | |
148 | |
149 | |
150 <citations> | |
151 <citation type="doi">10.5281/zenodo.4589154</citation> | |
152 <citation type="doi">10.21105/joss.02411</citation> | |
153 </citations> | |
154 </tool> |