Mercurial > repos > recetox > matchms_filtering
comparison matchms_filtering.xml @ 6:13de8005adba draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
author | recetox |
---|---|
date | Thu, 12 Oct 2023 13:24:59 +0000 |
parents | a177ac3c752c |
children | 039e7ab31836 |
comparison
equal
deleted
inserted
replaced
5:a177ac3c752c | 6:13de8005adba |
---|---|
1 <tool id="matchms_filtering" name="matchms filtering" version="@TOOL_VERSION@+galaxy0" profile="21.09"> | 1 <tool id="matchms_filtering" name="matchms filtering" version="@TOOL_VERSION@+galaxy2" profile="21.09"> |
2 <description>filter and normalize mass spectrometry data</description> | 2 <description>filter and normalize mass spectrometry data</description> |
3 | 3 |
4 <macros> | 4 <macros> |
5 <import>macros.xml</import> | 5 <import>macros.xml</import> |
6 <import>help.xml</import> | 6 <import>help.xml</import> |
28 <configfiles> | 28 <configfiles> |
29 <configfile name="matchms_python_cli"> | 29 <configfile name="matchms_python_cli"> |
30 python3 ${__tool_directory__}/matchms_filtering_wrapper.py \ | 30 python3 ${__tool_directory__}/matchms_filtering_wrapper.py \ |
31 --spectra "$spectra" \ | 31 --spectra "$spectra" \ |
32 --spectra_format "$spectra.ext" \ | 32 --spectra_format "$spectra.ext" \ |
33 #if $normalise_intensities.is_true | 33 #if $normalise_intensities_is_true == "TRUE" |
34 -normalise_intensities \ | 34 -normalise_intensities \ |
35 #end if | 35 #end if |
36 #if $default_filters.is_true | 36 #if $default_filters_is_true == "TRUE" |
37 -default_filters \ | 37 -default_filters \ |
38 #end if | 38 #end if |
39 #if $clean_metadata.is_true | 39 #if $clean_metadata_is_true == "TRUE" |
40 -clean_metadata \ | 40 -clean_metadata \ |
41 #end if | 41 #end if |
42 #if $relative_intensity.is_true | 42 #if $relative_intensity.is_true == "TRUE" |
43 -relative_intensity \ | 43 -relative_intensity \ |
44 --from_intensity "$relative_intensity.from_intensity" \ | 44 --from_intensity "$relative_intensity.from_intensity" \ |
45 --to_intensity "$relative_intensity.to_intensity" \ | 45 --to_intensity "$relative_intensity.to_intensity" \ |
46 #end if | 46 #end if |
47 #if $mz_range.is_true | 47 #if $mz_range.is_true == "TRUE" |
48 -mz_range \ | 48 -mz_range \ |
49 --from_mz "$mz_range.from_mz" \ | 49 --from_mz "$mz_range.from_mz" \ |
50 --to_mz "$mz_range.to_mz" \ | 50 --to_mz "$mz_range.to_mz" \ |
51 #end if | |
52 #if $require_smiles_is_true == "TRUE" | |
53 -require_smiles \ | |
54 #end if | |
55 #if $require_inchi_is_true == "TRUE" | |
56 -require_inchi \ | |
57 #end if | |
58 #if $reduce_to_top_n_peaks.is_true == "TRUE" | |
59 -reduce_to_top_n_peaks \ | |
60 --n_max "$reduce_to_top_n_peaks.n_max" \ | |
51 #end if | 61 #end if |
52 --output "$output" | 62 --output "$output" |
53 </configfile> | 63 </configfile> |
54 </configfiles> | 64 </configfiles> |
55 | 65 |
56 <inputs> | 66 <inputs> |
57 <param label="Spectra file" name="spectra" type="data" format="msp,mgf" help="Mass spectra file to be filtered." /> | 67 <param label="Spectra file" name="spectra" type="data" format="msp,mgf" help="Mass spectra file to be filtered." /> |
58 | 68 <param name="normalise_intensities_is_true" label="Normalize intensities" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" |
59 <conditional name="normalise_intensities"> | 69 help="Normalize intensities of peaks (and losses) to unit height."/> |
60 <param name="is_true" label="Normalize intensities" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | 70 <param name="default_filters_is_true" label="Apply default filters" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" |
61 help="Normalize intensities of peaks (and losses) to unit height."/> | 71 help="Collection of filters that are considered default and that do no require any (factory) arguments."/> |
62 </conditional> | 72 <param name="clean_metadata_is_true" label="Clean metadata" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" |
63 | 73 help="Apply all adding and cleaning filters if possible, so that the spectra have canonical metadata." /> |
64 <conditional name="default_filters"> | |
65 <param name="is_true" label="Apply default filters" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
66 help="Collection of filters that are considered default and that do no require any (factory) arguments."/> | |
67 </conditional> | |
68 | |
69 <conditional name="clean_metadata"> | |
70 <param name="is_true" label="Clean metadata" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
71 help="Apply all adding and cleaning filters if possible, so that the spectra have canonical metadata." /> | |
72 </conditional> | |
73 | 74 |
74 <conditional name="relative_intensity"> | 75 <conditional name="relative_intensity"> |
75 <param name="is_true" label="Filter relative intensity" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | 76 <param name="is_true" label="Filter relative intensity" type="select" |
76 help="Keep only peaks within set relative intensity range (keep if maximum >= intensity >= minimum)." /> | 77 help="Keep only peaks within set relative intensity range (keep if maximum >= intensity >= minimum)."> |
78 <option value="FALSE" selected="true">FALSE</option> | |
79 <option value="TRUE">TRUE</option> | |
80 </param> | |
77 <when value="TRUE"> | 81 <when value="TRUE"> |
78 <param label="Minimum intensity" name="from_intensity" value="0" type="float" help="Lower bound for intensity filter." /> | 82 <param label="Minimum intensity" name="from_intensity" value="0" type="float" help="Lower bound for intensity filter." /> |
79 <param label="Maximum intensity" name="to_intensity" value="1" type="float" help="Upper bound for intensity filter." /> | 83 <param label="Maximum intensity" name="to_intensity" value="1" type="float" help="Upper bound for intensity filter." /> |
80 </when> | 84 </when> |
85 <when value="FALSE"></when> | |
81 </conditional> | 86 </conditional> |
82 | 87 |
83 <conditional name="mz_range"> | 88 <conditional name="mz_range"> |
84 <param name="is_true" label="Filter m/z range" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | 89 <param name="is_true" label="Filter m/z range" type="select" |
85 help="Keep only peaks between set m/z range (keep if maximum >= m/z >= minimum)." /> | 90 help="Keep only peaks between set m/z range (keep if maximum >= m/z >= minimum)."> |
91 <option value="FALSE" selected="true">FALSE</option> | |
92 <option value="TRUE">TRUE</option> | |
93 </param> | |
86 <when value="TRUE"> | 94 <when value="TRUE"> |
87 <param label="Minimum m/z" name="from_mz" optional="true" type="float" help="Lower bound for m/z filter." /> | 95 <param label="Minimum m/z" name="from_mz" optional="true" type="float" help="Lower bound for m/z filter." /> |
88 <param label="Maximum m/z" name="to_mz" optional="true" type="float" help="Upper bound for m/z filter." /> | 96 <param label="Maximum m/z" name="to_mz" optional="true" type="float" help="Upper bound for m/z filter." /> |
89 </when> | 97 </when> |
98 <when value="FALSE"></when> | |
99 </conditional> | |
100 | |
101 <param name="require_smiles_is_true" label="Require SMILES" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
102 help="Remove spectra that does not contain SMILES." /> | |
103 | |
104 <param name="require_inchi_is_true" label="Require INCHI" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" | |
105 help="Remove spectra that does not contain INCHI." /> | |
106 | |
107 <conditional name="reduce_to_top_n_peaks"> | |
108 <param name="is_true" label="Reduce to top n peaks" type="select" | |
109 help="Lowest intensity peaks will be removed when it has more peaks than desired."> | |
110 <option value="FALSE" selected="true">FALSE</option> | |
111 <option value="TRUE">TRUE</option> | |
112 </param> | |
113 <when value="TRUE"> | |
114 <param label="Maximum number of peaks" name="n_max" value="5" type="integer" help="Maximum number of peaks. Remove peaks if more peaks are found." /> | |
115 </when> | |
116 <when value="FALSE"></when> | |
90 </conditional> | 117 </conditional> |
91 | 118 |
92 </inputs> | 119 </inputs> |
93 | 120 |
94 <outputs> | 121 <outputs> |
96 </outputs> | 123 </outputs> |
97 | 124 |
98 <tests> | 125 <tests> |
99 <test> | 126 <test> |
100 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | 127 <param name="spectra" value="filtering/input.msp" ftype="msp"/> |
101 <section name="normalise_intensities"> | 128 <param name="normalise_intensities_is_true" value="TRUE"/> |
102 <param name="is_true" value="TRUE"/> | |
103 </section> | |
104 <output name="output" file="filtering/normalise_intensities.msp" ftype="msp"/> | 129 <output name="output" file="filtering/normalise_intensities.msp" ftype="msp"/> |
105 </test> | 130 </test> |
106 <test> | 131 <test> |
107 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | 132 <param name="spectra" value="filtering/input.msp" ftype="msp"/> |
108 <section name="default_filters"> | 133 <param name="default_filters_is_true" value="TRUE"/> |
109 <param name="is_true" value="TRUE"/> | |
110 </section> | |
111 <output name="output" file="filtering/default_filters.msp" ftype="msp"/> | 134 <output name="output" file="filtering/default_filters.msp" ftype="msp"/> |
112 </test> | 135 </test> |
113 <test> | 136 <test> |
114 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | 137 <param name="spectra" value="filtering/input.msp" ftype="msp"/> |
115 <section name="clean_metadata"> | 138 <param name="clean_metadata_is_true" value="TRUE"/> |
116 <param name="is_true" value="TRUE"/> | |
117 </section> | |
118 <output name="output" file="filtering/clean_metadata.msp" ftype="msp"/> | 139 <output name="output" file="filtering/clean_metadata.msp" ftype="msp"/> |
119 </test> | 140 </test> |
120 <test> | 141 <test> |
121 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | 142 <param name="spectra" value="filtering/input.msp" ftype="msp"/> |
122 <section name="relative_intensity"> | 143 <section name="relative_intensity"> |
133 <param name="from_mz" value="300"/> | 154 <param name="from_mz" value="300"/> |
134 <param name="to_mz" value="800"/> | 155 <param name="to_mz" value="800"/> |
135 </section> | 156 </section> |
136 <output name="output" file="filtering/mz_range.msp" ftype="msp"/> | 157 <output name="output" file="filtering/mz_range.msp" ftype="msp"/> |
137 </test> | 158 </test> |
159 <test> | |
160 <param name="spectra" value="filtering/require_filter.msp" ftype="msp"/> | |
161 <param name="require_smiles_is_true" value="TRUE"/> | |
162 <output name="output" file="filtering/require_smiles_out.msp" ftype="msp"/> | |
163 </test> | |
164 <test> | |
165 <param name="spectra" value="filtering/require_filter.msp" ftype="msp"/> | |
166 <param name="require_inchi_is_true" value="TRUE"/> | |
167 <output name="output" file="filtering/require_inchi_out.msp" ftype="msp"/> | |
168 </test> | |
169 <test> | |
170 <param name="spectra" value="filtering/input.msp" ftype="msp"/> | |
171 <section name="reduce_to_top_n_peaks"> | |
172 <param name="is_true" value="TRUE"/> | |
173 <param name="n_max" value="5"/> | |
174 </section> | |
175 <output name="output" file="filtering/reduce_to_top_n_peaks.msp" ftype="msp"/> | |
176 </test> | |
138 </tests> | 177 </tests> |
139 | 178 |
140 <help> | 179 <help> |
141 @HELP_matchms@ | 180 @HELP_matchms@ |
142 </help> | 181 </help> |