Mercurial > repos > iuc > iedb_api
changeset 3:e95d3221b7f0 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/iedb_api commit 863578373c7dadc5880633115b0c348f73dac782"
author | iuc |
---|---|
date | Fri, 11 Sep 2020 21:02:34 +0000 |
parents | a09849898387 |
children | 7ed6dda64a81 |
files | iedb_api.py iedb_api.xml test-data/alleles.tsv test-data/alleles_len.tsv |
diffstat | 4 files changed, 23 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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):
--- a/iedb_api.xml Wed Jul 29 17:29:56 2020 -0400 +++ b/iedb_api.xml Fri Sep 11 21:02:34 2020 +0000 @@ -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"/>