This repository contains a Tandem Repeat Visualization Tool that serves as the companion tool to TandemTwister. The tool processes Variant Call Format (VCF) files generated by TandemTwister and visualize tandem repeats in an intuitive, interactive format. Users can explore motifs, compare alleles to the reference sequence, and gain insights into the structure of tandem repeats, enhancing their ability to interpret genomic variation.
Why ProleTRact?
TRs are complex: alleles can differ by motif composition, length, and interrupted blocks. ProleTRact visulize TR regions with color-coded motifs, highlights interruptions, and provides intuitive navigation across regions and samples, enabling quick insight into potentially pathogenic expansions or atypical structures.
Key Features
- Individual and Cohort modes: Analyze a single VCF or an entire directory of VCFs.
- Dynamic sequence visualization: Color-coded motifs, clear interruption highlighting, and side-by-side allele comparison.
- Pathogenic TR reference overlay: Built-in
pathogenic_TRs.bedprovides context for known loci (disease, gene, thresholds). - Fast navigation: Move across TR records with Previous/Next controls or jump to a specific region.
Installation
Requirements: Python 3.9, 3.10, 3.11, or 3.12 (Python 3.13+ may require building dependencies from source)
Install from PyPI:
pip install proletract
proletract --install-deps # launches the web application
The launcher starts both the backend API server (port 8502) and frontend web server (port 3000). The application will open in your browser automatically. On headless machines, access the frontend at http://localhost:3000 after starting the application.
Note: If you encounter build errors (e.g., with Python 3.13+), ensure you're using Python 3.9–3.12, or install system dependencies: liblzma-dev (Ubuntu/Debian) or xz-devel (RHEL/CentOS/Fedora).
Quickstart
- Launch the app with the command above:
proletract - Open the browser tab to
http://localhost:3000(the URL will be shown in the terminal if you're running headless). - Load an individual VCF or cohort folder from the sidebar and start exploring tandem repeats.
Usage
Individual mode 👤
- Select individual sample in the sidebar.
- Provide the absolute path to a bgzipped and tabix-indexed VCF (
.vcf.gzwith.tbi):- Enter the path in the sidebar input, then click Load VCF.
- The app will parse records and enable navigation across TR variants.
- Use Previous/Next to step through records or jump to a region like
chr1:1000-2000. - Inspect motif blocks, interruptions, and per-allele differences.
Cohort mode 👥👥
Reads-based VCF
- Select Cohort in the sidebar and choose Reads-based VCF view.
- Provide the absolute path to a directory containing TandemTwister VCF files.
- Click Load Cohort to scan the directory and enable cohort navigation.
- Browse records and compare across samples.
- Use Previous/Next to step through records or jump to a region like
chr1:1000-2000. - Inspect motif blocks, interruptions, and per-allele differences.
Assembly VCF
- Select Cohort in the sidebar and choose Assembly VCF view.
- Provide the absolute path to a directory containing TandemTwister VCF files.
- Click Load Cohort to scan the directory and enable cohort navigation.
- Browse records and compare across samples.
- Use Previous/Next to step through records or jump to a region like
chr1:1000-2000. - Inspect motif blocks, interruptions, and per-allele differences.
Input Requirements
- VCF format: Standard VCF generated by TandemTwister.
- Cohort directory: A folder with multiple
.vcf.gzfiles generated by TandemTwister is required for cohort mode.
Demo / Examples
Example screenshots and short walkthrough GIFs will be added here. For now, you can open example.svg for a preview:
- Planned: Individual-mode walkthrough
- Planned: Cohort-mode walkthrough
Contributing
Contributions are welcome! Please open an issue to discuss changes.
Changelog
See CHANGELOG.md for a list of changes in each version.
Citation
If you use TandemTwister/ProleTRact in your research or analysis, please cite our work as follows:
TandemTwister: Scalable genotyping and advanced visualization of tandem repeats
Al Raei LW, Ghareghani M, Moeinzadeh H, Vingron M
bioRxiv 2026.01.28.702315; doi: https://doi.org/10.64898/2026.01.28.702315
Preprint | GitHub Repository
License
This project is licensed under the BSD 3-Clause Non-Commercial License — see LICENSE for details. Commercial use is prohibited. This software is intended for academic research, educational purposes, and personal/private use only. For commercial licensing inquiries, please contact the author.
Metadata
Release files for proletract 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| proletract-1.1.0.tar.gz | 1.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| proletract-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.3 MB
Release files / proletract-1.1.0.tar.gz
| Download URL | proletract-1.1.0.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28dbf22a8b45d0abb6660a14d0995b1fd209c273b22b58bb414943e7113e26ad
|
|
BLAKE2b-256 checksum How to use checksums |
54d8272a4235a842a3462b6ece37ab8a65c1a701b0714d0c26ee6a982ec38846
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / proletract-1.1.0-py3-none-any.whl
| Download URL | proletract-1.1.0-py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1c36027c4b6be2de0ca198a3d9f6de3c2d3646a0596f3193f96508e83e439ea
|
|
BLAKE2b-256 checksum How to use checksums |
4f8a3b0700bed8aec298103b52ab1507472df7cd04919ac447461c37401ae5f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|