Skip to main content

GeneThesaurus is a Python package that translates gene aliases and old gene symbols to the current HGNC standard gene symbols.

Project description

GeneThesaurus v2.0.0

GeneThesaurus is a Python package that translates between different gene standards using publicly available data from HGNC.

Presently, GeneThesaurus supports translating:

  • gene aliases and old gene symbols to the current HGNC standard gene symbols
  • gene symbols to ensembl identifiers

Please get in touch (or consider submitting a pull request to this project) if you need translation between other formats.

Installation

You can install GeneThesaurus with:

pip install gene-thesaurus

Example usage

from gene_thesaurus import GeneThesaurus
gt = GeneThesaurus(data_dir='/tmp')

outdated_gene = 'TNFSF2'
up_to_date_gene = 'ETV6'
fake_gene = 'NOTAREALGENE'
input = [outdated_gene, up_to_date_gene, fake_gene]

#############################
### update_gene_symbols() ###
#############################

updated_genes = gt.update_gene_symbols(input)
print(updated_genes)
# {'TNFSF2': 'TNF'}

#########################
### translate_genes() ###
#########################

translated_genes = gt.translate_genes(input, source='symbol', target='ensembl_id')
print(translated_genes)
{'TNFSF2': 'ENSG00000232810', 'ETV6': 'ENSG00000139083'}

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

gene-thesaurus-2.0.0.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file gene-thesaurus-2.0.0.tar.gz.

File metadata

  • Download URL: gene-thesaurus-2.0.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for gene-thesaurus-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b87aeb846a473ff3ffd460b51edf5c32b5738f71a1eb109c69dbaa2b3088a2da
MD5 92d4fae7b6d94fa02d01e900cc2c661d
BLAKE2b-256 7f07c359b493b3fc205cfe78eececdf25c2b91429c6453c72b8b7bc42fd9b3a9

See more details on using hashes here.

Supported by

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