We can use Bio.Entrez.elink to find related IDs from one database to another, or from same database. Thus elink requires we give name of database from where the IDs are located. We also need name of database where the new IDs are located. Finally we have to provide a string, or a list of strings, for the IDs.
In the example, the database from is ‘protein’. We have three IDs of tyrosine kinases from human, cow and mouse.
elink returns the IDs in the ‘gene’ database for these proteins.
from __future__ import print_function
from Bio import Entrez
Entrez.email = "[email protected]"
IDs = ['15718680','157427902','119703751']
handle = Entrez.elink(dbfrom = 'protein', db='gene', id = IDs)
values = Entrez.read(handle)
link_IDs = 
for value in values:
for linkset in value['LinkSetDb']:
for link in linkset['Link']:
ID = link['Id']
# ['3702', '522311', '16428']