3 releases
new 0.0.5 | May 10, 2025 |
---|---|
0.0.4 | May 4, 2025 |
0.0.3 | Apr 13, 2025 |
0.0.2 |
|
0.0.1 |
|
#68 in Biology
378 downloads per month
290KB
7K
SLoC
Terminal Genome Viewer
https://github.com/user-attachments/assets/405fa5fb-bd65-4d0c-b922-5b6cb7784c69
TGV is at a very early stage so expect bugs. Please don't rely on it for your papers (yet) :)
Contribution and bug reports are welcome! Join our Discord to discuss ideas.
Installation
- cargo (recommended):
cargo install tgv
- brew:
brew install zeqianli/tgv/tgv
- Pre-built binaries: Github releases
Quick start
# Browse the hg38 human genome (internet needed). See FAQ for some interesting genome regions.
# (If you are in Europe, use `tgv --host eu`)
tgv
# Or your favorite genome (see `tgv --list` or `tgv --list-more`)
tgv -g cat
:q
: Quith/j/k/l/y/p
: Left / down / up / right / faster left / faster rightW/B/w/b
: Next gene / previous gene / next exon / previous exonz/o
: Zoom in / out:_gene_
: Go to gene: (e.g.:TP53
):_chr_:_position_
: Go to a chromosome position (e.g.:1:2345
)_number_
+_movement_
: Repeat movements (e.g.20B
: left by 20 genes):ls
: Switch chromosomes.
# View BAM file aligned to the hg38 human reference genome
tgv sorted.bam
# View a indexed remote BAM, starting at TP53, using the hg19 reference genome
tgv s3://my-bucket/sorted.bam -r TP53 -g hg19
# BAM file with no reference genome
tgv non_human.bam -r 1:123 --no-reference
FAQ
-
Why?
Browsing alignment files to compare sequences is essential for genomics research. Omics research is often in the terminal (SSH session to HPCs or the cloud). IGV is popular but cumbersome for remote sessions. Terminal-based applications (1, 2) are not as feature-rich.
Rust bioinformatics community is super vibrant (3, 4) and Ratatui makes powerful terminal UIs. So TGV is born!
-
How to quit TGV?
Just like vim :) PressEsc
to ensure you're in normal mode, then type:q
and press Enter.
Some interesting genome regions
tgv -r 12:25245351
: One of the most prevalent and most studied mutation sites in cancer [1]tgv -r 11:6868417
: Mutations here make you less likely to hate cilantro [2]. And you can test your baby for it! [3]tgv -g GCF_000005845.2
: Arguably the most researched organism (E. coli K-12 substr. MG1655). Note how compact it is compared to the human genome? [4]tgv -g covid -r NC_045512v2:21563
: The spike protein in SARS-CoV-2 [5]
Acknowledgements
Dependencies
~34–55MB
~876K SLoC