comparison iedb_api.py @ 4:7ed6dda64a81 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/iedb_api commit 6aeacd9ee8abb962fd7037cc374598caa87e63b3"
author iuc
date Sat, 13 Feb 2021 00:06:36 +0000
parents e95d3221b7f0
children
comparison
equal deleted inserted replaced
3:e95d3221b7f0 4:7ed6dda64a81
71 if allele is not None: 71 if allele is not None:
72 params['allele'] = allele.encode() 72 params['allele'] = allele.encode()
73 if length is not None: 73 if length is not None:
74 if prediction == 'bcell': 74 if prediction == 'bcell':
75 params['window_size'] = str(length).encode() 75 params['window_size'] = str(length).encode()
76 elif length == 'asis':
77 params['length'] = str(length).encode()
76 else: 78 else:
77 params['length'] = str(length).encode() 79 slen = len(seq)
80 alleles = []
81 lengths = []
82 for i in zip(length.split(','), allele.split(',')):
83 if int(i[0]) <= slen:
84 lengths.append(i[0])
85 alleles.append(i[1])
86 if lengths:
87 params['length'] = str(','.join(lengths)).encode()
88 params['allele'] = str(','.join(alleles)).encode()
89 else:
90 return results
78 req_data = urlencode(params) 91 req_data = urlencode(params)
79 if debug: 92 if debug:
80 print('url %s %s' % (url, unquote(req_data)), file=sys.stderr) 93 print('url %s %s' % (url, unquote(req_data)), file=sys.stderr)
81 retries = max(0, retries) + 1 94 retries = max(0, retries) + 1
82 for retry in range(1, retries): 95 for retry in range(1, retries):