diff --git a/ippisite/ippidb/ws.py b/ippisite/ippidb/ws.py index c7341d5962e0098e1b3ec401c243c48583b01b54..7f699d49064549ae9893e3e35f87535d0509634a 100644 --- a/ippisite/ippidb/ws.py +++ b/ippisite/ippidb/ws.py @@ -49,6 +49,9 @@ def get_uniprot_info(uniprot_id): uniprot_client = UniProt() ns = {'u': 'http://uniprot.org/uniprot'} resp = uniprot_client.retrieve(uniprot_id) + f = open('/tmp/'+uniprot_id+'.xml','w') + f.write(str(resp)) + f.close() recommended_name = resp.root.findall( 'u:entry/u:protein/u:recommendedName/u:fullName', ns)[0].text organism = resp.root.findall( @@ -67,6 +70,7 @@ def get_uniprot_info(uniprot_id): 'organism': int(organism), 'gene': gene, 'entry_name': entry_name, + 'short_name': entry_name.split('_')[0], 'molecular_functions': molecular_functions }