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 created this package because there is a lack of simple developer tools to convert between the numerous 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).
There is an need to be able to perform these conversions quickly. Since I last checked, current python tools like biopython lack a complete solution to this issue.
Quick Start
$ pip install --upgrade pyEntrezId
Examples
Convert 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
Convert HGNC ID to Entrez Gene Id
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
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
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
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.
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.5.tar.gz
.
File metadata
- Download URL: PyEntrezId-1.5.5.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ce3a0dc56c92c64da3944dea3230ba23df0ab8c5fd47f05a535e28f8bd2e078 |
|
MD5 | 5dc6e62025f0f42ecb7af30afe6366e9 |
|
BLAKE2b-256 | d7bac33e0529e78c2cdd88c0f69853817bd2435dd57d0a7e24d4679c37e9eefd |