Mercurial > repos > bgruening > uniprot_rest_interface
diff uniprot.py @ 5:6e9fabe16b0c draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/uniprot_rest_interface commit f4fd11072886b30675afb8f8bb459eba9c4671bb
author | bgruening |
---|---|
date | Sat, 15 Sep 2018 10:23:18 -0400 |
parents | ed07130fb07c |
children | b1cc2c5bde0e |
line wrap: on
line diff
--- a/uniprot.py Tue Aug 14 16:37:11 2018 -0400 +++ b/uniprot.py Sat Sep 15 10:23:18 2018 -0400 @@ -19,12 +19,16 @@ def _retrieve(query, format='txt'): """_retrieve is not meant for use with the python interface, use `retrieve` instead""" - tool = 'batch/' + tool = 'uploadlists/' query = list(set(query.split('\n'))) queries = [query[i:i+100] for i in range(0, len(query), 100)] - data = {'format': format} + data = { + 'format': format, + 'from': 'ACC+ID', + 'to': 'ACC' + } responses = [requests.post(url + tool, data=data, files={'file': ' '.join(_)}) for _ in queries] page = ''.join(response.text for response in responses) @@ -34,7 +38,7 @@ def _map(query, f, t, format='tab'): """ _map is not meant for use with the python interface, use `map` instead """ - tool = 'mapping/' + tool = 'uploadlists/' data = { 'from': f,