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 ~905k transcripts (vs ~141k in UTA v.20210129)

New

See changelog

2023-04-03:

  • #41 - Support for T2T CHM13v2.0

2023-03-31:

  • #31 - Fasta file Biocommons HGVS SeqFetcher implementation
  • #38 - bugfix for Biocommons HGVS get_tx_for_region

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.14.refseq.grch37.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)

more Biocommons examples:

PyHGVS example:

import pyhgvs
from pysam.libcfaidx import FastaFile
from cdot.pyhgvs.pyhgvs_transcript import JSONPyHGVSTranscriptFactory, RESTPyHGVSTranscriptFactory

genome = FastaFile("/data/annotation/fasta/GCF_000001405.25_GRCh37.p13_genomic.fna.gz")
factory = RESTPyHGVSTranscriptFactory()
# factory = JSONPyHGVSTranscriptFactory(["./cdot-0.2.14.refseq.grch37.json.gz"])  # Uses local JSON file
pyhgvs.parse_hgvs_name('NM_001637.3:c.1582G>A', genome, get_transcript=factory.get_transcript_grch37)

more PyHGVS examples:

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?

Download from GitHub releases - RefSeq (37/38) - 72M, Ensembl (37/38) 61M

Details on what the files contain here

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.

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.15.tar.gz (15.2 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.15-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cdot-0.2.15.tar.gz
Algorithm Hash digest
SHA256 b8df9120e209d2d4b352111f3971d1a8df8731595282dd19e681e614061a6af6
MD5 a0ef95e787e05fd29b439a7ae150dd61
BLAKE2b-256 a9a015597198dd3ae07f707f157414226e3b7ae7583375826af96094124155a5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cdot-0.2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 07779b0a0178605d859d5041e8a59977f19f211d481122c47c15cc2bab2b363e
MD5 1552d0a047d99dbee7230c00b70de881
BLAKE2b-256 c39240bde10e649b8435aac6ca23563e1fa0a0072c33df2770efa4d79047906b

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