[Biopython-dev] function to map uniprot IDs with PDB IDs
Peter
biopython at maubp.freeserve.co.uk
Wed Mar 11 12:12:36 EDT 2009
On Wed, Mar 11, 2009 at 3:58 PM, Lorena Carló <lorena.carlo at gmail.com> wrote:
> Hi all,
>
> I would like to know if there is an implemented function in Biopython that
> allows getting the PDB id from a Uniprotkb ID?.
>
> Thanks,
> Lorena
There isn't a simple one-to-one mapping from a UniProtKB/Swiss-Prot ID
to a PDB ID, see
http://www.uniprot.org/faq/2
Are you working from UniProtKB/Swiss-Prot files? How about something like this:
# This assumes you have downloaded the following file
# to your working directory:
# http://www.uniprot.org/uniprot/P00734.txt
from Bio import SeqIO
record = SeqIO.read(open("P00734.txt"),"swiss")
for xref in record.dbxrefs :
if xref.startswith("PDB:") :
print xref.split(":",1)[1]
Peter
P.S. This is more a question for the main discussion list, rather than
Biopython development
More information about the Biopython-dev
mailing list