_______ _______ _______ ______
|__ __| __ \ \ / /_ _|___ /
| | | |__) \ \ / / | | / /
| | | _ / \ \/ / | | / /
| | | | \ \ \ / _| |_ / /__
|_| |_| \_\ \/ |_____/_____|
TRviz is a python library for analyzing tandem repeat sequences. TRviz includes modules for decomposing, encoding, aligning, and visualizing tandem repeat sequences.
Note Before getting started, ensure you have MAFFT. The current version is tested with MAFFT v7.505.
# Install with pip
pip install trviz
or
# Install from source
git clone https://github.com/Jong-hun-Park/trviz.git
cd trviz/
pip install .
Check out our Jupyter Notebook for code examples and start visualizing tandem repeat sequence right away!
Use pip for a quick installation, or install from source for more control.
pip install trviz
or
# Install from source
git clone https://github.com/Jong-hun-Park/trviz.git
cd trviz/
pip install .
- Tandem repeat sequences (alleles)
- A set of motifs for decomposition
- A plot showing the motif composition of the input sequences (pdf by default)
- A plot mapping color to motif (pdf by default)
- Aligned and labeled motifs (text file)
- Motif map, a set of motifs detected in the samples and their labels and frequencies (text file)
For more detailed descriptions, please see full documentation at readthedocs
from trviz.main import TandemRepeatVizWorker
from trviz.utils import get_sample_and_sequence_from_fasta
tr_visualizer = TandemRepeatVizWorker()
sample_ids, tr_sequences = get_sample_and_sequence_from_fasta(fasta_file_path)
tr_id = "CACNA1C"
motifs = ['GACCCTGACCTGACTAGTTTACAATCACAC']
tr_visualizer.generate_trplot(tr_id, sample_ids, tr_sequences, motifs)
from trviz.decomposer import Decomposer
tr_decomposer = Decomposer()
tr_sequence = "ACCTTGACCTTGACCTTGACCTTG"
motifs = ["ACCTTG"]
tr_decomposer.decompose(tr_sequence, motifs)
# >>> ["ACCTTG", "ACCTTG", "ACCTTG", "ACCTTG"]
Jonghun Park, Eli Kaufman, Paul N Valdmanis, Vineet Bafna, TRviz: a Python library for decomposing and visualizing tandem repeat sequences, Bioinformatics Advances, Volume 3, Issue 1, 2023, vbad058
Your feedback is valuable! If you encounter any issues during installation or usage, please submit them in the TRviz GitHub Issues.