williamgilpin / pypdb

A Python API for the RCSB Protein Data Bank (PDB)
MIT License
309 stars 77 forks source link

search by uniprot id #61

Closed echen1214 closed 1 year ago

echen1214 commented 1 year ago

Thanks for developing this package it has been useful to me. I think it would be useful to have an additional feature that search the RCSB based on UniProt IDs.

williamgilpin commented 1 year ago

@echen1214 Thank you very much! Can you give a working example? The following snippet doesn't return anything, and so I'm wondering if I'm using the wrong type of accession number

uniprot_info = Query("A2BC19", query_type="uniprot").search()

echen1214 commented 1 year ago

While I didn't do the most extensive testing for the function, I believe it didn't return anything because there are no PDB structures for that associated UniProt ID. .

williamgilpin commented 1 year ago

Thank you! it's working with A0A023GPI8