comparison iedb_api.xml @ 0:fe3c43451319 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/iedb_api commit 9aaa7c6c7241db52681b12939ebd908902830ef1"
author iuc
date Fri, 28 Feb 2020 18:09:34 -0500
parents
children a09849898387
comparison
equal deleted inserted replaced
-1:000000000000 0:fe3c43451319
1 <tool id="iedb_api" name="IEDB" version="2.15.0">
2 <description>MHC Binding prediction</description>
3 <macros>
4 <xml name="alleles" token_hla_regex="" token_hla_examples="" token_hlalen_examples="">
5 <conditional name="alleles">
6 <param name="allelesrc" type="select" label="Alleles">
7 <option value="history">From history</option>
8 <option value="entry">Entered</option>
9 </param>
10 <when value="history">
11 <param name="allele_file" type="data" format="txt" label="Alleles file">
12 <help>The dataset should have on allele per line. The allele may be followed by an optional comma-separated list of peptide lengths, e.g.: @HLALEN_EXAMPLES@</help>
13 </param>
14 </when>
15 <when value="entry">
16 <param name="allele_text" type="text" size="80" label="Alleles">
17 <help>Enter alleles separated by white space: @HLA_EXAMPLES@ (The peptide lengths may follow each allele: @HLALEN_EXAMPLES@)</help>
18 <validator type="regex" message="Doesn't appear to be a valid allele">^@HLA_REGEX@(\s+@HLA_REGEX@)*$</validator>
19 </param>
20 </when>
21 </conditional>
22 </xml>
23 </macros>
24 <requirements>
25 <requirement type="package" version="3.7">python</requirement>
26 </requirements>
27
28 <command detect_errors="exit_code"><![CDATA[
29 #import re
30 python '${__tool_directory__}/iedb_api.py'
31 --prediction=$prediction.tool
32 --method=$prediction.method
33 #if $prediction.tool == 'bcell':
34 #if $prediction.window_size:
35 -w $prediction.window_size
36 #end if
37 #else
38 #if $prediction.tool == 'processing' and $prediction.proteasome:
39 --proteasome $prediction.proteasome
40 #end if
41 #if $prediction.alleles.allelesrc == 'history':
42 -A '$prediction.alleles.allele_file'
43 #else:
44 -A '$entered_alleles'
45 #end if
46 #end if
47
48 #if $sequence.seqsrc == 'fasta':
49 -i '$sequence.seq_fasta'
50 #else if $sequence.seqsrc == 'tabular':
51 -i '$sequence.seq_tsv'
52 -c #echo int(str($sequence.pep_col)) - 1
53 #if $sequence.id_col:
54 -C #echo int(str($sequence.id_col)) - 1
55 #end if
56 #else:
57 -i '$entered_seqs' -c 1 -C 0
58 #end if
59 -o '$output'
60 ]]></command>
61 <configfiles>
62 <configfile name="entered_alleles"><![CDATA[#slurp
63 #if $prediction.tool != 'bcell' and $prediction.alleles.allelesrc == 'entry'
64 #for $word in str($prediction.alleles.allele_text).strip().split():
65 #if $word.find(',') > 0
66 $word
67 #else
68 #set $allele = $word + ',' + str($prediction.lengths)
69 $allele
70 #end if
71 #end for
72 #end if
73 ]]></configfile>
74 <configfile name="entered_seqs"><![CDATA[#slurp
75 #if $sequence.seqsrc == 'entry'
76 #for $i, $seq in enumerate(str($sequence.seq_text).strip().split())
77 #set $seqid = $i + 1
78 #set $seqtext = '\t'.join([str($seqid),$seq.strip()])
79 $seqtext
80 #end for
81 #end if
82 ]]></configfile>
83 </configfiles>
84 <inputs>
85 <conditional name="prediction">
86 <param name="tool" type="select" label="Prediction">
87 <option value="mhci">MHC-I Binding</option>
88 <option value="mhcii">MHC-II Binding</option>
89 <option value="processing">MHC-I Processing</option>
90 <option value="mhcnp">MHC-NP T-Cell Epitope</option>
91 <option value="bcell">Antibody Epitope Prediction</option>
92 </param>
93 <when value="mhci">
94 <param name="method" type="select" label="prediction method">
95 <option value="recommended" selected="true">recommended</option>
96 <option value="consensus">consensus</option>
97 <option value="netmhcpan">netmhcpan</option>
98 <option value="ann">ann</option>
99 <option value="smmpmbec">smmpmbec</option>
100 <option value="smm">smm</option>
101 <option value="comblib_sidney2008">comblib_sidney2008</option>
102 <option value="netmhccons">netmhccons</option>
103 <option value="pickpocket">pickpocket</option>
104 </param>
105 <expand macro="alleles" hla_regex="(HLA-[A-CEG]\*[0-8][[0-9]:[0-9][0-9][0-9]*|BoLA-.+|Gogo-.+|H-2-[DKL][bdk]|Mamu-.+|Patr-.+|RT.+|SLA-.+)(,([8-9]|1[0-5]))*" hla_examples="HLA-A*03:01 HLA-B*07:02" hlalen_examples="HLA-A*03:01,8,9,10 HLA-B*07:02,9"/>
106 <param name="lengths" type="select" multiple="true" optional="false" label="peptide lengths for prediction">
107 <help>Used for any alleles which don't include specified lengths</help>
108 <option value="8" selected="true">8</option>
109 <option value="9">9</option>
110 <option value="10">10</option>
111 <option value="11">11</option>
112 <option value="12">12</option>
113 <option value="13">13</option>
114 <option value="14">14</option>
115 <option value="15">15</option>
116 </param>
117
118 </when>
119 <when value="mhcii">
120 <param name="method" type="select" label="prediction method">
121 <option value="recommended" selected="true">recommended</option>
122 <option value="consensus3">consensus3</option>
123 <option value="NetMHCIIpan">NetMHCIIpan</option>
124 <option value="nn_align">nn_align</option>
125 <option value="smm_align">smm_align</option>
126 <option value="comblib">comblib</option>
127 <option value="tepitope">tepitope</option>
128 </param>
129 <expand macro="alleles" hla_regex="(DPA1\*0[1-3](:0[1-3])?/DPB1\*0[1-6]:0[12]|DQA1\*0[1-5]:0[12]/DQB1\*0[2-6]:0[12]|(HLA-)?DRB[1-5]\*[01][1-9]:0[1-5]|H2-IA[bd])(,(asis|[1-2][0-9]|30))*" hla_examples="DPA1*01/DPB1*04:01 HLA-DRB1*01:01 H2-IAb" hlalen_examples="DPA1*01/DPB1*04:01,11,15"/>
130 <param name="lengths" type="select" multiple="true" optional="false" label="peptide lengths for prediction">
131 <help>Used for any alleles which don't include specified lengths</help>
132 <option value="asis">asis</option>
133 <option value="11">11</option>
134 <option value="12">12</option>
135 <option value="13">13</option>
136 <option value="14">14</option>
137 <option value="15" selected="true">15</option>
138 <option value="16">16</option>
139 <option value="17">17</option>
140 <option value="18">18</option>
141 <option value="19">19</option>
142 <option value="20">20</option>
143 <option value="21">21</option>
144 <option value="22">22</option>
145 <option value="23">23</option>
146 <option value="24">24</option>
147 <option value="25">25</option>
148 <option value="26">26</option>
149 <option value="27">27</option>
150 <option value="28">28</option>
151 <option value="29">29</option>
152 <option value="30">30</option>
153 </param>
154 </when>
155 <when value="processing">
156 <param name="method" type="select" label="prediction method">
157 <option value="recommended" selected="true">recommended</option>
158 <option value="consensus">consensus</option>
159 <option value="netmhcpan">netmhcpan</option>
160 <option value="ann">ann</option>
161 <option value="smmpmbec">smmpmbec</option>
162 <option value="smm">smm</option>
163 <option value="comblib_sidney2008">comblib_sidney2008</option>
164 </param>
165 <param name="proteasome" type="select" label="proteasome type">
166 <option value="immuno">immuno</option>
167 <option value="constitutive">constitutive</option>
168 </param>
169 <expand macro="alleles" hla_regex="(HLA-[A-CE]\*[0-8][[0-9]:[0-9][0-9]|BoLA-.+|Gogo-.+|H-2-[DKL][bdk]|Mamu-.+|Patr-.+|RT.+|SLA-.+)(,([8-9]|1[0-4]))*" hla_examples="HLA-A*03:01 HLA-B*07:02" hlalen_examples="HLA-A*03:01,8,9,10 HLA-B*07:02,9"/>
170 <param name="lengths" type="select" multiple="true" optional="false" label="peptide lengths for prediction">
171 <help>Used for any alleles which don't include specified lengths</help>
172 <option value="8" selected="true">8</option>
173 <option value="9">9</option>
174 <option value="10">10</option>
175 <option value="11">11</option>
176 <option value="12">12</option>
177 <option value="13">13</option>
178 <option value="14">14</option>
179 </param>
180 </when>
181 <when value="mhcnp">
182 <param name="method" type="select" label="prediction method">
183 <option value="mhcnp" selected="true">mhcnp</option>
184 <option value="netmhcpan">netmhcpan</option>
185 </param>
186 <expand macro="alleles" hla_regex="(HLA-(A\*02:01|B\*07:02|B\*35:01|B\*44:03|B\*53:01|B\*57:01)|H-2-[DK]b)(,[8-9]|1[0-1])*" hla_examples="HLA-A*02:01 H-2-Db" hlalen_examples="HLA-A*02:01,8,9,10"/>
187 <param name="lengths" type="select" multiple="true" optional="false" label="peptide lengths for prediction">
188 <help>Used for any alleles which don't include specified lengths</help>
189 <option value="8" selected="true">8</option>
190 <option value="9">9</option>
191 <option value="10">10</option>
192 <option value="11">11</option>
193 </param>
194 </when>
195 <when value="bcell">
196 <param name="method" type="select" label="prediction method">
197 <option value="Bepipred" selected="true">Bepipred</option>
198 <option value="Chou-Fasman">Chou-Fasman</option>
199 <option value="Emini">Emini</option>
200 <option value="Karplus-Schulz">Karplus-Schulz</option>
201 <option value="Kolaskar-Tongaonkar">Kolaskar-Tongaonkar</option>
202 <option value="Parker">Parker</option>
203 </param>
204 <param name="window_size" type="integer" value="" optional="true" min="1" label="window_size" help="window_size should be less than the sequence length, and less than 8 for Karplus-Schulz method"/>
205 </when>
206 </conditional>
207 <conditional name="sequence">
208 <param name="seqsrc" type="select" label="Peptide sequences">
209 <option value="fasta">Fasta file</option>
210 <option value="tabular">From tabular</option>
211 <option value="entry"></option>
212 </param>
213 <when value="fasta">
214 <param name="seq_fasta" type="data" format="fasta" label="Peptide Sequence Fasta"/>
215 </when>
216 <when value="tabular">
217 <param name="seq_tsv" type="data" format="tabular" label="Peptide Sequence Tabular"/>
218 <param name="pep_col" label="Select column with peptides" type="data_column" numerical="false" data_ref="seq_tsv" />
219 <param name="id_col" label="Select column with name" type="data_column" numerical="false" data_ref="seq_tsv" optional="true"/>
220 </when>
221 <when value="entry">
222 <param name="seq_text" type="text" label="Peptide Sequence"/>
223 </when>
224 </conditional>
225
226 </inputs>
227 <outputs>
228 <!--
229 <data name="output" format="tabular"/>
230 -->
231 <data name="output" format="tabular" label="IEDB ${prediction.tool} ${prediction.method}"/>
232 <data name="output2" format="tabular" label="IEDB ${prediction.tool} ${prediction.method} residue scores" from_work_dir="iedb_results2">
233 <filter>prediction['method'].startswith('Bepipred')</filter>
234 </data>
235 </outputs>
236 <tests>
237 <!-- test1 -->
238 <test>
239 <conditional name="prediction">
240 <param name="tool" value="mhci"/>
241 <param name="method" value="recommended"/>
242 <conditional name="alleles">
243 <param name="allelesrc" value="entry"/>
244 <param name="allele_text" value="HLA-A*01:01,9"/>
245 </conditional>
246 </conditional>
247 <conditional name="sequence">
248 <param name="seqsrc" value="entry"/>
249 <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/>
250 </conditional>
251 <output name="output">
252 <assert_contents>
253 <has_text text="LYNTVATLY" />
254 </assert_contents>
255 </output>
256 </test>
257 <!-- test2 -->
258 <test>
259 <conditional name="prediction">
260 <param name="tool" value="mhci"/>
261 <param name="method" value="recommended"/>
262 <conditional name="alleles">
263 <param name="allelesrc" value="history"/>
264 <param name="allele_file" ftype="tabular" value="alleles.tsv"/>
265 </conditional>
266 </conditional>
267 <conditional name="sequence">
268 <param name="seqsrc" value="fasta"/>
269 <param name="seq_fasta" ftype="fasta" value="seqs.fa"/>
270 </conditional>
271 <output name="output">
272 <assert_contents>
273 <has_text text="peptide1" />
274 <has_text text="HKVPRRLLK" />
275 </assert_contents>
276 </output>
277 </test>
278 <!-- test3 -->
279 <test>
280 <conditional name="prediction">
281 <param name="tool" value="mhci"/>
282 <param name="method" value="recommended"/>
283 <conditional name="alleles">
284 <param name="allelesrc" value="history"/>
285 <param name="allele_file" ftype="tabular" value="alleles.tsv"/>
286 </conditional>
287 </conditional>
288 <conditional name="sequence">
289 <param name="seqsrc" value="tabular"/>
290 <param name="seq_tsv" ftype="tabular" value="seqs.tsv"/>
291 <param name="pep_col" value="3"/>
292 <param name="id_col" value="1"/>
293 </conditional>
294 <output name="output">
295 <assert_contents>
296 <has_text text="peptide1" />
297 <has_text text="HKVPRRLLK" />
298 </assert_contents>
299 </output>
300 </test>
301 <!-- test4 -->
302 <test>
303 <conditional name="prediction">
304 <param name="tool" value="mhcii"/>
305 <param name="method" value="recommended"/>
306 <conditional name="alleles">
307 <param name="allelesrc" value="entry"/>
308 <param name="allele_text" value="DPA1*01/DPB1*04:01"/>
309 </conditional>
310 <param name="lengths" value="asis"/>
311 </conditional>
312 <conditional name="sequence">
313 <param name="seqsrc" value="entry"/>
314 <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/>
315 </conditional>
316 <output name="output">
317 <assert_contents>
318 <has_text text="LYNTVATLY" />
319 </assert_contents>
320 </output>
321 </test>
322 <!-- test5 -->
323 <test>
324 <conditional name="prediction">
325 <param name="tool" value="processing"/>
326 <param name="method" value="recommended"/>
327 <conditional name="alleles">
328 <param name="allelesrc" value="entry"/>
329 <param name="allele_text" value="HLA-A*01:01,8 HLA-A*02:01,9"/>
330 </conditional>
331 <param name="proteasome" value="constitutive"/>
332 </conditional>
333 <conditional name="sequence">
334 <param name="seqsrc" value="entry"/>
335 <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/>
336 </conditional>
337 <output name="output">
338 <assert_contents>
339 <has_text text="LYNTVATLY" />
340 </assert_contents>
341 </output>
342 </test>
343 <!-- test6 -->
344 <test>
345 <conditional name="prediction">
346 <param name="tool" value="mhcnp"/>
347 <param name="method" value="mhcnp"/>
348 <conditional name="alleles">
349 <param name="allelesrc" value="entry"/>
350 <param name="allele_text" value="HLA-A*02:01,9"/>
351 </conditional>
352 </conditional>
353 <conditional name="sequence">
354 <param name="seqsrc" value="entry"/>
355 <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/>
356 </conditional>
357 <output name="output">
358 <assert_contents>
359 <has_text text="LYNTVATLY" />
360 </assert_contents>
361 </output>
362 </test>
363 <!-- test7 -->
364 <test>
365 <conditional name="prediction">
366 <param name="tool" value="bcell"/>
367 <param name="method" value="Emini"/>
368 </conditional>
369 <conditional name="sequence">
370 <param name="seqsrc" value="entry"/>
371 <param name="seq_text" value="VLSEGEWQLVLHVWAKVEADVAGHGQDILIRLFKSHPETLEKFDRFKHLKTE"/>
372 </conditional>
373 <output name="output">
374 <assert_contents>
375 <has_text text="VLSEGE" />
376 </assert_contents>
377 </output>
378 </test>
379 <!-- test8 -->
380 <test>
381 <conditional name="prediction">
382 <param name="tool" value="bcell"/>
383 <param name="method" value="Bepipred"/>
384 <param name="window_size" value="9"/>
385 </conditional>
386 <conditional name="sequence">
387 <param name="seqsrc" value="fasta"/>
388 <param name="seq_fasta" ftype="fasta" value="bcell.fa"/>
389 </conditional>
390 <output name="output">
391 <assert_contents>
392 <has_text text="ADVAGH" />
393 </assert_contents>
394 </output>
395 </test>
396
397 </tests>
398 <help><![CDATA[
399 The IEDB is a free resource, funded by a contract from the National Institute of Allergy and Infectious Diseases. It offers easy searching of experimental data characterizing antibody and T cell epitopes studied in humans, non-human primates, and other animal species.
400
401 This tool retrieves epitope binding information about input peptide sequences by using the RESTful web services provided by IEDB.
402 The webservices are described at: http://tools.immuneepitope.org/main/tools-api/
403 That page also describes how to retrieve the available HLA alleles for class of epitope binding.
404
405 **INPUTS**
406
407 peptide sequences from a fasta file or a column in a tabular file
408
409 HLA alleles either entered as text or one per line in a text file
410
411
412 **OUTPUTS**
413
414 A tabular file containing the results returned from the IEDB web service
415
416 **Typical Workflow for Human MHC I Binding Prediction**
417
418 The RNAseq data for the subject would be used for:
419
420 - HLA prediction by seq2HLA
421 - Novel Antigen Prediction by a variety of workflows to generate a Antigen peptide fasta
422
423
424 .. image:: $PATH_TO_IMAGES/IEDB_Workflow_QueryTabular.png
425 :width: 584
426 :height: 430
427
428 .. note:: The seq2HLA ClassI.HLAgenotype4digits output needs to be converted for IEDB alleles.
429
430 The seq2HLA ClassI.HLAgenotype4digits output:
431
432 .. image:: $PATH_TO_IMAGES/seq2HLA_ClassI.HLAgenotype4digits.png
433 :width: 285
434 :height: 77
435
436 Needs to be converted into IEDB formatted alleles:
437
438 .. image:: $PATH_TO_IMAGES/IEDB_formatted_alleles.png
439 :width: 74
440 :height: 81
441
442 In the workflow above QueryTabular tool converts the alleles:
443
444 - Filter Dataset Input
445
446 * skip leading lines - *skip lines:* 1
447 * select columns - *columns:* 2,4
448 * regex replace value in column - *column:* 1 *regex pattern:* ^(\\w+[*]\\d\\d:\\d\\d\\d?).*$ *replacement expression:* HLA-\\1
449 * regex replace value in column - *column:* 2 *regex pattern:* ^(\\w+[*]\\d\\d:\\d\\d\\d?).*$ *replacement expression:* HLA-\\1
450
451 - SQL Query to generate tabular output
452
453 * SELECT c1 FROM t1 UNION SELECT c2 FROM t1
454
455
456 The IEDB formatting can also be performed by TextProcessing tools:
457
458 .. image:: $PATH_TO_IMAGES/TextProcessingConversion.png
459 :width: 608
460 :height: 87
461
462 The TextProcessing steps to convert the alleles:
463
464 - Remove beginning - removes the header line
465 - Replace Text - picks Allele 1 and Allele 2 from each line and reformats each on a separate line
466
467 * *Find pattern:* ^.*\\t([a-zA-Z]+[*][0-9]{2}:[0-9]{2,3}).*\\t.*\\t([a-zA-Z]+[*][0-9]{2}:[0-9]{2,3}).*\\t.*$
468 * *Replace with:* HLA-\\1\\nHLA-\\2
469
470 - Unique - remove duplicates
471
472
473 ]]></help>
474 <citations>
475 <citation type="doi">10.1093/nar/gku938</citation>
476 </citations>
477 </tool>