[Biopython] access Uniprot record by different ids

Sheila the angel from.d.putto at gmail.com
Tue Jul 10 13:16:25 UTC 2012


I have a Uniprot AC list in which some AC are primary and some are
secondary. The function
my_dict = SeqIO.index("uniprot_sprot.dat", "swiss")
makes dictionary of  uniprot data but I can access a record only by primary
AC.
my_dict['P04637']  # gives the record
my_dict['Q15086'] # KeyError
my_dict['P53_HUMAN'] # KeyError

Is it possible to access same record by both primary and secondary ACs (and
by uniprot ID) ?



More information about the Biopython mailing list