Skip to main content

variantt

PyPI version Web Platform License: MIT

variantt quantifies polarised directional amino acid substitution asymmetry (A(X->Y) = (N(X->Y) - N(Y->X)) / (N(X->Y) + N(Y->X))) on rooted protein phylogenies via unbiased random-tie Fitch ancestral-state reconstruction, exact two-sided binomial tests with Benjamini-Hochberg false discovery rate control, reversible-model parametric bootstrap, alphabet-order bias auditing, and the frequency-only Variant Tension (Tv) composition control.

Unrooted alignments and single-column frequency ratios carry no directional branch polarity. variantt requires an explicit outgroup (--outgroup), basal clade (--root-taxa), or --midpoint root before reporting directional counts, and computes Tv alongside A(X->Y) on the same alignment to separate compositional asymmetry from true evolutionary directionality.

Installation

pip install variantt

Command-Line Usage

Run the built-in non-reversible and reversible simulation controls:

variantt --selftest

Analyse a FASTA alignment rooted on an outgroup regex with redundancy filtering and parametric bootstrap:

variantt --msa alignment.fasta \
         --outgroup "Danio|Xenopus|Latimeria" \
         --weight-threshold 0.98 \
         --min-events 10 \
         --bootstrap 50 \
         -o family_polarised

Compute per-site frequency-only Tv composition profiles across alignment columns:

variantt --msa alignment.fasta --tv-sites -o tv_profile.csv

Python API

from variantt import (
    analyse_alignment,
    selftest,
    tv_control,
    tv_site_profile,
    read_fasta,
    encode_alignment,
)

controls = selftest(quiet=True)

result = analyse_alignment(
    "alignment.fasta",
    outgroup="Danio|Xenopus",
    weight_threshold=0.98,
    min_events=10,
    bootstrap=50,
)
print(result["tested_pairs"][:5])
print("r(A, Tv) =", result["tv_correlation"])

Citation

Karagöl, A., Karagöl, T. Variant Tension (Tv) as a Composition Control for Directional Substitution Asymmetry: Polarised Inference by Ancestral-State Reconstruction. bioRxiv (2026). https://doi.org/10.64898/2026.03.10.710752

License

Released under the MIT License.

Metadata

Release files for variantt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for variantt 0.1.0
File Size Uploaded Provenance Actions
variantt-0.1.0.tar.gz 14.8 kB Without provenance Details for variantt-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for variantt 0.1.0
File Interpreter ABI Platform Actions
variantt-0.1.0-py3-none-any.whl Python 3 none any Details for variantt-0.1.0-py3-none-any.whl

Total release size: 28.3 kB

Release files / variantt-0.1.0.tar.gz

Download URL variantt-0.1.0.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
69e3eb205c7452a52c6b31537010cafe53271ac9960140557feb15922e51014d
BLAKE2b-256 checksum
How to use checksums
891dece111286e2b3cbec54a31dc48212ac99cb2cfd72094a4d84c992c161ac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / variantt-0.1.0-py3-none-any.whl

Download URL variantt-0.1.0-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42fb6f5b34a92fc8b46a5e947a724f4ff4983405469cb98b07f6a67fe0d821d0
BLAKE2b-256 checksum
How to use checksums
8b02d22dbf9d0f9b02d3974babe2afef515c0cf887a6ce8cb5c0c349a06949ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for variantt 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page