Mercurial > repos > jjohnson > iedb_api
comparison iedb_api.py @ 3:153d5fa7af53 draft
"planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/iedb_api commit 250d6261ba8c695446f845f2f31c6cca8d87a427-dirty"
author | jjohnson |
---|---|
date | Wed, 26 Feb 2020 16:27:06 -0500 |
parents | 4a89ba6cfc63 |
children | a14128950578 |
comparison
equal
deleted
inserted
replaced
2:883cdf0ffae5 | 3:153d5fa7af53 |
---|---|
3 import argparse | 3 import argparse |
4 import os.path | 4 import os.path |
5 import re | 5 import re |
6 import sys | 6 import sys |
7 import time | 7 import time |
8 | |
9 from urllib.error import HTTPError | 8 from urllib.error import HTTPError |
10 from urllib.parse import urlencode, unquote | 9 from urllib.parse import unquote, urlencode |
11 from urllib.request import urlopen | 10 from urllib.request import urlopen |
12 | 11 |
13 mhci_methods = ['recommended', 'consensus', | 12 mhci_methods = ['recommended', 'consensus', |
14 'netmhcpan_ba', 'netmhcpan_el', | 13 'netmhcpan_ba', 'netmhcpan_el', |
15 'ann', 'smmpmbec', 'smm', | 14 'ann', 'smmpmbec', 'smm', |
184 msg = '%s %s\n%s' % (url, unquote(req_data), | 183 msg = '%s %s\n%s' % (url, unquote(req_data), |
185 ''.join(data)) | 184 ''.join(data)) |
186 warn_err(msg, exit_code=1) | 185 warn_err(msg, exit_code=1) |
187 if line.find('eptide') > 0: | 186 if line.find('eptide') > 0: |
188 header = "#%s%s" %\ | 187 header = "#%s%s" %\ |
189 ("ID\t" if seqid else "", line) | 188 ("ID\t" if seqid else "", line) |
190 if args.debug: | 189 if args.debug: |
191 print(header, file=sys.stderr) | 190 print(header, file=sys.stderr) |
192 continue | 191 continue |
193 elif method == 'Bepipred' and line.find('Residue') > 0: | 192 elif method == 'Bepipred' and line.find('Residue') > 0: |
194 header2 = "#%s%s" %\ | 193 header2 = "#%s%s" %\ |
195 ("ID\t" if seqid else "", line) | 194 ("ID\t" if seqid else "", line) |
196 if args.debug: | 195 if args.debug: |
197 print(header2, file=sys.stderr) | 196 print(header2, file=sys.stderr) |
198 rslts = results2 | 197 rslts = results2 |
199 continue | 198 continue |
200 if seqid: | 199 if seqid: |