CLI library to generate UCSC trackhubs from sequencing data
Project description
TrackNado
TrackNado builds UCSC Genome Browser track hubs from local track files and a small table of metadata. Use it when you want a repeatable way to stage bigWig, bigBed, BAM, and annotation tracks for a UCSC hub.
The command-line interface is the simplest way to start. The Python API exposes the same build steps for pipelines and scripts.
Install
pip install tracknado
Build a hub
This example creates a hub for four tracks on hg38.
-
Make an editable metadata table from the files:
tracknado design \ -i tracks/*.bw \ -i tracks/*.bb \ -o tracks.csv
-
Edit
tracks.csv. Every row is one track.file_pathis required; the other columns describe how the track should appear in the browser.file_path,name,ext,assay,cell_type,color tracks/k562_ctcf.bw,K562 CTCF,bigWig,ChIP-seq,K562,crimson tracks/gm12878_ctcf.bw,GM12878 CTCF,bigWig,ChIP-seq,GM12878,#4169E1 tracks/k562_atac.bw,K562 ATAC,bigWig,ATAC-seq,K562,darkorange tracks/peaks.bb,Called peaks,bigBed,Peaks,All,#464646
-
Build and stage the hub:
tracknado create \ --metadata tracks.csv \ --output my_hub \ --hub-name project_tracks \ --hub-email you@example.org \ --genome-name hg38 \ --subgroup-by assay \ --subgroup-by cell_type
-
Check the staged hub:
tracknado validate my_hub
my_hub now contains project_tracks.hub.txt, the genome and trackDb files, copied track files, and tracknado_config.json. Publish that directory through a web server, then give UCSC the URL to the .hub.txt file.
Common changes
- Add a top-level folder-like grouping:
--supergroup-by assay. - Give tracks colours from a categorical metadata field:
--color-by cell_type. - Combine related signal tracks in one display:
--overlay-by condition. - Convert BED, GTF, or GFF inputs while building: add
--convert --chrom-sizes hg38.chrom.sizes. - Build an assembly hub for a private genome: add
--custom-genome --twobit reference.2bit --organism "Species name".
See the documentation for the complete walkthrough, metadata rules, track layouts, and Python examples.
Python API
import pandas as pd
import tracknado as tn
tracks = pd.read_csv("tracks.csv")
hub = (
tn.HubBuilder()
.add_tracks_from_df(tracks)
.group_by("assay", "cell_type")
.build(
name="project_tracks",
genome="hg38",
outdir="my_hub",
hub_email="you@example.org",
)
)
hub.stage_hub()
License
TrackNado is distributed 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tracknado-0.3.2.tar.gz.
File metadata
- Download URL: tracknado-0.3.2.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2de9d4d8e7e4d210305b90e7871675d05915d83e1e2c7626870769dc73acf52a
|
|
| MD5 |
d276c851bf624ecb2adeb7e8ba34ac3b
|
|
| BLAKE2b-256 |
2c576ade7ac2ac0a918fc37adff14a9cfb918814a339fc2b9e9943bda74336f2
|
Provenance
The following attestation bundles were made for tracknado-0.3.2.tar.gz:
Publisher:
python-publish.yml on alsmith151/TrackNado
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tracknado-0.3.2.tar.gz -
Subject digest:
2de9d4d8e7e4d210305b90e7871675d05915d83e1e2c7626870769dc73acf52a - Sigstore transparency entry: 2212058814
- Sigstore integration time:
-
Permalink:
alsmith151/TrackNado@6ee2e92dbd566fb840736da567eef403338cd8aa -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/alsmith151
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6ee2e92dbd566fb840736da567eef403338cd8aa -
Trigger Event:
release
-
Statement type:
File details
Details for the file tracknado-0.3.2-py3-none-any.whl.
File metadata
- Download URL: tracknado-0.3.2-py3-none-any.whl
- Upload date:
- Size: 40.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9618edc71a15d3c13ef2bf8e63d7116677b251f893297d4391ba5739f3b6a0a5
|
|
| MD5 |
9a0238bf9a4d3240ead258895290b42a
|
|
| BLAKE2b-256 |
056be041374d08f37304ce0349562fed8e4a69a975d8d443251dcf7c381bf6f7
|
Provenance
The following attestation bundles were made for tracknado-0.3.2-py3-none-any.whl:
Publisher:
python-publish.yml on alsmith151/TrackNado
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tracknado-0.3.2-py3-none-any.whl -
Subject digest:
9618edc71a15d3c13ef2bf8e63d7116677b251f893297d4391ba5739f3b6a0a5 - Sigstore transparency entry: 2212058834
- Sigstore integration time:
-
Permalink:
alsmith151/TrackNado@6ee2e92dbd566fb840736da567eef403338cd8aa -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/alsmith151
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6ee2e92dbd566fb840736da567eef403338cd8aa -
Trigger Event:
release
-
Statement type: