Tanggal :September 27, 2020

bpy11. Using Entrez EUtils in Biopython

Spread the love

We can use Bio.Entrez to use the different EUtils at NCBI Entrez.

There are 9 utilities, and currently 8 of them can be accessed using Bio.Entrez. The 9th is the most recent, ECitMatch. Other than using Biopython, you can also use HTML requests with appropriate query term, name of EUtil, etc. It can return data as XML, Python object, etc.

Before going into details of the different EUtils, this program just lists some documentation. You can get complete documentation by removing 2 from docL term, in which case it will print all the lines.

# bpy11.py

from __future__ import print_function, division
from Bio import Entrez

eUtils = [e for e in Entrez.__dict__ if e[0]=='e' and e != 'email']
for i,eUtil in enumerate(eUtils):
print('%d.%s' % (i+1,eUtil))
exec('doc=Entrez.%s.__doc__' % eUtil)
docL = doc.split('n')

#ESpell retrieves spelling suggestions, returned in a results handle.
#EGQuery provides Entrez database counts for a global search.
#ESummary retrieves document summaries as a results handle.
#Fetches Entrez results which are returned as a handle.
#ESearch runs an Entrez search and returns a handle to the results.
#ELink checks for linked external articles and returns a handle.
#EInfo returns a summary of the Entez databases as a results handle.
#Post a file of identifiers for future use.

Leave a Reply

Your email address will not be published. Required fields are marked *