comparison filter_kw_val.xml @ 1:d29e469b6b20 draft

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