Plot transcript models for a gene from a GTF in the terminal.
Project description
txview
Terminal plotter for transcript models of a gene from a GTF annotation.
Install
Latest from main:
pip install "txview @ git+https://github.com/ymvk/monorepo@main#subdirectory=packages/txview"
Pin to a version tag:
pip install "txview @ git+https://github.com/ymvk/monorepo@txview-v0.1.0#subdirectory=packages/txview"
CLI
txview path/to/annotation.gtf BRCA1
Accepts .gtf or .gtf.gz. The gene may be specified by gene_name or
gene_id.
Flags:
| Flag | Default | Description |
|---|---|---|
--width |
terminal width - 30 | Display width in columns |
--intron-width |
5 | Columns reserved per truncated intron |
Example
BRCA1 [chr17:43044295-43125483] (-)
ENST00000357654 │████████████████████████████╌╌╌╌╌█╌╌╌╌╌█╌╌╌╌╌█╌╌╌╌╌██╌╌╌╌╌██╌╌╌╌╌██╌╌╌╌╌███████████████████████████◀
ENST00000471181 │████████████████████████████╌╌╌╌╌─╌╌╌╌╌─╌╌╌╌╌─╌╌╌╌╌██╌╌╌╌╌──╌╌╌╌╌──╌╌╌╌╌███████████████████████◀
ENST00000586385 │╌╌╌╌╌─╌╌╌╌╌█╌╌╌╌╌──╌╌╌╌╌██╌╌╌╌╌──╌╌╌╌╌█◀
Legend:
| Char | Meaning |
|---|---|
█ |
Exon |
─ |
Intron within a transcript's span (e.g. alternative splicing) |
╌ |
Truncated intron region (intergenic-like compression for display) |
▶ |
TSS (5' end) on + strand; ◀ on - strand |
│ |
TTS (3' end) |
Python API
from txview import parse_gtf, layout, render
transcripts = parse_gtf("annotation.gtf", "BRCA1")
segments, width = layout(transcripts, total_width=120, intron_width=5)
print(render(transcripts, segments, width))
parse_gtf returns dict[str, Transcript] keyed by transcript_id.
Project details
Release history Release notifications | RSS feed
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 txview-0.1.1.tar.gz.
File metadata
- Download URL: txview-0.1.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b0708dd3c93a05396faf9a38c099d53999236d78e50b39be860b4b4b7f28a79
|
|
| MD5 |
e9c3354d1125f9941e2f52b400996071
|
|
| BLAKE2b-256 |
94ae7ae66e19f741536f45c466fb927ce6eaf3788c21272e543146580fcfd583
|
File details
Details for the file txview-0.1.1-py3-none-any.whl.
File metadata
- Download URL: txview-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caae93893561f873b70ef133b82cdcead116cc16b979a553f4f2a9f5656e454c
|
|
| MD5 |
d39f64e8bf513588ae24b0ca9e157011
|
|
| BLAKE2b-256 |
9603d1797424618a8e8c5f3971f1638f6d794fa5341b9e38ccb4949ea8ea2102
|