Skip to content
Snippets Groups Projects
Commit 63675775 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

add method to retrieve uniprot IDs from a PDB ID

Former-commit-id: ab2cfde9fd3ad61a96722b9ef81bae42f2213f54
parent dfae7102
No related branches found
No related tags found
No related merge requests found
...@@ -78,3 +78,8 @@ def get_pfam_info(pfam_acc): ...@@ -78,3 +78,8 @@ def get_pfam_info(pfam_acc):
domain_family = '' domain_family = ''
return {'id': pfam_id, return {'id': pfam_id,
'description': description} 'description': description}
def get_pdb_uniprot_mapping(pdb_id):
resp = requests.get('https://www.ebi.ac.uk/pdbe/api/mappings/uniprot/{}'.format(pdb_id))
uniprot_ids = list(resp.json()[pdb_id]['UniProt'].keys())
return uniprot_ids
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment