Skip to main content

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

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

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 a simple developer tool 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).

I think this project is unique because it provides open access to the conversion code and has the singular goal of converting IDs.

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


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.7.tar.gz (3.8 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for PyEntrezId-1.5.7.tar.gz
Algorithm Hash digest
SHA256 ddc1e98b225e0daca8dc3776e77095321f7245e86a402e57da98225b12b4c98a
MD5 30d08f3e440b6a9850a33847cbe75b92
BLAKE2b-256 07215285cf07e197a7ff492a57bbb166fc470e53ba4c39a0bbaeb48c8c7d690d

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