Skip to main content

CLI library to generate UCSC trackhubs from sequencing data

Project description

TrackNado 🌪️

Documentation License: GPL v3 Python 3.7+

TrackNado is a powerful Python library and CLI tool designed to rapidly generate complex UCSC Genome Browser track hubs. It handles the "heavy lifting" of metadata extraction, multi-dimensional groupings, and automated file conversion, letting you focus on the science.


🚀 Key Features

  • Fluent Python API: A declarative HubBuilder for intuitive and reproducible hub construction.
  • Automated Conversion: Built-in, container-backed conversion for BED → bigBed and GTF/GFF → bigGenePred (with codon display).
  • Custom Genomes (Assembly Hubs): Deep support for private assemblies with .2bit integration.
  • Multi-Dimensional Grouping: Seamlessly create SuperTracks, CompositeTracks (matrix display), and OverlayTracks.
  • Universal Metadata: Extract metadata from filenames, parent directories, or external CSV/TSV tables.
  • Smart Merging: Combine multiple projects into a single unified hub via sidecar JSON configurations.
  • Type Safety: Fully validated by Pydantic and Pandera.

📦 Installation

pip install tracknado

TrackNado will automatically attempt to use UCSC tools from your $PATH. If not found, it can automatically pull and run them via Docker or Apptainer.


🛠️ Quick Start (CLI)

The CLI is powered by Typer and provides a modern, colorized experience with rich help strings.

1. Generate a Metadata Template

tracknado create --template tracks.csv

2. Create a Hub

tracknado create \
  --metadata tracks.csv \
  --output ./my_hub \
  --genome-name hg38 \
  --subgroup-by cell_type \
  --subgroup-by assay \
  --convert \
  --chrom-sizes hg38.chrom.sizes

3. Create a Custom Assembly Hub

tracknado create \
  -i tracks/*.bw \
  --output ./custom_hub \
  --custom-genome \
  --twobit reference.2bit \
  --organism "MySpecies"

🐍 Quick Start (Python API)

TrackNado’s fluent API makes complex hubs readable and maintainable.

import tracknado as tn

# Build a multi-dimensional hub with one statement
builder = (
    tn.HubBuilder()
    .add_tracks(['data/peaks.bed', 'data/signal.bw'])
    .with_metadata_extractor(tn.from_seqnado_path)
    .group_by('assay', as_supertrack=True)  # Signal vs Peaks folders
    .group_by('cell_type', 'condition')     # Matrix display
    .color_by('condition', palette='hls')
    .with_convert_files()
    .with_chrom_sizes("hg38.chrom.sizes")
)

# Build and Stage
hub = builder.build(
    name="Scientific_Project",
    genome="hg38",
    outdir="hub_out/",
    hub_email="scientist@lab.edu",
    description_html="docs/project_summary.html"
)

hub.stage_hub()

🔍 Validation

Never host a broken hub again. TrackNado includes a built-in structural validator and support for the official UCSC hubCheck.

tracknado validate my_hub/

📖 Learn More

For full documentation, example metadata tables, and API references, visit: 👉 Documentation Portal

📄 License

TrackNado is released under the GNU General Public License v3.

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

tracknado-0.3.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

tracknado-0.3.1-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file tracknado-0.3.1.tar.gz.

File metadata

  • Download URL: tracknado-0.3.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tracknado-0.3.1.tar.gz
Algorithm Hash digest
SHA256 f91a50fc6b7031b5a1ce954195c5b0f56442ce838712ac83f07a1fe27395c678
MD5 4040b9308c192b952e0ff51800782b90
BLAKE2b-256 47cb17fc2124daec3501f4cd9d3d0b561f075eb7014c0b702df63282aaeb078c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracknado-0.3.1.tar.gz:

Publisher: python-publish.yml on alsmith151/TrackNado

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tracknado-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: tracknado-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tracknado-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27d7866c75ddec13c5df1d9b0b0bf3d439c07a69b0a28002c35a493f732a6e1b
MD5 afc8a8e2f39fb35bf2c91de66d857ffe
BLAKE2b-256 a54088671092848025d3f3d809b35a4b5abe66684ace7f58569e39a07f82ae7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracknado-0.3.1-py3-none-any.whl:

Publisher: python-publish.yml on alsmith151/TrackNado

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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