Mercurial > repos > proteore > proteore_filter_keywords_values
comparison filter_kw_val.xml @ 0:a55e8b137c6b draft
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
author | proteore |
---|---|
date | Wed, 19 Sep 2018 05:01:15 -0400 |
parents | |
children | cb9555653b09 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a55e8b137c6b |
---|---|
1 <tool id="MQoutputfilter" name="Filter by keywords or numerical value" version="2018.08.22"> | |
2 <description></description> | |
3 <requirements> | |
4 </requirements> | |
5 <stdio> | |
6 <exit_code range="1:" /> | |
7 </stdio> | |
8 <command><![CDATA[ | |
9 python $__tool_directory__/filter_kw_val.py | |
10 -i "$input1,$header" | |
11 -o "$output1" | |
12 --filtered_file "$filtered_file" | |
13 --operator "$operator" | |
14 | |
15 ## Keywords | |
16 #for $key in $keyword | |
17 #if $key.k.kw != "None" | |
18 #if $key.k.kw == "text" | |
19 --kw "$key.k.txt" "$key.ncol" "$key.match" | |
20 #else if $key.k.kw == "file" | |
21 --kw_file "$key.k.file" "$key.ncol" "$key.match" | |
22 #end if | |
23 #end if | |
24 #end for | |
25 | |
26 ## value to filter | |
27 #for $val in $value | |
28 #if $val.v.val != "None" | |
29 --value | |
30 #if $val.v.val == "Equal" | |
31 $val.v.equal "$val.ncol" "=" | |
32 #else if $val.v.val == "Higher" | |
33 $val.v.higher "$val.ncol" ">" | |
34 #else if $val.v.val == "Equal or higher" | |
35 $val.v.equal_higher "$val.ncol" ">=" | |
36 #else if $val.v.val == "Lower" | |
37 $val.v.lower "$val.ncol" "<" | |
38 #else if $val.v.val == "Equal or lower" | |
39 $val.v.equal_lower "$val.ncol" "<=" | |
40 #else | |
41 $val.v.different "$val.ncol" "!=" | |
42 #end if | |
43 #end if | |
44 #end for | |
45 | |
46 ##range of values to keep | |
47 #for $vr in $values_range | |
48 #if vr | |
49 --values_range $vr.bottom_value $vr.top_value $vr.ncol $vr.inclusive | |
50 #end if | |
51 #end for | |
52 | |
53 #if $sort_column != "" | |
54 --sort_col "$sort_column,$reversed_sort" | |
55 #end if | |
56 | |
57 ]]></command> | |
58 <inputs> | |
59 <param type="data" name="input1" format="txt,tabular" label="Input file" help="Input file is a tab-delimited file containing proteomics identification and/or quantitative results" /> | |
60 <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does your input file contain header?" /> | |
61 <param name="operator" type="select" label="Please select an operator for your filters" help="OR : only one filter must be satisfied to filter a row, AND : all your filters must be satisfied to filter a row" > | |
62 <option value="OR" selected="True">OR</option> | |
63 <option value="AND">AND</option> | |
64 </param> | |
65 <param name="sort_column" type="text" value="" label="If you want to sort the result files by values from a column, please enter a column number" help="For example : fill in 'c1' if you want to sort your result file by the column 1 values." /> | |
66 <param name="reversed_sort" type="boolean" checked="false" truevalue="true" falsevalue="false" label="Sort in descending order ?"/> | |
67 <repeat name="keyword" title="Filter by keywords" > | |
68 <param name="ncol" type="text" value="c1" label="Please specify the column number of the input file on which you want to apply the filter" help='For example, fill in "c1" if the keywords you want to filter out are listed in the first column' /> | |
69 <param type="boolean" name="match" truevalue="True" label="Would you like to search for exact match?" help='Choosing "Yes" will only filter out exact match (i.e. case sensitive), see below for more details' /> | |
70 <conditional name="k" > | |
71 <param argument="--kw" type="select" label="Filter by keyword" > | |
72 <option value="None" selected="True">---</option> | |
73 <option value="text">Enter keywords (copy/paste)</option> | |
74 <option value="file">Choose a file containing keywords</option> | |
75 </param> | |
76 <when value="None" /> | |
77 <when value="text" > | |
78 <param name="txt" type="text" label="Copy/paste keywords to be filtered out" help='Keywords should be separated by ";", for example: A8K2U0;Q5TA79;O43175' > | |
79 <sanitizer> | |
80 <valid initial="string.printable"> | |
81 <remove value="'"/> | |
82 </valid> | |
83 <mapping initial="none"> | |
84 <add source="'" target="__sq__"/> | |
85 </mapping> | |
86 </sanitizer> | |
87 </param> | |
88 </when> | |
89 <when value="file" > | |
90 <param name="file" type="data" format="txt,tabular" label="Choose a file containing keywords" /> | |
91 </when> | |
92 </conditional> | |
93 </repeat> | |
94 <repeat name="value" title="Filter by value" > | |
95 <param name="ncol" type="text" value="c1" label="Please specify the column number of the input file on which you want to apply the filter" help='For example, fill in "c1" if the keywords you want to filter out are listed in the first column' /> | |
96 <conditional name="v" > | |
97 <param argument="--val" type="select" label="Filter by value" > | |
98 <option value="None">---</option> | |
99 <option value="Equal">=</option> | |
100 <option value="Higher">></option> | |
101 <option value="Equal or higher">>=</option> | |
102 <option value="Lower"><</option> | |
103 <option value="Equal or lower"><=</option> | |
104 <option value="Different">!=</option> | |
105 </param> | |
106 <when value="None" > | |
107 </when> | |
108 <when value="Equal" > | |
109 <param name="equal" type="float" value="" label="Value" /> | |
110 </when> | |
111 <when value="Higher" > | |
112 <param type="float" name="higher" value="" label="Value" /> | |
113 </when> | |
114 <when value="Equal or higher" > | |
115 <param type="float" name="equal_higher" value="" label="Value" /> | |
116 </when> | |
117 <when value="Lower" > | |
118 <param type="float" name="lower" value="" label="Value" /> | |
119 </when> | |
120 <when value="Equal or lower" > | |
121 <param type="float" name="equal_lower" value="" label="Value" /> | |
122 </when> | |
123 <when value="Different"> | |
124 <param type="float" name="different" value="" label="Value"/> | |
125 </when> | |
126 </conditional> | |
127 </repeat> | |
128 <repeat name="values_range" title="Filter by range of values"> | |
129 <param name="ncol" type="text" value="c1" label="Please specify the column number of the input file on which you want to apply the filter" help='For example, fill in "c1" if the keywords you want to filter out are listed in the first column' /> | |
130 <param name="bottom_value" type="float" value="" label="Please enter the bottom value" /> | |
131 <param name="top_value" type="float" value="" label="Please enter the top value" /> | |
132 <param name="inclusive" type="boolean" label="inclusive range ?" checked="false" truevalue="true" falsevalue="false" /> | |
133 </repeat> | |
134 </inputs> | |
135 <outputs> | |
136 <data name="output1" format="tabular" label="${tool.name} on ${input1.name}" /> | |
137 <data name="filtered_file" format="tabular" label="${tool.name} on ${input1.name} - Filtered lines" /> | |
138 </outputs> | |
139 <tests> | |
140 <test> | |
141 <param name="input1" value="Lacombe_et_al_2017_OK.txt" /> | |
142 <param name="header" value="true" /> | |
143 <param name="operator" value="OR"/> | |
144 <param name="sort_column" value="c1"/> | |
145 <param name="reversed_sort" value="false"/> | |
146 <repeat name="keyword"> | |
147 <param name="ncol" value="c1" /> | |
148 <param name="match" value="True" /> | |
149 <conditional name="k"> | |
150 <param name="kw" value="text" /> | |
151 <param name="txt" value="P04264;P35908;P13645;Q5D862;Q5T749;Q8IW75;P81605;P22531;P59666;P78386" /> | |
152 </conditional> | |
153 </repeat> | |
154 <repeat name="value"> | |
155 <param name="ncol" value="c3"/> | |
156 <conditional name="v"> | |
157 <param name="val" value="Higher"/> | |
158 <param name="higher" value="20" /> | |
159 </conditional> | |
160 </repeat> | |
161 <output name="output1" file="output.csv" /> | |
162 <output name="filtered_file" file="filtered_output.csv" /> | |
163 </test> | |
164 </tests> | |
165 <help><![CDATA[ | |
166 This tool allows to remove unneeded data (e.g. contaminants, non-significant values) from a proteomics results file (e.g. MaxQuant or Proline output). | |
167 | |
168 **Filter by keyword(s)** | |
169 | |
170 Several options can be used. For each option, you can fill in the field or upload a file which contains the keywords. | |
171 | |
172 - If you choose to fill in the field, the keywords should be separated by ";", for example: A8K2U0;Q5TA79;O43175 | |
173 | |
174 - If you choose to upload a file in a text format in which each line is a keyword, for example: | |
175 | |
176 REV | |
177 | |
178 TRYP_PIG | |
179 | |
180 ALDOA_RABBIT | |
181 | |
182 **The line that contains these keywords will be eliminated from input file.** | |
183 | |
184 **Keywords search can be applied by performing either exact match or partial one by using the following option** | |
185 | |
186 - If you choose **Yes**, only the fields that contains exactly the same content will be removed. | |
187 | |
188 - If you choose **No**, all the fields containing the keyword will be removed. | |
189 | |
190 For example: | |
191 | |
192 **Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly "kinase" is removed. | |
193 | |
194 **No** option (partial match) for "kinase": not only lines which contain "kinase" but also lines with "alpha-kinase" (and so on) are removed. | |
195 | |
196 ----- | |
197 | |
198 **Filter by values** | |
199 | |
200 You can filter your data by a column of numerical values. | |
201 Enter the column to be use and select one operator in the list : | |
202 | |
203 - = | |
204 - != | |
205 - < | |
206 - <= | |
207 - > | |
208 - >= | |
209 | |
210 Then enter the value to filter and specify the column to apply that option. | |
211 If a row contains a value that correspond to your settings, it will be filtered. | |
212 | |
213 ----- | |
214 | |
215 **Filter by a range of values** | |
216 | |
217 You can also set a range of values to filter your file. | |
218 In opposition to value filter, rows with values inside of the defined range are kept. | |
219 | |
220 Rows with values outside of the defined range will be filtered. | |
221 | |
222 ----- | |
223 | |
224 **AND/OR operator** | |
225 | |
226 Since you can add as many filters as you want, you can choose how filters apply on your data. | |
227 | |
228 AND or OR operator option works on all filters : | |
229 | |
230 - OR : only one filter to be satisfied to remove one row | |
231 - AND : all filters must be satisfied to remove one row | |
232 | |
233 ----- | |
234 | |
235 **Sort the results files** | |
236 | |
237 You can sort the result file if you wish, it can help you to check results. | |
238 | |
239 In order to do so : enter the column to be used, all columns will be sorted according to the one filled in. | |
240 | |
241 Rows stay intact, just in different order like excel. | |
242 You can also choose ascending or descending order, by default ascending order is set. | |
243 | |
244 ----- | |
245 | |
246 **Output** | |
247 | |
248 The tool will produce 2 output files. | |
249 | |
250 * A text file containing the resulting filtered input file. | |
251 | |
252 * A text file containing the rows removed from the input file. | |
253 | |
254 ----- | |
255 | |
256 .. class:: infomark | |
257 | |
258 **Authors** | |
259 | |
260 T.P. Lien Nguyen, David Christiany, Florence Combes, Yves Vandenbrouck - CEA, INSERM, CNRS, Grenoble-Alpes University, BIG Institute, FR | |
261 | |
262 Sandra Dérozier, Olivier Rué, Christophe Caron, Valentin Loux - INRA, Paris-Saclay University, MAIAGE Unit, Migale Bioinformatics platform, FR | |
263 | |
264 This work has been partially funded through the French National Agency for Research (ANR) IFB project. | |
265 | |
266 Contact support@proteore.org for any questions or concerns about the Galaxy implementation of this tool. | |
267 | |
268 ]]></help> | |
269 <citations> | |
270 </citations> | |
271 </tool> |