A python library for decomposing and visualizing tandem repeat sequences
Project description
_______ _______ _______ ______
|__ __| __ \ \ / /_ _|___ /
| | | |__) \ \ / / | | / /
| | | _ / \ \/ / | | / /
| | | | \ \ \ / _| |_ / /__
|_| |_| \_\ \/ |_____/_____|
TRviz is a python library for analyzing tandem repeat sequences. TRviz includes modules for decomposing, encoding, aligning, and visualizing tandem repeat sequences.
Full documentation is available at readthedocs
Overview of TRviz
Getting Started
Prerequisite
Note TRviz requires MAFFT. Tested with MAFFT v7.505.
Install the library with pip or from source.
with pip
pip install trviz
from source
git clone https://github.com/Jong-hun-Park/trviz.git
cd trviz/
pip install .
Input
- Tandem repeat sequences (alleles)
- A set of motifs for decomposition
Output
- A plot showing the motif composition of the input sequences
- A plot mapping color to motif
- Aligned and labeled motifs
- Motif map, a set of motifs detected in the samples and their labels and frequencies
Code samples and examples
Note Please see the jupyter notebook for code examples.
TRviz has four modules:
- Decomposition
- Encoding
- Alignment
- Visualization
See full documentation at readthedocs
Generating a plot
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)
Motif decomposition
from trviz.decomposer import Decomposer
tr_decomposer = Decomposer()
tr_sequence = "ACCTTGACCTTGACCTTGACCTTG"
motifs = ["ACCTTG"]
tr_decomposer.decompose(tr_sequence, motifs)
# >>> ["ACCTTG", "ACCTTG", "ACCTTG", "ACCTTG"]
Citation:
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
Contact Us
Please submit an issue on the TRviz github
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
File details
Details for the file trviz-1.2.0.tar.gz
.
File metadata
- Download URL: trviz-1.2.0.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e03a32496d9cf291ec20cc76bc51c52cb210a558cf2e81fca4a1c51f8cf8fc8e |
|
MD5 | e26b22312240258a30a5da802ea011cf |
|
BLAKE2b-256 | 37f89c9bd08cc1aa54c6dddf04311f0d8befc1d3165f0d44c071838b715399d7 |
File details
Details for the file trviz-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: trviz-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 395.3 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8038822ca2f8c6115a4cb2ced985e03b8957eb60ac8cac8bff43dddd04300ea |
|
MD5 | 9696a1cfabffab278bbf957e12cb011d |
|
BLAKE2b-256 | 47970df7e74001a9ce0f7840224369c1a405fe058803c7c7601d7e565a61833d |