Genotyping and sequence-resolved allele calling for tandem repeat regions
Project description
variant motif where? variant motif here!
vmwhere (VariantMotifwhere) is a tool for analyzing tandem repeat (microsatellite) regions from long-read sequencing data. It provides three core capabilities:
- Discovery — identify microsatellite coordinates in a reference genome
- Genotyping — call allele length, repeath length, and motif-level sequence decomposition at each locus
- Visualization — generate sequence-resolved allele frequency plots
Installation
VMwhere is available as a Python package:
pip install vmwhere
Requirements
-
Python >= 3.12.4
-
R (>= 4.0) — required only for the
visualizesubcommand. Install required R packages:Rscript -e "install.packages(readLines('requirements-r.txt'), repos='https://cloud.r-project.org')"
Usage
1. Find microsatellites
Scan a reference FASTA for tandem repeat regions matching a given motif.
vmwhere find \
--motif GGAA \
--perfect_repeats 4 \
--max_gap 50 \
--buffer_size 50 \
--fasta data/reference.fasta \
--output_dir output/
This outputs a BED file (microsatellite_coordinates.bed) with columns: chr, start, end, region_id, motif.
Parameters
| Flag | Description |
|---|---|
--motif / -m |
Repeat motif sequence to search for (e.g., GGAA) |
--fasta / -f |
Path to the reference genome FASTA |
--output_dir / -o |
Output directory |
--perfect_repeats / -r |
Minimum number of uninterrupted tandem repeats to call a microsatellite (default: 2) |
--max_gap / -g |
Maximum base pairs between adjacent microsatellites before they are treated as distinct loci (default: 50) |
--buffer_size / -b |
Base pairs to extend beyond the outermost repeat on each side (default: 50) |
See examples/run_vmwhere_find.sh for a runnable example.
2. Genotype microsatellites
Extract reads overlapping each locus, decompose sequences into motif and non-motif segments, cluster reads by Levenshtein distance, and call alleles.
vmwhere genotype \
--sample_id example_sample \
--bed_file data/T2T_regions.bed \
--bam_file data/A673_sampled_reads.sorted.bam \
--fasta data/GCF_009914755.1_T2T-CHM13v2.0_chr6_chr10.fasta \
--cluster_distance 4 \
--minor_threshold 0.20 \
--major_threshold 0.80 \
--output_dir output/ \
--num_processes 2
See examples/run_vmwhere_genotype.sh for a runnable example.
Parameters
Required:
| Flag | Description |
|---|---|
--sample_id |
Sample identifier (used in output filename) |
--bam_file |
Path to sorted, indexed BAM file |
--fasta |
Path to the reference genome FASTA |
--bed_file |
Headerless BED file with columns: chr, start, end, region_id, motif |
--output_dir |
Output directory (file will be named <sample_id>_vmwhere_results.tsv) |
Optional:
| Flag | Description | Default |
|---|---|---|
--cluster_distance |
Maximum Levenshtein distance for grouping reads into a cluster | 0 |
--minor_threshold |
Minimum read support fraction to call a minor allele | 0.20 |
--major_threshold |
Minimum read support fraction to call a homozygous genotype | 0.80 |
--num_processes |
Number of parallel processes | 24 |
Output TSV columns
The output follows VCF-style conventions but is written as a TSV for simpler parsing.
| Column | Description |
|---|---|
CHROM |
Chromosome |
POS |
Start coordinate of the microsatellite |
ID |
Locus identifier from the input BED file |
REF |
Reference allele sequence |
ALT |
Alternate allele sequence(s); . if none |
END |
End coordinate of the microsatellite |
MOTIF |
Canonical repeat motif |
GT |
Genotype (e.g., 0/0 = homozygous reference, 0/1 = heterozygous) |
AL |
Allele length in base pairs |
CN |
Total copy number of the canonical motif (consecutive and interrupted occurrences) |
CNM |
Maximum uninterrupted copy number of the canonical motif (e.g., 6GGAA_1GGAT_2GGAA = 6) |
MD |
Motif density — fraction of allele base pairs matching the canonical motif |
DS_READ |
Decomposed sequence of the allele |
DS_REF |
Decomposed sequence of the reference |
RS |
Read support for the allele |
3. Visualize alleles at a microsatellite
Generate a PDF showing sequence-resolved allele structures and their frequencies at a given locus.
vmwhere visualize \
--genotype_tsv output/example_sample_vmwhere_results.tsv \
--microsatellite_id chr6_region_41 \
--min_allele_count 0 \
--output_pdf output/chr6_region_41_visualization.pdf
See examples/run_vmwhere_visualize.sh for a runnable example.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vmwhere-0.2.1.tar.gz.
File metadata
- Download URL: vmwhere-0.2.1.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e0cfa4effae9cb35c058dbf654187b4dfce667c3532919b72901b138dd7e651
|
|
| MD5 |
9c5ce532c3c68d224958f20d4d60c53e
|
|
| BLAKE2b-256 |
9e5ca7070a98ac9e19704a5df4878262936f96136930b37733743b24868dbc33
|
Provenance
The following attestation bundles were made for vmwhere-0.2.1.tar.gz:
Publisher:
release.yml on pirl-unc/vmwhere
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vmwhere-0.2.1.tar.gz -
Subject digest:
3e0cfa4effae9cb35c058dbf654187b4dfce667c3532919b72901b138dd7e651 - Sigstore transparency entry: 1248388906
- Sigstore integration time:
-
Permalink:
pirl-unc/vmwhere@e2142fabc381aeacaa705a347c093813168cf6b6 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/pirl-unc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e2142fabc381aeacaa705a347c093813168cf6b6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vmwhere-0.2.1-py3-none-any.whl.
File metadata
- Download URL: vmwhere-0.2.1-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01695d6bccc1094da75210d34de5174ba6e42b6637ef2db2fda14747c5289109
|
|
| MD5 |
0bed33e66dbce3cabf954406ff39ae18
|
|
| BLAKE2b-256 |
00630f2147ceb4a92b891ea313191d66718ec3096cfb0eb009625e5d56ab6cc2
|
Provenance
The following attestation bundles were made for vmwhere-0.2.1-py3-none-any.whl:
Publisher:
release.yml on pirl-unc/vmwhere
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vmwhere-0.2.1-py3-none-any.whl -
Subject digest:
01695d6bccc1094da75210d34de5174ba6e42b6637ef2db2fda14747c5289109 - Sigstore transparency entry: 1248388933
- Sigstore integration time:
-
Permalink:
pirl-unc/vmwhere@e2142fabc381aeacaa705a347c093813168cf6b6 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/pirl-unc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e2142fabc381aeacaa705a347c093813168cf6b6 -
Trigger Event:
push
-
Statement type: