comparison filter_kw_val.xml @ 7:6f32c1e12572 draft default tip

planemo upload commit 72b345a7df2c87f07a9df71ecee1f252c9355337
author proteore
date Fri, 01 Jun 2018 11:10:47 -0400
parents 1e9911190142
children
comparison
equal deleted inserted replaced
6:c6ba1e6f6869 7:6f32c1e12572
7 </stdio> 7 </stdio>
8 <command><![CDATA[ 8 <command><![CDATA[
9 python $__tool_directory__/filter_kw_val.py 9 python $__tool_directory__/filter_kw_val.py
10 -i "$input1,$header" 10 -i "$input1,$header"
11 -o "$output1" 11 -o "$output1"
12 --trash_file "$trash_file" 12 --filtered_file "$filtered_file"
13 --operator "$operator"
13 14
14 ## Keywords 15 ## Keywords
15 #for $i, $key in enumerate($keyword) 16 #for $key in $keyword
16 #if $key.k.kw != "None" 17 #if $key.k.kw != "None"
17 #if $key.k.kw == "text" 18 #if $key.k.kw == "text"
18 --kw "$key.k.txt" "$key.ncol" "$key.match" 19 --kw "$key.k.txt" "$key.ncol" "$key.match"
19 #else if $key.k.kw == "file" 20 #else if $key.k.kw == "file"
20 --kw_file "$key.k.file" "$key.ncol" "$key.match" 21 --kw_file "$key.k.file" "$key.ncol" "$key.match"
21 #end if 22 #end if
22 #end if 23 #end if
23 #end for 24 #end for
24 25
25 ## Number of proteins 26 ## value to filter
26 #for $i, $val in enumerate($value) 27 #for $val in $value
27 #if $val.v.val != "None" 28 #if $val.v.val != "None"
28 --value 29 --value
29 #if $val.v.val == "Equal" 30 #if $val.v.val == "Equal"
30 $val.v.equal "$val.ncol" "=" 31 $val.v.equal "$val.ncol" "="
31 #else if $val.v.val == "Higher" 32 #else if $val.v.val == "Higher"
32 $val.v.higher "$val.ncol" ">" 33 $val.v.higher "$val.ncol" ">"
33 #else if $val.v.val == "Equal or higher" 34 #else if $val.v.val == "Equal or higher"
34 $val.v.equal_higher "$val.ncol" ">=" 35 $val.v.equal_higher "$val.ncol" ">="
35 #else if $val.v.val == "Lower" 36 #else if $val.v.val == "Lower"
36 $val.v.lower "$val.ncol" "<" 37 $val.v.lower "$val.ncol" "<"
37 #else 38 #else if $val.v.val == "Equal or lower"
38 $val.v.equal_lower "$val.ncol" "<=" 39 $val.v.equal_lower "$val.ncol" "<="
40 #else
41 $val.v.different "$val.ncol" "!="
39 #end if 42 #end if
40 #end if 43 #end if
41 #end for 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
42 56
43 ]]></command> 57 ]]></command>
44 <inputs> 58 <inputs>
45 <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" /> 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" />
46 <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does your input file contain header?" /> 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 your 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 ?"/>
47 <repeat name="keyword" title="Filter by keywords" > 67 <repeat name="keyword" title="Filter by keywords" >
48 <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' /> 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' />
49 <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' /> 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' />
50 <conditional name="k" > 70 <conditional name="k" >
51 <param argument="--kw" type="select" label="Filter by keyword" > 71 <param argument="--kw" type="select" label="Filter by keyword" >
69 <when value="file" > 89 <when value="file" >
70 <param name="file" type="data" format="txt,tabular" label="Choose a file containing keywords" /> 90 <param name="file" type="data" format="txt,tabular" label="Choose a file containing keywords" />
71 </when> 91 </when>
72 </conditional> 92 </conditional>
73 </repeat> 93 </repeat>
74
75 <repeat name="value" title="Filter by value" > 94 <repeat name="value" title="Filter by value" >
76 <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' /> 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' />
77 <conditional name="v" > 96 <conditional name="v" >
78 <param argument="--val" type="select" label="Filter by value" > 97 <param argument="--val" type="select" label="Filter by value" >
79 <option value="None">---</option> 98 <option value="None">---</option>
80 <option value="Equal">=</option> 99 <option value="Equal">=</option>
81 <option value="Higher">&gt;</option> 100 <option value="Higher">&gt;</option>
82 <option value="Equal or higher">&gt;=</option> 101 <option value="Equal or higher">&gt;=</option>
83 <option value="Lower">&lt;</option> 102 <option value="Lower">&lt;</option>
84 <option value="Equal or lower">&lt;=</option> 103 <option value="Equal or lower">&lt;=</option>
104 <option value="Different">!=</option>
85 </param> 105 </param>
86 <when value="None" > 106 <when value="None" >
87 </when> 107 </when>
88 <when value="Equal" > 108 <when value="Equal" >
89 <param name="equal" type="float" value="" label="Value" /> 109 <param name="equal" type="float" value="" label="Value" />
98 <param type="float" name="lower" value="" label="Value" /> 118 <param type="float" name="lower" value="" label="Value" />
99 </when> 119 </when>
100 <when value="Equal or lower" > 120 <when value="Equal or lower" >
101 <param type="float" name="equal_lower" value="" label="Value" /> 121 <param type="float" name="equal_lower" value="" label="Value" />
102 </when> 122 </when>
123 <when value="Different">
124 <param type="float" name="different" value="" label="Value"/>
125 </when>
103 </conditional> 126 </conditional>
104 </repeat> 127 </repeat>
105 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>
106 </inputs> 134 </inputs>
107 <outputs> 135 <outputs>
108 <data name="output1" format="tabular" label="${tool.name} on ${input1.name}" /> 136 <data name="output1" format="tabular" label="${tool.name} on ${input1.name}" />
109 <data name="trash_file" format="tabular" label="${tool.name} on ${input1.name} - Filtered lines" /> 137 <data name="filtered_file" format="tabular" label="${tool.name} on ${input1.name} - Filtered lines" />
110 </outputs> 138 </outputs>
111 <tests> 139 <tests>
112 <test> 140 <test>
113 <param name="input1" value="Lacombe_et_al_2017_OK.txt" /> 141 <param name="input1" value="Lacombe_et_al_2017_OK.txt" />
114 <param name="header" value="true" /> 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"/>
115 <repeat name="keyword"> 146 <repeat name="keyword">
116 <param name="ncol" value="c1" /> 147 <param name="ncol" value="c1" />
117 <param name="match" value="True" /> 148 <param name="match" value="True" />
118 <conditional name="k"> 149 <conditional name="k">
119 <param name="kw" value="text" /> 150 <param name="kw" value="text" />
120 <param name="txt" value="P04264;P35908;P13645;Q5D862;Q5T749;Q8IW75;P81605;P22531;P59666;P78386" /> 151 <param name="txt" value="P04264;P35908;P13645;Q5D862;Q5T749;Q8IW75;P81605;P22531;P59666;P78386" />
121 </conditional> 152 </conditional>
122 </repeat> 153 </repeat>
123 <output name="output1" file="FKW_Lacombe_et_al_2017_OK.txt" /> 154 <repeat name="value">
124 <output name="trash_file" file="Trash_FKW_Lacombe_et_al_2017_OK.txt" /> 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" />
125 </test> 163 </test>
126 </tests> 164 </tests>
127 <help><![CDATA[ 165 <help><![CDATA[
128 This tool allows to filter out data according to your specific needs (e.g. contaminants, non-significant values or related to a particular annotation) from a proteomics results file (e.g. MaxQuant or Proline output). 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).
129 167
130 **For each row, if there are more than one protein IDs/protein names/gene names, only the first one will be considered in the output** 168 **Filter by keyword(s)**
131
132 **Filter the file by keywords**
133 169
134 Several options can be used. For each option, you can fill in the field or upload a file which contains the keywords. 170 Several options can be used. For each option, you can fill in the field or upload a file which contains the keywords.
135 171
136 - If you choose to fill in the field, the keywords should be separated by ";", for example: A8K2U0;Q5TA79;O43175 172 - If you choose to fill in the field, the keywords should be separated by ";", for example: A8K2U0;Q5TA79;O43175
137 173
141 177
142 TRYP_PIG 178 TRYP_PIG
143 179
144 ALDOA_RABBIT 180 ALDOA_RABBIT
145 181
146 **The line that contains these keywords will be filtered from input file and provided in a separate file.** 182 **The line that contains these keywords will be eliminated from input file.**
147 183
148 **Keywords search can be applied by performing either exact match or partial one by using the following option** 184 **Keywords search can be applied by performing either exact match or partial one by using the following option**
149 185
150 - If you choose **Yes**, only the fields that contains exactly the same content will be filtered. 186 - If you choose **Yes**, only the fields that contains exactly the same content will be removed.
151 187
152 - If you choose **No**, all the fields containing the keyword will be filtered. 188 - If you choose **No**, all the fields containing the keyword will be removed.
153 189
154 For example: 190 For example:
155 191
156 **Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly "kinase" is filtered (and not "Kinase"). 192 **Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly "kinase" is removed.
157 193
158 **No** option (partial match) for "kinase": not only lines which contain "kinase" but also lines with "alpha-kinase" (and so on) are removed. 194 **No** option (partial match) for "kinase": not only lines which contain "kinase" but also lines with "alpha-kinase" (and so on) are removed.
159 195
160 **Filter the file by values** 196 -----
161 197
162 You can choose to use one or more options (e.g. to filter out peptides of low intensity value, by q-value, etc.). 198 **Filter by values**
163 199
164 * For each option, you can choose between "=", ">", ">=", "<" and "<=", then enter the value to filter and specify the column to apply that option. 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 descending order is set.
243
244 -----
165 245
166 **Output** 246 **Output**
167 247
168 The tool will produce 2 output files. 248 The tool will produce 2 output files.
169 249
170 * A text file containing the resulting filtered input file. 250 * A text file containing the resulting filtered input file.
171 251
172 * A text file containing the rows that have been filtered from the input file. 252 * A text file containing the rows removed from the input file.
173 253
174 ----- 254 -----
175 255
176 .. class:: infomark 256 .. class:: infomark
177 257
178 **Authors** 258 **Authors**
179 259
180 T.P. Lien Nguyen, Florence Combes, Yves Vandenbrouck - CEA, INSERM, CNRS, Grenoble-Alpes University, BIG Institute, FR 260 T.P. Lien Nguyen, David Christiany, Florence Combes, Yves Vandenbrouck - CEA, INSERM, CNRS, Grenoble-Alpes University, BIG Institute, FR
181 261
182 Sandra Dérozier, Olivier Rué, Christophe Caron, Valentin Loux - INRA, Paris-Saclay University, MAIAGE Unit, Migale Bioinformatics platform, FR 262 Sandra Dérozier, Olivier Rué, Christophe Caron, Valentin Loux - INRA, Paris-Saclay University, MAIAGE Unit, Migale Bioinformatics platform, FR
183 263
184 This work has been partially funded through the French National Agency for Research (ANR) IFB project. 264 This work has been partially funded through the French National Agency for Research (ANR) IFB project.
185 265