Converts UniProt, HGNC, and Ensembl Transcript Ids to Entrez Gene Id. Also, converts accession number to Taxonomy id
Project description
Python package to convert between various gene or protein IDs
Summary
This is the first package I am releasing into the wild. Any feedback would be greatly appreciated! I hope this project can be used as an example for beginners on how to structure/code a simple bioinformatics tool.
I created this package because I needed a simple tool to convert between the multitude of IDs used to identify genes, proteins, etc… This is important because databases hosted by various scientific institutions (NIH, EMBL, etc) sometimes have different nomenclature to describe the same exact thing(gene, protein, dna, rna, etc).
Links to Discussion
Reddit: <https://www.reddit.com/r/bioinformatics/comments/4icres/new_bioinformatics_python_package_to_easily/>
Quick Start
$ pip install --upgrade pyEntrezId
Examples
Convert Ensemble Transcript Gene Id to Entrez Gene Id
from PyEntrezId import Conversion
EnsemblId = 'ENST00000407559'
# include your email address
Id = Conversion('dummyemail@dummybunny.info')
EntrezId = Id.convert_ensembl_to_entrez(EnsemblId)
# Returns a string
print(EntrezId)
Convert HGNC ID to Entrez Gene Id
from PyEntrezId import Conversion
# HGNCID can be just the number or 'HGNC:9425'
HGNCID = 9245
# include your email address
Id = Conversion('dummyemail@dummybunny.info')
EntrezId = Id.convert_hgnc_to_entrez(HGNCID)
# Returns a dictionary containing Symbol and Entrez Id
print EntrezID
Convert Entrez Gene Id to Uniprot ID
from PyEntrezId import Conversion
EntrezID = 39
# include your email address
Id = Conversion('dummyemail@dummybunny.info')
UniProtId = Id.convert_entrez_to_uniprot(EntrezID)
# Returns a string
print UniProtId
Convert Uniprot Id to Entrez Gene Id
from PyEntrezId import Conversion
UniProtId = 'Q9BWD1'
# include your email address
Id = Conversion('dummyemail@dummybunny.info')
EntrezID = Id.convert_uniprot_to_entrez(UniProtId)
# Returns a string
print EntrezID
Convert Accession Id to Taxonomy Id
from PyEntrezId import Conversion
AccessionId = 'AC131209'
# include your email address
Id = Conversion('dummyemail@dummybunny.info')
TaxID = Id.convert_accesion_to_taxid(AccesionId)
# Returns a string
print TaxID
Contributing
Contributions to this library are always welcome and highly encouraged.
See CONTRIBUTING for more information on how to get started.
License
The MIT License (MIT) - See LICENSE for more information.
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
File details
Details for the file PyEntrezId-1.5.8.tar.gz
.
File metadata
- Download URL: PyEntrezId-1.5.8.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 746d335e2e93b8b5c448dadeec686d53cd8818435fa92d7ef31b2b959c7140b9 |
|
MD5 | c66c1c93ae98058755abf5ae48a3a21e |
|
BLAKE2b-256 | 549a0e36b65ac150980837d9ca24cd73590b927ae75469a73cc16d1ecd8f12ea |