Mercurial > repos > proteore > proteore_filter_keywords_values
comparison filter_kw_val.xml @ 2:52a7afd01c6d draft
planemo upload commit 9af2cf12c26c94e7206751ccf101a3368f92d0ba
author | proteore |
---|---|
date | Tue, 18 Dec 2018 09:25:11 -0500 |
parents | cb9555653b09 |
children | 68cee865018e |
comparison
equal
deleted
inserted
replaced
1:cb9555653b09 | 2:52a7afd01c6d |
---|---|
1 <tool id="MQoutputfilter" name="Filter by keywords or numerical value" version="2018.09.21"> | 1 <tool id="MQoutputfilter" name="Filter by keywords and/or numerical value" version="2018.12.18"> |
2 <description></description> | 2 <description></description> |
3 <requirements> | 3 <requirements> |
4 </requirements> | 4 </requirements> |
5 <stdio> | 5 <stdio> |
6 <exit_code range="1:" /> | 6 <exit_code range="1:" /> |
16 #for $key in $keyword | 16 #for $key in $keyword |
17 #if $key.k.kw != "None" | 17 #if $key.k.kw != "None" |
18 #if $key.k.kw == "text" | 18 #if $key.k.kw == "text" |
19 --kw "$key.k.txt" "$key.ncol" "$key.match" | 19 --kw "$key.k.txt" "$key.ncol" "$key.match" |
20 #else if $key.k.kw == "file" | 20 #else if $key.k.kw == "file" |
21 --kw_file "$key.k.file" "$key.ncol" "$key.match" | 21 --kw_file "$key.k.file" "$key.k.header" "$key.k.ncol" "$key.ncol" "$key.match" |
22 #end if | 22 #end if |
23 #end if | 23 #end if |
24 #end for | 24 #end for |
25 | 25 |
26 ## value to filter | 26 ## value to filter |
54 --sort_col "$sort_column,$reversed_sort" | 54 --sort_col "$sort_column,$reversed_sort" |
55 #end if | 55 #end if |
56 | 56 |
57 ]]></command> | 57 ]]></command> |
58 <inputs> | 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" /> | 59 <param type="data" name="input1" format="txt,tabular" label="Input file" /> |
60 <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 file contain header?" /> |
61 <param name="operator" type="select" label="Please select an operator to combine your filters (if more than one)" help="OR : only one filter must be satisfied to filter a row, AND : all your filters must be satisfied to filter a row" > | 61 <param name="operator" type="select" label="Select an operator to combine your filters (if more than one)" 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> | 62 <option value="OR" selected="True">OR</option> |
63 <option value="AND">AND</option> | 63 <option value="AND">AND</option> |
64 </param> | 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." /> | 65 |
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" > | 66 <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' /> | 67 <param name="ncol" type="text" value="c1" label="Column number on which 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' /> | 68 <param type="boolean" name="match" truevalue="True" label="Search for exact match?" help='Choosing "Yes" will only filter out exact match (e.g. case sensitive), see help section' /> |
70 <conditional name="k" > | 69 <conditional name="k" > |
71 <param argument="--kw" type="select" label="Filter by keyword" > | 70 <param name="kw" type="select" label="Enter keywords" > |
72 <option value="text" selected="true">Enter keywords (copy/paste)</option> | 71 <option value="text" selected="true">copy/paste</option> |
73 <option value="file">Choose a file containing keywords</option> | 72 <option value="file">File containing keywords</option> |
74 </param> | 73 </param> |
75 <when value="None" /> | |
76 <when value="text" > | 74 <when value="text" > |
77 <param name="txt" type="text" label="Copy/paste keywords to be filtered out" help='Keywords must be separated by ";", for example: A8K2U0;Q5TA79;O43175' > | 75 <param name="txt" type="text" label="Copy/paste keywords to be filtered out" help='Keywords must be separated by tab, space or carriage return into the form field, for example: A8K2U0 Q5TA79 O43175' > |
78 <sanitizer> | 76 <sanitizer> |
79 <valid initial="string.printable"> | 77 <valid initial="string.printable"> |
80 <remove value="'"/> | 78 <remove value="'"/> |
81 </valid> | 79 </valid> |
82 <mapping initial="none"> | 80 <mapping initial="none"> |
84 </mapping> | 82 </mapping> |
85 </sanitizer> | 83 </sanitizer> |
86 </param> | 84 </param> |
87 </when> | 85 </when> |
88 <when value="file" > | 86 <when value="file" > |
89 <param name="file" type="data" format="txt,tabular" label="Choose a file containing keywords" /> | 87 <param name="file" type="data" format="txt,tabular" label="File containing keywords" /> |
88 <param name="ncol" type="text" value="c1" label="Specify the column containing keywords" help='For example, fill in "c1" if keywords are in the first column' /> | |
89 <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does file contain header?" /> | |
90 </when> | 90 </when> |
91 </conditional> | 91 </conditional> |
92 </repeat> | 92 </repeat> |
93 <repeat name="value" title="Filter by value" > | 93 <repeat name="value" title="Filter by numerical value" > |
94 <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' /> | 94 <param name="ncol" type="text" value="c1" label="Column number on which 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 <conditional name="v" > | 95 <conditional name="v" > |
96 <param argument="--val" type="select" label="Filter by value" > | 96 <param argument="Numerical Value" type="select" label="Select operator" > |
97 <option value="None">---</option> | |
98 <option value="Equal">=</option> | 97 <option value="Equal">=</option> |
99 <option value="Higher">></option> | 98 <option value="Higher">></option> |
100 <option value="Equal or higher">>=</option> | 99 <option value="Equal or higher">>=</option> |
101 <option value="Lower"><</option> | 100 <option value="Lower"><</option> |
102 <option value="Equal or lower"><=</option> | 101 <option value="Equal or lower"><=</option> |
103 <option value="Different">!=</option> | 102 <option value="Different">!=</option> |
104 </param> | 103 </param> |
105 <when value="None" > | |
106 </when> | |
107 <when value="Equal" > | 104 <when value="Equal" > |
108 <param name="equal" type="float" value="" label="Value" /> | 105 <param name="equal" type="float" value="" label="Value" /> |
109 </when> | 106 </when> |
110 <when value="Higher" > | 107 <when value="Higher" > |
111 <param type="float" name="higher" value="" label="Value" /> | 108 <param type="float" name="higher" value="" label="Value" /> |
122 <when value="Different"> | 119 <when value="Different"> |
123 <param type="float" name="different" value="" label="Value"/> | 120 <param type="float" name="different" value="" label="Value"/> |
124 </when> | 121 </when> |
125 </conditional> | 122 </conditional> |
126 </repeat> | 123 </repeat> |
127 <repeat name="values_range" title="Filter by range of values"> | 124 <repeat name="values_range" title="Filter by range of numerical values"> |
128 <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' /> | 125 <param name="ncol" type="text" value="c1" label="Column number on which to apply the filter" help='For example, fill in "c1" if the keywords you want to filter out are listed in the first column' /> |
129 <param name="bottom_value" type="float" value="" label="Please enter the bottom value" /> | 126 <param name="bottom_value" type="float" value="" label="Enter the bottom value" /> |
130 <param name="top_value" type="float" value="" label="Please enter the top value" /> | 127 <param name="top_value" type="float" value="" label="Enter the top value" /> |
131 <param name="inclusive" type="boolean" label="inclusive range ?" checked="false" truevalue="true" falsevalue="false" /> | 128 <param name="inclusive" type="boolean" label="inclusive range ?" checked="false" truevalue="true" falsevalue="false" /> |
132 </repeat> | 129 </repeat> |
133 </inputs> | 130 <param name="sort_column" type="text" value="" label="Sort result files by:" help="Fill in 'c1' if you want to sort your result file by the column 1 values" /> |
131 <param name="reversed_sort" type="boolean" checked="false" truevalue="true" falsevalue="false" label="Sort in descending order ?"/> | |
132 </inputs> | |
134 <outputs> | 133 <outputs> |
135 <data name="output1" format="tabular" label="${tool.name} on ${input1.name}" /> | 134 <data name="output1" format="tsv" label="${tool.name} on ${input1.name}" /> |
136 <data name="filtered_file" format="tabular" label="${tool.name} on ${input1.name} - Filtered lines" /> | 135 <data name="filtered_file" format="tsv" label="${tool.name} on ${input1.name} - Filtered lines" /> |
137 </outputs> | 136 </outputs> |
138 <tests> | 137 <tests> |
139 <test> | 138 <test> |
140 <param name="input1" value="Lacombe_et_al_2017_OK.txt" /> | 139 <param name="input1" value="Lacombe_et_al_2017_OK.txt" /> |
141 <param name="header" value="true" /> | 140 <param name="header" value="true" /> |
145 <repeat name="keyword"> | 144 <repeat name="keyword"> |
146 <param name="ncol" value="c1" /> | 145 <param name="ncol" value="c1" /> |
147 <param name="match" value="True" /> | 146 <param name="match" value="True" /> |
148 <conditional name="k"> | 147 <conditional name="k"> |
149 <param name="kw" value="text" /> | 148 <param name="kw" value="text" /> |
150 <param name="txt" value="P04264;P35908;P13645;Q5D862;Q5T749;Q8IW75;P81605;P22531;P59666;P78386" /> | 149 <param name="txt" value="P04264 P35908 P13645 Q5D862 Q5T749 Q8IW75 P81605 P22531 P59666 P78386" /> |
151 </conditional> | 150 </conditional> |
152 </repeat> | 151 </repeat> |
153 <repeat name="value"> | 152 <repeat name="value"> |
154 <param name="ncol" value="c3"/> | 153 <param name="ncol" value="c3"/> |
155 <conditional name="v"> | 154 <conditional name="v"> |
160 <output name="output1" file="output.csv" /> | 159 <output name="output1" file="output.csv" /> |
161 <output name="filtered_file" file="filtered_output.csv" /> | 160 <output name="filtered_file" file="filtered_output.csv" /> |
162 </test> | 161 </test> |
163 </tests> | 162 </tests> |
164 <help><![CDATA[ | 163 <help><![CDATA[ |
165 This tool allows to remove unneeded data (e.g. contaminants, non-significant values) from a proteomics results file (e.g. MaxQuant or Proline output). | 164 **Description** |
165 | |
166 This tool allows to filter out data according to different criteria such as keywords (e.g. a list of contaminants) or numerical values (e.g. intensity measurements below a given threshold). | |
167 A boolean operator "OR/AND" allows to combine different type of filters making this tool very powerful. | |
168 | |
169 ----- | |
170 | |
171 **Input** | |
172 | |
173 A table (file in txt, tab, tsv, csv format) of your identification and/or quantification results for example. | |
174 | |
175 ----- | |
176 | |
177 **Parameters** | |
178 | |
179 **AND/OR operator** | |
180 | |
181 As many filters as needed can be combined, you can choose how filters apply on your data by using the following boolean operators: | |
182 | |
183 - OR: only one filter must be satisfied to remove one row | |
184 - AND: all filters must be satisfied to remove one row | |
185 | |
186 ----- | |
166 | 187 |
167 **Filter by keyword(s)** | 188 **Filter by keyword(s)** |
168 | 189 |
169 Several options can be used. For each option, you can fill in the field or upload a file which contains the keywords. | 190 Click on the "Filter by keywords" box to use it. You can either fill in the field (copy/paste) or upload a file which contains the keywords. |
170 | 191 |
171 - If you choose to fill in the field, the keywords should be separated by ";", for example: A8K2U0;Q5TA79;O43175 | 192 "Column number on which to apply the filter": You must then specify the column number of your input file on wich to apply the filter by keywords. |
193 | |
194 - If you choose to fill in the field, the keywords should be separated by tab, space or carriage return into the form field, for example: A8K2U0 Q5TA79 O43175 | |
172 | 195 |
173 - If you choose to upload a file in a text format in which each line is a keyword, for example: | 196 - If you choose to upload a file in a text format in which each line is a keyword, for example: |
174 | 197 |
175 REV | |
176 | |
177 TRYP_PIG | 198 TRYP_PIG |
178 | 199 |
179 ALDOA_RABBIT | 200 ALDOA_RABBIT |
180 | 201 |
181 **The line that contains these keywords will be eliminated from input file.** | 202 LYSO_ECOLI |
182 | 203 |
183 **Keywords search can be applied by performing either exact match or partial one by using the following option** | 204 Lines that contains these keywords will be removed from input file. |
205 | |
206 "Search for exact match?": Keywords search can be applied by performing either exact match or partial one by using the following option: | |
184 | 207 |
185 - If you choose **Yes**, only the fields that contains exactly the same content will be removed. | 208 - If you choose **Yes**, only the fields that contains exactly the same content will be removed. |
186 | 209 |
187 - If you choose **No**, all the fields containing the keyword will be removed. | 210 - If you choose **No**, all the fields containing the keyword will be removed. |
188 | 211 |
189 For example: | 212 Example: |
190 | 213 |
191 **Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly "kinase" is removed. | 214 **Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly the word "kinase" will be removed. |
192 | 215 |
193 **No** option (partial match) for "kinase": not only lines which contain "kinase" but also lines with "alpha-kinase" (and so on) are removed. | 216 **No** option (partial match) for "kinase": lines which contain "kinase" and lines with "alpha-kinase" (and so on) will be removed. |
194 | 217 |
195 ----- | 218 ----- |
196 | 219 |
197 **Filter by values** | 220 **Filter by numerical values**: You can filter your data by a column of numerical values. |
198 | 221 |
199 You can filter your data by a column of numerical values. | 222 "Column number on which to apply the filter": you must specify the column number of your input file on wich to apply the filter by numerical value. |
200 Enter the column to be use and select one operator in the list : | 223 |
201 | 224 Then select one of the operators in the list : |
202 - = | 225 |
203 - != | 226 - = (equal) |
204 - < | 227 - != (not equal) |
205 - <= | 228 - < (lower than) |
206 - > | 229 - <= (lower than or equal to) |
207 - >= | 230 - > (greater than) |
208 | 231 - >= (greater than or equal to) |
209 Then enter the value to filter and specify the column to apply that option. | 232 |
210 If a row contains a value that correspond to your settings, it will be filtered. | 233 Then enter the numerical threshold to apply by filling the "Value" box. |
211 | 234 If you choose > 10, each row containing a numerical value (in the chosen column of your input file) that correspond to your settings will be filtered out. |
212 ----- | 235 |
213 | 236 ----- |
214 **Filter by a range of values** | 237 |
215 | 238 **Filter by a range of values**: You can also set a range of values to filter your file. |
216 You can also set a range of values to filter your file. | 239 Conversely to the numeric filter, rows with numerical values within the defined range will be kept while rows with values out of this range will be filtered out. |
217 In opposition to value filter, rows with values inside of the defined range are kept. | 240 |
218 | 241 ----- |
219 Rows with values outside of the defined range will be filtered. | 242 |
220 | 243 **Sort results files** |
221 ----- | 244 |
222 | 245 You can sort your results by column in ascending (default value) or descending by entering the column number on which to sort the data. |
223 **AND/OR operator** | |
224 | |
225 Since you can add as many filters as you want, you can choose how filters apply on your data. | |
226 | |
227 AND or OR operator option works on all filters : | |
228 | |
229 - OR : only one filter to be satisfied to remove one row | |
230 - AND : all filters must be satisfied to remove one row | |
231 | |
232 ----- | |
233 | |
234 **Sort the results files** | |
235 | |
236 You can sort the result file if you wish, it can help you to check results. | |
237 | |
238 In order to do so : enter the column to be used, all columns will be sorted according to the one filled in. | |
239 | |
240 Rows stay intact, just in different order like excel. | |
241 You can also choose ascending or descending order, by default ascending order is set. | |
242 | 246 |
243 ----- | 247 ----- |
244 | 248 |
245 **Output** | 249 **Output** |
246 | 250 |
247 The tool will produce 2 output files. | 251 The tool returns two output files. |
248 | 252 |
249 * A text file containing the resulting filtered input file. | 253 * A text file containing the results that pass your filters |
250 | 254 |
251 * A text file containing the rows removed from the input file. | 255 * A text file containing the rows removed from the input file (i.e. containing data taht do not pass your filter(s). |
252 | 256 |
253 ----- | 257 ----- |
254 | 258 |
255 .. class:: infomark | 259 .. class:: infomark |
256 | 260 |