Skip to main content

Transcripts for HGVS libraries

Project description

cdot

PyPi version Python versions

cdot provides transcripts for the 2 most popular Python HGVS libraries.

It works by:

  • Converting RefSeq/Ensembl GTFs to JSON
  • Providing loaders for the HGVS libraries, via JSON.gz files, or REST API via cdot_rest)

We currently support ~893k transcripts (vs ~141k in UTA v.20210129)

New in 0.2.8 - 2022-08-29

Install

pip install cdot

Examples

Biocommons HGVS example:

import hgvs
from hgvs.assemblymapper import AssemblyMapper
from cdot.hgvs.dataproviders import JSONDataProvider, RESTDataProvider

hdp = RESTDataProvider()  # Uses API server at cdot.cc
# hdp = JSONDataProvider(["./cdot-0.2.8.refseq.grch38.json.gz"])  # Uses local JSON file

am = AssemblyMapper(hdp,
                    assembly_name='GRCh37',
                    alt_aln_method='splign', replace_reference=True)

hp = hgvs.parser.Parser()
var_c = hp.parse_hgvs_variant('NM_001637.3:c.1582G>A')
am.c_to_g(var_c)

PyHGVS example:

from cdot.pyhgvs.pyhgvs_transcript import JSONPyHGVSTranscriptFactory, RESTPyHGVSTranscriptFactory

factory = RESTPyHGVSTranscriptFactory()
# factory = JSONPyHGVSTranscriptFactory(["./cdot-0.2.8.refseq.grch38.json.gz"])  # Uses local JSON file
pyhgvs.parse_hgvs_name(hgvs_c, genome, get_transcript=factory.get_transcript_grch37)

Q. What's the performance like?

  • UTA public DB: 1-1.5 seconds / transcript
  • cdot REST service: 10/second
  • cdot JSON.gz: 500-1k/second

Q. Where can I download the JSON.gz files?

RefSeq 37+38 - 70Mb Ensembl 37+38 - 53Mb

See also Download JSON.gz files if you only want individual builds.

Q. How does this compare to Universal Transcript Archive?

Both projects have similar goals of providing transcripts for loading HGVS, but they approach it from different ways

  • UTA aligns sequences, then stores coordinates in an SQL database.
  • cdot convert existing Ensembl/RefSeq GTFs into JSON

See wiki for more details

Q. How do you store transcripts in JSON?

See wiki page for the format.

We think a standard for JSON gene/transcript information would be a great thing, and am keen to collaborate to make it happen!

Q. What does cdot stand for?

cdot, pronounced "see dot" stands for Complete Dict of Transcripts

This was developed for the Australian Genomics Shariant project, due to the need to load historical HGVS from lab archives.

Q. Have you fully implemented the HGVS data provider interface?

We are working on it. The remaining functionality is:

Method Status Issue
get_tx_for_gene Local JSON file only REST API for get_tx_for_gene
get_tx_for_region Local JSON file only REST API for get_tx_for_region
get_acs_for_protein_seq Not implemented Implement get_acs_for_protein_seq
get_gene_info Not implemented Implement get_gene_info
get_similar_transcripts Not implemented Implement get_similar_transcripts

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

cdot-0.2.9.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdot-0.2.9-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file cdot-0.2.9.tar.gz.

File metadata

  • Download URL: cdot-0.2.9.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for cdot-0.2.9.tar.gz
Algorithm Hash digest
SHA256 ec86172d20a683051c8902df0a1f563f4aa96464332c7525b137a6f3d7c03d50
MD5 cb85e7a3a39a3c830fb45b4a5ab5f665
BLAKE2b-256 dbeef890f3499ba1dd982d79757a7800fee7e82c526f3041e920b36e92033727

See more details on using hashes here.

File details

Details for the file cdot-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: cdot-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for cdot-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d17e9aaee3f6fffacc5a048cd9bd2a7472a88a277b18a1535b69308c7fc6b882
MD5 b617d2a23d0d689b76fe34cc449479e9
BLAKE2b-256 846787a45c8c56165aa946ac2d6fe78b3ca384b4201e5c6b249ad164930fb7ec

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