Skip to main content

A Python compiler to map UCSC Track Hub configurations to Gosling.js specs.

Project description

hub2gos

PyPI Version Supported Python Versions License

Transpiler to map a UCSC Trackhub configuration to a Gosling spec

Input Data Specifications & Compression Rules

When converting a UCSC Track Hub configuration using hub2gos, input data URLs must adhere strictly to the coordinate streaming capabilities of modern web browsers. In addition, some UCSC Track Hub file types are not compatible and must have an alternate file path under the gos_url property that will be used to read the data into Gosling instead. Otherwise the transpiler will use the bigDataUrl property instead.

Supported Formats & Compression Matrices

UCSC Track Type Expected File Suffix(es) gos_url file? Tabix Index Required? Work-in-progress?
BAM .bam No Yes (.bam.bai) Yes
BigBed .bb, .bigbed .bed.gz Yes (BGZF-formatted .tbi) No
BigInteract .bi, .bigInteract "beddb" HiGlass tileset No No
BigWig .bw, .bigwig No No No
HiC .hic "cooler" HiGlass tileset No No
VCF .vcf.gz No Yes (BGZF-formatted .tbi) Yes

⚠️ Performance Note on BAM Tracks: While natively supported by Gosling, rendering BAM files over a broad genomic coordinate range can degrade client-side performance. For better performance, consider converting BAM files to BigWig (for depth density) or BigBed/BED (for structural mutations) during your server pipeline staging.

Crucial Constraints

None of these contraints will prevent you from generating the Gosling spec JSON. They will however prevent you from streaming the data in the Gosling viewer.

  1. Plaintext Text Files: Uncompressed tabular streams (e.g., raw .bed or .vcf text targets) are unsupported for chunked client-side streaming. Text tracking formats must be block-gzipped using bgzip before indexing. Documentation on bgzip
  2. Alternative Compressors: High-ratio archival compressors such as bzip2 (.bz2) or xz (.xz) are completely unsupported. These engines do not produce block-level byte partitions, making selective genomic coordinate slicing over network requests impossible.
  3. For any track type that recommends serving files on a HiGlass server, you can peruse the HiGlass documentation to learn how to set up a HiGlass server, aggregate files with Clodius, and ingest them into HiGlass.

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

hub2gos-0.1.1.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

hub2gos-0.1.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file hub2gos-0.1.1.tar.gz.

File metadata

  • Download URL: hub2gos-0.1.1.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for hub2gos-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d7b4266178cf9ab1d7ac7c8cad6bb4ffb566352446d1e88fd47dc91becddda07
MD5 6eda82bc2a95a3953529780992da30f3
BLAKE2b-256 a00a2da4e5cae5d6f69d5a17530b41586eef81dee309786edafd4c4556b98cb6

See more details on using hashes here.

File details

Details for the file hub2gos-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hub2gos-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for hub2gos-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4caec5240185e90ee59d4eb2d0f8f0b807074d6c12afcdf06057e8e29ecf79b9
MD5 61cec8191f556f0a4c7f28368a1d4fc8
BLAKE2b-256 121aa6caf9bb9630b7d251bc63dbfb15199f9fe563fe7bcf9423550c77792072

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