Repository 'iedb_api'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/iedb_api

Changeset 3:e95d3221b7f0 (2020-09-11)
Previous changeset 2:a09849898387 (2020-07-29) Next changeset 4:7ed6dda64a81 (2021-02-13)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/iedb_api commit 863578373c7dadc5880633115b0c348f73dac782"
modified:
iedb_api.py
iedb_api.xml
test-data/alleles.tsv
added:
test-data/alleles_len.tsv
b
diff -r a09849898387 -r e95d3221b7f0 iedb_api.py
--- a/iedb_api.py Wed Jul 29 17:29:56 2020 -0400
+++ b/iedb_api.py Fri Sep 11 21:02:34 2020 +0000
[
@@ -35,7 +35,7 @@
                       'bcell': range(8, 16)}
 
 
-def parse_alleles(allelefile, lengths):
+def parse_alleles(allelefile, query_lengths):
     alleles = []
     lengths = []
     with open(allelefile, 'r') as fh:
@@ -47,8 +47,11 @@
                     for alen in fields[1:]:
                         alleles.append(allele)
                         lengths.append(alen)
-                elif lengths:
-                    for alen in str(lengths).split(','):
+                elif query_lengths:
+                    lens = []
+                    for ql in query_lengths:
+                        lens.extend(str(ql).split(','))
+                    for alen in lens:
                         alleles.append(allele)
                         lengths.append(alen)
                 else:
@@ -157,8 +160,7 @@
     parser.add_argument('-l', '--length',
                         action="append",
                         default=[],
-                        help='lengths for which to make predictions, '
-                             '1 per allele')
+                        help='lengths for which to make predictions for alleles')
     parser.add_argument('-w', '--window_size',
                         type=int,
                         default=None,
@@ -166,7 +168,7 @@
     parser.add_argument('-i', '--input',
                         default=None,
                         help='Input file for peptide sequences '
-                             '(fasta or tabular)')
+                             + '(fasta or tabular)')
     parser.add_argument('-c', '--column',
                         default=None,
                         help='Peptide Column in a tabular input file')
@@ -205,7 +207,7 @@
 
     if not (args.sequence or args.input):
         warn_err('NO Sequences given: '
-                 'either -s sequence or -i input_file is required\n',
+                 + 'either -s sequence or -i input_file is required\n',
                  exit_code=1)
 
     if args.output is not None:
@@ -228,7 +230,8 @@
         if args.allele:
             for i, allele in enumerate(args.allele):
                 alleles.append(allele)
-                alen = args.length[i] if i < len(args.length) else args.length[-1]
+                alen = args.length[i] if i < len(args.length)\
+                    else args.length[-1]
                 lengths.append(alen)
     allele = ','.join(alleles) if alleles else None
     length = ','.join(lengths) if lengths else None
@@ -238,7 +241,8 @@
         args.prediction
 
     # results
-    results = {'prediction': {'header': None, 'entries': []}, 'detail': {'header': None, 'entries': []}}
+    results = {'prediction': {'header': None, 'entries': []},
+               'detail': {'header': None, 'entries': []}}
 
     if args.sequence:
         for i, seq in enumerate(args.sequence):
b
diff -r a09849898387 -r e95d3221b7f0 iedb_api.xml
--- a/iedb_api.xml Wed Jul 29 17:29:56 2020 -0400
+++ b/iedb_api.xml Fri Sep 11 21:02:34 2020 +0000
b
@@ -1,4 +1,4 @@
-<tool id="iedb_api" name="IEDB" version="2.15.0">
+<tool id="iedb_api" name="IEDB" version="2.15.1">
     <description>MHC Binding prediction</description>
     <macros>
         <xml name="alleles" token_hla_regex="" token_hla_examples="" token_hlalen_examples=""> 
@@ -43,6 +43,7 @@
             #else:
               -A '$entered_alleles'
             #end if
+            -l '$prediction.lengths'
         #end if
 
         #if $sequence.seqsrc == 'fasta':
@@ -95,6 +96,8 @@
                     <option value="recommended" selected="true">recommended</option>
                     <option value="consensus">consensus</option>
                     <option value="netmhcpan">netmhcpan</option>
+                    <option value="netmhcpan_ba">netmhcpan_ba</option>
+                    <option value="netmhcpan_el">netmhcpan_el</option>
                     <option value="ann">ann</option>
                     <option value="smmpmbec">smmpmbec</option>
                     <option value="smm">smm</option>
@@ -261,7 +264,7 @@
                 <param name="method" value="recommended"/>
                 <conditional name="alleles">
                     <param name="allelesrc" value="history"/>
-                    <param name="allele_file" ftype="tabular" value="alleles.tsv"/>
+                    <param name="allele_file" ftype="tabular" value="alleles_len.tsv"/>
                 </conditional>
             </conditional>
             <conditional name="sequence">
@@ -284,6 +287,7 @@
                     <param name="allelesrc" value="history"/>
                     <param name="allele_file" ftype="tabular" value="alleles.tsv"/>
                 </conditional>
+                <param name="lengths" value="8,9"/>
             </conditional>
             <conditional name="sequence">
                 <param name="seqsrc" value="tabular"/>
b
diff -r a09849898387 -r e95d3221b7f0 test-data/alleles.tsv
--- a/test-data/alleles.tsv Wed Jul 29 17:29:56 2020 -0400
+++ b/test-data/alleles.tsv Fri Sep 11 21:02:34 2020 +0000
b
@@ -1,2 +1,2 @@
-HLA-A*01:01,9
-HLA-A*03:01,10
+HLA-A*01:01
+HLA-A*03:01
b
diff -r a09849898387 -r e95d3221b7f0 test-data/alleles_len.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/alleles_len.tsv Fri Sep 11 21:02:34 2020 +0000
b
@@ -0,0 +1,2 @@
+HLA-A*01:01,9
+HLA-A*03:01,10