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
TRviz requires MAFFT.
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 .
Motivation
There have been many approaches to visualize the variations in tandem repeats. However, there is no tool available for that. TRViz automatically decompose tandem repeat sequence into motifs, and align the decomposed motifs, and finally generate a plot to show the aligned motifs.
Input
- Tandem repeat sequences in FASTA format
- A set of motifs for decomposition
Output
- Motif map, a set of motifs detected in the samples and their labels and frequencies
- Aligned and labeled motifs
- Plot showing the motif composition of the input sequences
- Plot mapping color to the motif sequences
Code samples and examples
TRviz has four modules:
- Decomposition
- Encoding
- Alignment
- Visualization
See full documentation at readthedocs
Generating a TR 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"]
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-0.1.2.tar.gz
.
File metadata
- Download URL: trviz-0.1.2.tar.gz
- Upload date:
- Size: 673.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d18ea6b427a466b8a38724bc4b25c8668ec668515f501ff198a6aaee9e6fd0e |
|
MD5 | a64293d3134329e859cf81734d3ace26 |
|
BLAKE2b-256 | 4cb887f203a4349dbd3272e4aaf3b5563b8f03cd293afd124d92c06be3134025 |
File details
Details for the file trviz-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: trviz-0.1.2-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8af48cec22ff54e5f6fb3c7f5d2cb9acf7ce5db3c974fd5a42b7fd5e16c309cb |
|
MD5 | 18e120687ea07df818feeacf2a778794 |
|
BLAKE2b-256 | 12f8baa7b6f727b91a5ddc00ce68948dd4bd774da31a0a8c09efcbc71e17bc28 |