Varcode is a Python library for variant annotation, providing tools to annotate genomic variants with predicted coding effects, such as amino acid changes, splice sites, and more. Current version is 6.0.0, requiring Python ≥3.9. It is part of the OpenVax project and follows a regular release cycle.
pip install varcodeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
A minimal example: create a single variant and retrieve its predicted coding effect and protein change.
Upgrade Python to 3.9 or later. If stuck on older Python, use varcode <=5.0.x.
Use `str(variant.effect())` or `variant.effect().short_description` instead of relying on the default __repr__.
Run `pyensembl install --release 75` (or your desired release) offline.
Always use 1-based positions as per VCF convention.
Use `Variant.effect()` and `Variant.protein_change()` directly. Replace `VariantAnnotationResult` with `VariantEffect`.
Install pyensembl: `pip install pyensembl`
Run `pyensembl install --release 75` (or the release you need) in your terminal.
Update varcode: `pip install --upgrade varcode`. Use `from varcode import Variant`.