comparison filter_kw_val.xml @ 0:6a45ccfc0e4c draft

planemo upload commit abb24d36c776520e73220d11386252d848173697-dirty
author proteore
date Sun, 26 Nov 2017 18:36:43 -0500
parents
children d29e469b6b20
comparison
equal deleted inserted replaced
-1:000000000000 0:6a45ccfc0e4c
1 <tool id="MQoutputfilter" name="Filter out keywords and/or numerical values" version="0.1.0">
2 <description>Filter a file by keywords or values</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 --trash_file "$trash_file"
13
14 ## Keywords
15 #for $i, $key in enumerate($keyword)
16 #if $key.k.kw != "None"
17 #if $key.k.kw == "text"
18 --kw "$key.k.txt" "$key.k.ncol" "$key.match"
19 #else if $key.k.kw == "file"
20 --kw_file "$key.k.file" "$key.k.ncol" "$key.match"
21 #end if
22 #end if
23 #end for
24
25 ## Number of proteins
26 #for $i, $val in enumerate($value)
27 #if $val.v.val != "None"
28 --value
29 #if $val.v.val == "Equal"
30 $val.v.equal "$value.ncol" "="
31 #else if $val.v.val == "Higher"
32 $val.v.higher "$val.v.ncol" ">"
33 #else if $val.v.val == "Equal or higher"
34 $val.v.equal_higher "$val.v.ncol" ">="
35 #else if $val.v.val == "Lower"
36 $val.v.lower "$val.v.ncol" "<"
37 #else
38 $val.v.equal_lower "$val.v.ncol" "<="
39 #end if
40 #end if
41 #end for
42
43 ]]></command>
44 <inputs>
45 <param type="data" name="input1" format="txt,tabular" label="Input file" help="Input file is a tab-delimited file containing proteomics results (e.g. output file from MaxQuant or Proline softwares" />
46 <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does your input file contain header?" />
47 <repeat name="keyword" title="Filter by keywords" >
48 <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 detail' />
49 <conditional name="k" >
50 <param argument="--kw" type="select" label="Filter by keyword" >
51 <option value="None" selected="True">---</option>
52 <option value="text">Enter keywords</option>
53 <option value="file">Choose a file containing keywords</option>
54 </param>
55 <when value="None" />
56 <when value="text" >
57 <param name="txt" type="text" label="Enter keywords or a file containing keywords to be removed" >
58 <sanitizer>
59 <valid initial="string.printable">
60 <remove value="&apos;"/>
61 </valid>
62 <mapping initial="none">
63 <add source="&apos;" target="__sq__"/>
64 </mapping>
65 </sanitizer>
66 </param>
67 <param name="ncol" type="text" value="c1" label="Please specify the column where you would like to apply this filter" help='For example, fill in "c1" if you want to filter the first column' />
68 </when>
69 <when value="file" >
70 <param name="file" type="data" format="txt,tabular" label="Choose a file containing keywords" />
71 <param name="ncol" type="text" value="c1" label="Please specify the column on which to apply this filter" help='For example, fill in "c1" if the keyword you want to filter out is expected in the first column' />
72 </when>
73 </conditional>
74 </repeat>
75
76 <repeat name="value" title="Filter by value" >
77 <conditional name="v" >
78 <param argument="--val" type="select" label="Filter by value" >
79 <option value="None">---</option>
80 <option value="Equal">=</option>
81 <option value="Higher">&gt;</option>
82 <option value="Equal or higher">&gt;=</option>
83 <option value="Lower">&lt;</option>
84 <option value="Equal or lower">&lt;=</option>
85 </param>
86 <when value="None" >
87 </when>
88 <when value="Equal" >
89 <param name="equal" type="float" value="" label="Value" />
90 <param name="ncol" type="text" value="c1" label="Please specify the column where you would like to apply this filter" help='For example, fill in "c1" if you want to filter the first column' />
91 </when>
92 <when value="Higher" >
93 <param type="float" name="higher" value="" label="Value" />
94 <param name="ncol" type="text" value="c1" label="Please specify the column where you would like to apply this filter" help='For example, fill in "c1" if you want to filter the first column' />
95 </when>
96 <when value="Equal or higher" >
97 <param type="float" name="equal_higher" value="" label="Value" />
98 <param name="ncol" type="text" value="c1" label="Please specify the column where you would like to apply this filter" help='For example, fill in "c1" if you want to filter the first column' />
99 </when>
100 <when value="Lower" >
101 <param type="float" name="lower" value="" label="Value" />
102 <param name="ncol" type="text" value="c1" label="Please specify the column where you would like to apply this filter" help='For example, fill in "c1" if you want to filter the first column' />
103 </when>
104 <when value="Equal or lower" >
105 <param type="float" name="equal_lower" value="" label="Value" />
106 <param name="ncol" type="text" value="c1" label="Please specify the column where you would like to apply this filter" help='For example, fill in "c1" if you want to filter the first column' />
107 </when>
108 </conditional>
109 </repeat>
110
111 </inputs>
112 <outputs>
113 <data name="output1" format="tabular" label="${tool.name} on ${input1.name}" />
114 <data name="trash_file" format="tabular" label="Removed proteins from input file" />
115 </outputs>
116 <tests>
117 <test>
118 <param name="input1" value="UnipIDs.txt" />
119 <param name="header" value="false" />
120 <repeat name="keyword">
121 <param name="match" value="false" />
122 <conditional name="k">
123 <param name="kw" value="text" />
124 <param name="txt" value="A" />
125 <param name="ncol" value="c3" />
126 </conditional>
127 </repeat>
128 <repeat name="value">
129 <conditional name="v">
130 <param name="val" value="Equal or higher"/>
131 <param name="equal_higher" value="1.0" />
132 <param name="ncol" value="c2" />
133 </conditional>
134 </repeat>
135 <output name="output1" file="filter_keywords_values_output.txt" />
136 <output name="trash_file" file="filter_keywords_values_removed.txt" />
137 </test>
138 </tests>
139 <help><![CDATA[
140 This tool allows to remove unneeded data (e.g. contaminants, non-significant values) from a proteomics results file (e.g. MaxQuant or Proline output).
141
142 **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**
143
144 **Filter the file by keywords**
145
146 Several options can be used. For each option, you can fill in the field or upload a file which contains the keywords.
147
148 - If you choose to fill in the field, the keywords should be separated by ":", for example: A8K2U0:Q5TA79:O43175
149
150 - If you choose to upload a file in a text format in which each line is a keyword, for example:
151
152 REV
153
154 TRYP_PIG
155
156 ALDOA_RABBIT
157
158 **The line that contains these keywords will be eliminated from input file.**
159
160 **Keywords search can be applied by performing either exact match or partial one by using the following option**
161
162 - If you choose **Yes**, only the fields that contains exactly the same content will be removed.
163
164 - If you choose **No**, all the fields containing the keyword will be removed.
165
166 For example:
167
168 **Yes** option (exact match) selected using the keyword "kinase": only lines which contain exactly "kinase" is removed.
169
170 **No** option (partial match) for "kinase": not only lines which contain "kinase" but also lines with "alpha-kinase" (and so on) are removed.
171
172 **Filter the file by values**
173
174 You can choose to use one or more options (e.g. to filter out peptides of low intensity value, by q-value, etc.).
175
176 * For each option, you can choose between "=", ">", ">=", "<" and "<=", then enter the value to filter and specify the column to apply that option.
177
178 **Output**
179
180 The tool will produce 2 output files.
181
182 * A text file containing the resulting filtered input file.
183
184 * A text file containing the rows removed from the input file.
185
186 -----
187
188 .. class:: infomark
189
190 **Authors**
191
192 T.P. Lien Nguyen, Florence Combes, Yves Vandenbrouck CEA, INSERM, CNRS, Grenoble-Alpes University, BIG Institute, FR
193 Sandra Dérozier, Olivier Rué, Christophe Caron, Valentin Loux INRA, Paris-Saclay University, MAIAGE Unit, Migale Bioinformatics platform
194
195 This work has been partially funded through the French National Agency for Research (ANR) IFB project.
196
197 Contact support@proteore.org for any questions or concerns about the Galaxy implementation of this tool.
198
199 ]]></help>
200 <citations>
201 </citations>
202 </tool>