Accessing Life Science Web Services from Python

In a previous post, I started to discuss about Web Services in Life Science and what a maze it is to navigate between them.

Some Web Services provides Python code to access to their databases but not all of them. Besides the proposed code may be just a subset of what you need or simply not homogeneous.

I wrote a Python package called BioServices (with the help of other people; see link below) that allows an easy access to some major Web Services including uniprot, kegg, psicquic.

If you are interested, please visit the main page hosted on Pypi: https://pypi.python.org/pypi/bioservices/

As an example, here is an example on how to access to the uniprot web services to retrieve the unique identifier of a protein known by its gene name (MEK1) only:

>>> from bioservices import UniProt
>>> u = UniProt()
>>> d = u.quick_search("MEK1+and+taxonomy:human", limit=5)
>>> for entry in d.keys():
...    print("Entry name: %s, d[entry][Entry name"])
MP2K2_HUMAN
MP2K1_HUMAN
WNK2_HUMAN
BIRC6_HUMAN
MK03_HUMAN
Please follow and like us:
This entry was posted in biology, Life Science and tagged , , , , . Bookmark the permalink.

Leave a Reply

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