Mercurial > repos > jjohnson > iedb_api
diff iedb_api.xml @ 1:4a89ba6cfc63 draft
"planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/iedb_api commit 18698e056ccc2d6d37836bd22728e2d8765e92ec"
author | jjohnson |
---|---|
date | Tue, 25 Feb 2020 17:37:34 -0500 |
parents | 991424605492 |
children | 883cdf0ffae5 |
line wrap: on
line diff
--- a/iedb_api.xml Mon Feb 17 16:04:07 2020 -0500 +++ b/iedb_api.xml Tue Feb 25 17:37:34 2020 -0500 @@ -1,17 +1,81 @@ -<tool id="iedb_api" name="IEDB" version="0.1.0"> +<tool id="iedb_api" name="IEDB" version="2.15.0"> <description>MHC Binding prediction</description> + <macros> + <xml name="alleles" token_hla_regex="" token_hla_examples="" token_hlalen_examples=""> + <conditional name="alleles"> + <param name="allelesrc" type="select" label="Alleles"> + <option value="history">From history</option> + <option value="entry">Entered</option> + </param> + <when value="history"> + <param name="allele_file" type="data" format="txt" label="Alleles file"> + <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> + </param> + </when> + <when value="entry"> + <param name="allele_text" type="text" size="80" label="Alleles"> + <help>Enter alleles separated by white space: @HLA_EXAMPLES@ (The peptide lengths may follow each allele: @HLALEN_EXAMPLES@)</help> + <validator type="regex" message="Doesn't appear to be a valid allele">^@HLA_REGEX@(\s+@HLA_REGEX@)*$</validator> + </param> + </when> + </conditional> + </xml> + </macros> <requirements> + <requirement type="package" version="3.7">python</requirement> </requirements> - <stdio> - <exit_code range="1:" /> - </stdio> - <command interpreter="python"><![CDATA[ + <command detect_errors="exit_code"><![CDATA[ #import re - iedb_api.py --prediction=$prediction.tool --method=$prediction.method + python '${__tool_directory__}/iedb_api.py' + --prediction=$prediction.tool + --method=$prediction.method + #if $prediction.tool == 'bcell': + #if $prediction.window_size: + -w $prediction.window_size + #end if + #else + #if $prediction.tool == 'processing' and $prediction.proteasome: + --proteasome $prediction.proteasome + #end if + #if $prediction.alleles.allelesrc == 'history': + #for $line in open(str($prediction.alleles.allele_file)): + #set $fields = $line.strip().split(',') + #set $allele = $fields[0].strip() + #if len($allele) > 0: + #if len($fields) > 1: + #for $alen in $fields[1:]: + -a '$allele' -l $alen + #end for + #else: + #for $alen in str($prediction.lengths).split(','): + -a '$allele' -l $alen + #end for + #end if + #end if + #end for + #else: + #for $word in str($prediction.alleles.allele_text).strip().split(): + #set $fields = $word.strip().split(',') + #set $allele = $fields[0].strip() + #if len($allele) > 0: + #if len($fields) > 1: + #for $alen in $fields[1:]: + -a '$allele' -l $alen + #end for + #else: + #for $alen in str($prediction.lengths).split(','): + -a '$allele' -l $alen + #end for + #end if + #end if + #end for + #end if + #end if + #if $sequence.seqsrc == 'fasta': - -i $sequence.seq_fasta + -i '$sequence.seq_fasta' #else if $sequence.seqsrc == 'tabular': - -i $sequence.seq_tsv + -i '$sequence.seq_tsv' -c #echo int(str($sequence.pep_col)) - 1 #if $sequence.id_col: -C #echo int(str($sequence.id_col)) - 1 @@ -21,42 +85,131 @@ -s $seq.strip() #end for #end if - #if $alleles.allelesrc == 'history': - #for $line in open(str($alleles.allele_file)): - #set $fields = $line.strip().split(',') - #set $allele = $fields[0].strip() - #if len($allele) > 0: - #if len($fields) > 1: - #for $alen in $fields[1:]: - -a $allele -l $alen - #end for - #else: - #for $alen in str($lengths).split(','): - -a $allele -l $alen - #end for - #end if - #end if - #end for - #else: - #for $word in str($alleles.allele_text).strip().split(): - #set $fields = $word.strip().split(',') - #set $allele = $fields[0].strip() - #if len($allele) > 0: - #if len($fields) > 1: - #for $alen in $fields[1:]: - -a $allele -l $alen - #end for - #else: - #for $alen in str($lengths).split(','): - -a $allele -l $alen - #end for - #end if - #end if - #end for - #end if -o $output ]]></command> <inputs> + <conditional name="prediction"> + <param name="tool" type="select" label="Prediction"> + <option value="mhci">MHC-I Binding</option> + <option value="mhcii">MHC-II Binding</option> + <option value="processing">MHC-I Processing</option> + <option value="mhcnp">MHC-NP T-Cell Epitope</option> + <option value="bcell">Antibody Epitope Prediction</option> + </param> + <when value="mhci"> + <param name="method" type="select" label="prediction method"> + <option value="recommended" selected="true">recommended</option> + <option value="consensus">consensus</option> + <option value="netmhcpan">netmhcpan</option> + <option value="ann">ann</option> + <option value="smmpmbec">smmpmbec</option> + <option value="smm">smm</option> + <option value="comblib_sidney2008">comblib_sidney2008</option> + <option value="netmhccons">netmhccons</option> + <option value="pickpocket">pickpocket</option> + </param> + <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"/> + <param name="lengths" type="select" multiple="true" optional="false" label="peptide lengths for prediction"> + <help>Used for any alleles which don't include specified lengths</help> + <option value="8" selected="true">8</option> + <option value="9">9</option> + <option value="10">10</option> + <option value="11">11</option> + <option value="12">12</option> + <option value="13">13</option> + <option value="14">14</option> + <option value="15">15</option> + </param> + + </when> + <when value="mhcii"> + <param name="method" type="select" label="prediction method"> + <option value="recommended" selected="true">recommended</option> + <option value="consensus3">consensus3</option> + <option value="NetMHCIIpan">NetMHCIIpan</option> + <option value="nn_align">nn_align</option> + <option value="smm_align">smm_align</option> + <option value="comblib">comblib</option> + <option value="tepitope">tepitope</option> + </param> + <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]|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"/> + <param name="lengths" type="select" multiple="true" optional="false" label="peptide lengths for prediction"> + <help>Used for any alleles which don't include specified lengths</help> + <option value="asis">asis</option> + <option value="11">11</option> + <option value="12">12</option> + <option value="13">13</option> + <option value="14">14</option> + <option value="15" selected="true">15</option> + <option value="16">16</option> + <option value="17">17</option> + <option value="18">18</option> + <option value="19">19</option> + <option value="20">20</option> + <option value="21">21</option> + <option value="22">22</option> + <option value="23">23</option> + <option value="24">24</option> + <option value="25">25</option> + <option value="26">26</option> + <option value="27">27</option> + <option value="28">28</option> + <option value="29">29</option> + <option value="30">30</option> + </param> + </when> + <when value="processing"> + <param name="method" type="select" label="prediction method"> + <option value="recommended" selected="true">recommended</option> + <option value="consensus">consensus</option> + <option value="netmhcpan">netmhcpan</option> + <option value="ann">ann</option> + <option value="smmpmbec">smmpmbec</option> + <option value="smm">smm</option> + <option value="comblib_sidney2008">comblib_sidney2008</option> + </param> + <param name="proteasome" type="select" label="proteasome type"> + <option value="immuno">immuno</option> + <option value="constitutive">constitutive</option> + </param> + <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"/> + <param name="lengths" type="select" multiple="true" optional="false" label="peptide lengths for prediction"> + <help>Used for any alleles which don't include specified lengths</help> + <option value="8" selected="true">8</option> + <option value="9">9</option> + <option value="10">10</option> + <option value="11">11</option> + <option value="12">12</option> + <option value="13">13</option> + <option value="14">14</option> + </param> + </when> + <when value="mhcnp"> + <param name="method" type="select" label="prediction method"> + <option value="mhcnp" selected="true">mhcnp</option> + <option value="netmhcpan">netmhcpan</option> + </param> + <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"/> + <param name="lengths" type="select" multiple="true" optional="false" label="peptide lengths for prediction"> + <help>Used for any alleles which don't include specified lengths</help> + <option value="8" selected="true">8</option> + <option value="9">9</option> + <option value="10">10</option> + <option value="11">11</option> + </param> + </when> + <when value="bcell"> + <param name="method" type="select" label="prediction method"> + <option value="Bepipred" selected="true">Bepipred</option> + <option value="Chou-Fasman">Chou-Fasman</option> + <option value="Emini">Emini</option> + <option value="Karplus-Schulz">Karplus-Schulz</option> + <option value="Kolaskar-Tongaonkar">Kolaskar-Tongaonkar</option> + <option value="Parker">Parker</option> + </param> + <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"/> + </when> + </conditional> <conditional name="sequence"> <param name="seqsrc" type="select" label="Peptide sequences"> <option value="fasta">Fasta file</option> @@ -75,139 +228,157 @@ <param name="seq_text" type="text" size="80" label="Peptide Sequence"/> </when> </conditional> - <conditional name="alleles"> - <param name="allelesrc" type="select" label="Alleles"> - <option value="history">From history</option> - <option value="entry">Entered</option> - </param> - <when value="history"> - <param name="allele_file" type="data" format="txt" label="Alleles file"> - <help>The dataset should have on allele per line. The allele may be followed by an optional comma-separated list of pepttide lengths, e.g.: HLA-A*02:01,8,9</help> - </param> - </when> - <when value="entry"> - <param name="allele_text" type="text" size="80" label="Alleles"> - <help>Enter alleles separated by white space: HLA-A*03:01 HLA-B*07:02 (The peptide lengths may follow each allele: HLA-A*03:01,8,9,10 HLA-B*07:02,9</help> - <validator type="regex" message="IDs separted by commas">^(HLA-([A-C]|D[PQR][AB]1)\*[0-9][[0-9]:[0-9][0-9](,(8|9|10|11|12|13|14|15))*)(\s+HLA-([A-C]|D[PQR][AB]1)\*[0-9][[0-9]:[0-9][0-9](,(8|9|10|11|12|13|14|15))*)*$</validator> - </param> - </when> - </conditional> - <param name="lengths" type="select" multiple="true" label="peptide lengths for prediction"> - <help>Used for any alleles which don't include specified lengths</help> - <option value="8">8</option> - <option value="9">9</option> - <option value="10">10</option> - <option value="11">11</option> - <option value="12">12</option> - <option value="13">13</option> - <option value="14">14</option> - <option value="15">15</option> - </param> - <conditional name="prediction"> - <param name="tool" type="select" label="Prediction"> - <option value="mhci">MHC-I Binding</option> - <option value="mhcii">MHC-II Binding</option> - <option value="processing">MHC-I Processing</option> - <option value="mhcnp">MHC-NP T-Cell Epitope</option> - <option value="bcell">Antibody Epitope Prediction</option> - </param> - <when value="mhci"> - <param name="method" type="select" label="prediction method"> - <option value="recommended" selected="true">recommended</option> - <option value="consensus">consensus</option> - <option value="netmhcpan">netmhcpan</option> - <option value="ann">ann</option> - <option value="smmpmbec">smmpmbec</option> - <option value="smm">smm</option> - <option value="comblib_sidney2008">comblib_sidney2008</option> - <option value="netmhccons">netmhccons</option> - <option value="pickpocket">pickpocket</option> - </param> - </when> - <when value="mhcii"> - <param name="method" type="select" label="prediction method"> - <option value="recommended" selected="true">recommended</option> - <option value="consensus3">consensus3</option> - <option value="NetMHCIIpan">NetMHCIIpan</option> - <option value="nn_align">nn_align</option> - <option value="smm_align">smm_align</option> - <option value="comblib">comblib</option> - <option value="tepitope">tepitope</option> - </param> - </when> - <when value="processing"> - <param name="method" type="select" label="prediction method"> - <option value="recommended" selected="true">recommended</option> - <option value="consensus">consensus</option> - <option value="netmhcpan">netmhcpan</option> - <option value="ann">ann</option> - <option value="smmpmbec">smmpmbec</option> - <option value="smm">smm</option> - <option value="comblib_sidney2008">comblib_sidney2008</option> - </param> - </when> - <when value="mhcnp"> - <param name="method" type="select" label="prediction method"> - <option value="mhcnp" selected="true">mhcnp</option> - </param> - </when> - <when value="bcell"> - <param name="method" type="select" label="prediction method"> - <option value="Bepipred" selected="true">Bepipred</option> - <option value="Chou-Fasman">Chou-Fasman</option> - <option value="Emini">Emini</option> - <option value="Karplus-Schulz">Karplus-Schulz</option> - <option value="Kolaskar-Tongaonkar">Kolaskar-Tongaonkar</option> - <option value="Parker">Parker</option> - </param> - <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"/> - </when> - </conditional> + </inputs> <outputs> + <!-- <data name="output" format="tabular"/> + --> + <data name="output" format="tabular" label="IEDB ${prediction.tool} ${prediction.method}"/> + <data name="output2" format="tabular" label="IEDB ${prediction.tool} ${prediction.method} residue scores" from_work_dir="iedb_results2"> + <filter>prediction['method'].startswith('Bepipred')</filter> + </data> </outputs> <tests> - <test> - <param name="seqsrc" value="entry"/> - <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/> - <param name="allelesrc" value="entry"/> - <param name="allele_text" value="HLA-A*01:01,9"/> - <param name="tool" value="mhci"/> - <param name="method" value="recommended"/> + <!-- test1 --> + <test> + <conditional name="prediction"> + <param name="tool" value="mhci"/> + <param name="method" value="recommended"/> + <conditional name="alleles"> + <param name="allelesrc" value="entry"/> + <param name="allele_text" value="HLA-A*01:01,9"/> + </conditional> + </conditional> + <conditional name="sequence"> + <param name="seqsrc" value="entry"/> + <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/> + </conditional> <output name="output"> <assert_contents> <has_text text="LYNTVATLY" /> </assert_contents> </output> </test> + <!-- test2 --> <test> - <param name="seqsrc" value="fasta"/> - <param name="seq_fasta" ftype="fasta" value="seqs.fa"/> - <param name="allelesrc" value="history"/> - <param name="allele_file" ftype="txt" value="alleles.txt"/> - <param name="tool" value="mhci"/> - <param name="method" value="recommended"/> + <conditional name="prediction"> + <param name="tool" value="mhci"/> + <param name="method" value="recommended"/> + <conditional name="alleles"> + <param name="allelesrc" value="history"/> + <param name="allele_file" ftype="tabular" value="alleles.tsv"/> + </conditional> + </conditional> + <conditional name="sequence"> + <param name="seqsrc" value="fasta"/> + <param name="seq_fasta" ftype="fasta" value="seqs.fa"/> + </conditional> <output name="output"> <assert_contents> <has_text text="peptide1" /> - <has_text text="AHKVPRRLLK" /> + <has_text text="HKVPRRLLK" /> + </assert_contents> + </output> + </test> + <!-- test3 --> + <test> + <conditional name="prediction"> + <param name="tool" value="mhci"/> + <param name="method" value="recommended"/> + <conditional name="alleles"> + <param name="allelesrc" value="history"/> + <param name="allele_file" ftype="tabular" value="alleles.tsv"/> + </conditional> + </conditional> + <conditional name="sequence"> + <param name="seqsrc" value="tabular"/> + <param name="seq_tsv" ftype="tabular" value="seqs.tsv"/> + <param name="pep_col" value="3"/> + <param name="id_col" value="1"/> + </conditional> + <output name="output"> + <assert_contents> + <has_text text="peptide1" /> + <has_text text="HKVPRRLLK" /> </assert_contents> </output> </test> + <!-- test4 --> <test> - <param name="seqsrc" value="tabular"/> - <param name="seq_tsv" ftype="tabular" value="seqs.tsv"/> - <param name="pep_col" value="3"/> - <param name="id_col" value="1"/> - <param name="allelesrc" value="history"/> - <param name="allele_file" ftype="txt" value="alleles.txt"/> - <param name="tool" value="mhci"/> - <param name="method" value="recommended"/> + <conditional name="prediction"> + <param name="tool" value="mhcii"/> + <param name="method" value="recommended"/> + <conditional name="alleles"> + <param name="allelesrc" value="entry"/> + <param name="allele_text" value="DPA1*01/DPB1*04:01"/> + </conditional> + <param name="lengths" value="asis"/> + </conditional> + <conditional name="sequence"> + <param name="seqsrc" value="entry"/> + <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/> + </conditional> + <output name="output"> + <assert_contents> + <has_text text="LYNTVATLY" /> + </assert_contents> + </output> + </test> + <!-- test5 --> + <test> + <conditional name="prediction"> + <param name="tool" value="processing"/> + <param name="method" value="recommended"/> + <conditional name="alleles"> + <param name="allelesrc" value="entry"/> + <param name="allele_text" value="HLA-A*01:01,8 HLA-A*02:01,9"/> + </conditional> + <param name="proteasome" value="constitutive"/> + </conditional> + <conditional name="sequence"> + <param name="seqsrc" value="entry"/> + <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/> + </conditional> <output name="output"> <assert_contents> - <has_text text="peptide1" /> - <has_text text="AHKVPRRLLK" /> + <has_text text="LYNTVATLY" /> + </assert_contents> + </output> + </test> + <!-- test6 --> + <test> + <conditional name="prediction"> + <param name="tool" value="mhcnp"/> + <param name="method" value="mhcnp"/> + <conditional name="alleles"> + <param name="allelesrc" value="entry"/> + <param name="allele_text" value="HLA-A*02:01,9"/> + </conditional> + </conditional> + <conditional name="sequence"> + <param name="seqsrc" value="entry"/> + <param name="seq_text" value="SLYNTVATLYCVHQRIDV"/> + </conditional> + <output name="output"> + <assert_contents> + <has_text text="LYNTVATLY" /> + </assert_contents> + </output> + </test> + <!-- test7 --> + <test> + <conditional name="prediction"> + <param name="tool" value="bcell"/> + <param name="method" value="Emini"/> + </conditional> + <conditional name="sequence"> + <param name="seqsrc" value="entry"/> + <param name="seq_text" value="VLSEGEWQLVLHVWAKVEADVAGHGQDILIRLFKSHPETLEKFDRFKHLKTE"/> + </conditional> + <output name="output"> + <assert_contents> + <has_text text="VLSEGE" /> </assert_contents> </output> </test> @@ -215,14 +386,15 @@ <help><![CDATA[ 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. -This tool retrieves epitope information about input peptide sequences by using the RESTful web services provided by IEDB. +This tool retrieves epitope binding information about input peptide sequences by using the RESTful web services provided by IEDB. The webservices are described at: http://tools.immuneepitope.org/main/tools-api/ +That page also describes how to retrieve the available HLA alleles for class of epitope binding. **INPUTS** peptide sequences from a fasta file or a column in a tabular file - HLA alleles either entered as text or on per line in a text file + HLA alleles either entered as text or one per line in a text file **OUTPUTS**