Skip to main content

Converts UniProt, HGNC, and Ensembl Transcript Ids to Entrez Gene Id. Also, converts accession number to Taxonomy id

Project description

PyEntrezId
==========

Python package to convert between various gene or protein IDs

.. image:: https://travis-ci.org/lwgray/pyEntrezId.svg?branch=master
:target: https://travis-ci.org/lwgray/pyEntrezId
.. image:: https://coveralls.io/repos/github/lwgray/pyEntrezId/badge.svg?branch=master
:target: https://coveralls.io/github/lwgray/pyEntrezId?branch=master
.. image:: https://img.shields.io/pypi/v/pyEntrezId.svg
:target: https://pypi.python.org/pypi/pyEntrezId
.. image:: https://img.shields.io/pypi/pyversions/PyEntrezId.svg
:target: https://pypi.python.org/pypi/PyEntrezId
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://raw.githubusercontent.com/lwgray/lwgray/pyEntrezId/master/LICENSE

Quick Start
-----------

::

$ pip install --upgrade pyEntrezId

Examples
--------

Convert Ensemble Transcript Gene Id to Entrez Gene Id
-----------------------------------------------------

.. code:: python
from PyEntrezId import Conversion

EnsemblId = 'ENST00000407559'
Id = Conversion('sampleemail@nih.gov') #include your email address
EntrezId = Id.convert_ensembl_to_entrez(EnsemblId)
print(EntrezId) # Returns a String


Convert HGNC ID to Entrez Gene Id
---------------------------------

.. code:: python
from PyEntrezId import Conversion

HGNCID = 9245 # HGNCID can be just the number or 'HGNC:9425'
Id = Conversion('sampleemail@nih.gov') # include your email address
EntrezId = Id.convert_hgnc_to_entrez(HGNCID)
print EntrezID # Returns a dictionary containing Symbol and Entrez Id


Convert Entrez Gene Id to Uniprot ID
------------------------------------

.. code:: python
from PyEntrezId import Conversion

EntrezID = 39
Id = Conversion('sampleemail@nih.gov') #include your email address
UniProtId = Id.convert_entrez_to_uniprot(EntrezID)
print UniProtId # Returns a string


Convert Uniprot Id to Entrez Gene Id
------------------------------------

.. code:: python
from PyEntrezId import Conversion

UniProtId = 'Q9BWD1'
Id = Conversion('sampleemail@nih.gov') #include your email address
EntrezID = Id.convert_uniprot_to_entrez(UniProtId)
print EntrezID # Returns a string


Convert Accession Id to Taxonomy Id
-----------------------------------

.. code:: python
from PyEntrezId import Conversion

AccessionId = 'AC131209'
Id = Conversion('sampleemail@nih.gov') #include your email address
TaxID = Id.convert_accesion_to_taxid(AccesionId)
print TaxID # Returns a string

Contributing
------------

Contributions to this library are always welcome and highly encouraged.

See 'CONTRIBUTING'_ for more information on how to get started.

.. _CONTRIBUTING: https://github.com/lwgray/PyEntrezId/blob/master/CONTRIBUTING.rst

License
-------

The MIT License (MIT)

.. _LICENSE: https://github.com/lwgray/PyEntrezID/blob/master/LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyEntrezId-1.5.3.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file PyEntrezId-1.5.3.tar.gz.

File metadata

  • Download URL: PyEntrezId-1.5.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyEntrezId-1.5.3.tar.gz
Algorithm Hash digest
SHA256 e18adf78f141786d6820769441addf83d54a57476a6c185320ba4dc6119ba63a
MD5 585346753f8ffb375a35221bd518ad8a
BLAKE2b-256 a7f4b1b5acf029f0d234ebcfff7634deb09fc9332fd9887a3fb8002e8802ccef

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page