Converts UniProt, HGNC, and Ensembl Transcript Ids to Entrez Gene Id. Also, converts accession number to Taxonomy id
Project description
PyEntrezId
==========
.. 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
.. image:: https://img.shields.io/pypi/v/nine.svg?maxAge=2592000
:target: https://pypi.python.org/pypi?:action=display&name=pyEntrezId&version=1.5.0
.. image:: https://coveralls.io/repos/github/lwgray/pyEntrezId/badge.svg?branch=master
:target: https://coveralls.io/github/lwgray/pyEntrezId?branch=master
.. image:: https://travis-ci.org/lwgray/pyEntrezId.svg?branch=master
:target: https://travis-ci.org/lwgray/pyEntrezId
Quick Start
-----------
::
$ pip install --upgrade pyEntrezId
Example Code 1
--------------
Converts Ensemble Transcript Gene Id to Entrez Gene Id ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Example Code 2
--------------
Converts HGNC ID to Entrez Gene Id ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from PyEntrezId import Conversion
HGNCID = 9245 # hgncid ca 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
Example Code 3
--------------
Converts Entrez Gene Id to Uniprot ID ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Example Code 4
--------------
Converts Uniprot Id to Entrez Gene Id ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Example Code 5
--------------
Converts Accession Id to Taxonomy Id ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
==========
.. 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
.. image:: https://img.shields.io/pypi/v/nine.svg?maxAge=2592000
:target: https://pypi.python.org/pypi?:action=display&name=pyEntrezId&version=1.5.0
.. image:: https://coveralls.io/repos/github/lwgray/pyEntrezId/badge.svg?branch=master
:target: https://coveralls.io/github/lwgray/pyEntrezId?branch=master
.. image:: https://travis-ci.org/lwgray/pyEntrezId.svg?branch=master
:target: https://travis-ci.org/lwgray/pyEntrezId
Quick Start
-----------
::
$ pip install --upgrade pyEntrezId
Example Code 1
--------------
Converts Ensemble Transcript Gene Id to Entrez Gene Id ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Example Code 2
--------------
Converts HGNC ID to Entrez Gene Id ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from PyEntrezId import Conversion
HGNCID = 9245 # hgncid ca 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
Example Code 3
--------------
Converts Entrez Gene Id to Uniprot ID ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Example Code 4
--------------
Converts Uniprot Id to Entrez Gene Id ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Example Code 5
--------------
Converts Accession Id to Taxonomy Id ::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Release history Release notifications | RSS feed
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.1.tar.gz
(3.3 kB
view hashes)