Varcode
Varcode helps you work with genomic variants in Python and predict their effects on genes, transcripts, and protein sequences.
Load variants from VCF or MAF files, annotate them, and inspect the results. The same interface handles small variants and structural variants; optional germline, phasing, and RNA evidence can refine predictions.
Installation
Requires Python 3.9 or later:
pip install varcode
pyensembl install --release 81 --species human
The second command downloads the annotation and transcript sequences for the GRCh38 example below. Release 81 is pinned for reproducibility, not a requirement to use that release for your own data. Choose an annotation matching your input's genome build; see reference setup.
Quick start
Predict the effect of a single GRCh38 variant on a CFTR transcript:
from varcode import Variant
variant = Variant("7", 117_531_100, "T", "A", genome=81)
transcript = variant.genome.transcript_by_id("ENST00000003084")
effect = variant.effect_on_transcript(transcript)
print(effect.short_description) # p.L159M
protein = effect.mutant_protein_sequence
For a VCF called against the same genome build:
from varcode import load_vcf
variants = load_vcf("variants.vcf", genome=81)
effects = variants.effects()
for variant, effect in effects.top_priority_effect_per_variant().items():
print(variant.short_description, effect.short_description)
A variant can affect several transcripts. Priority is a summary of predicted consequence, not proof of expression or pathogenicity. A protein sequence may be unavailable for unresolved effects.
Learn more
Varcode predicts transcript/protein consequences; Isovar handles RNA reconstruction and evidence; Vaxrank evaluates protein/peptide candidates. See how the libraries fit together for their responsibilities and current integration limits.
Start with the getting-started guide for file loading, result access, and saving a table. Then follow the task guides for sample filtering, structural variants, phasing, and RNA evidence.
Detailed effect types, coordinate conventions, and the API reference live in the docs.
For bugs or questions, open an issue. Contributions are welcome; see CONTRIBUTING.md and the changelog.
Release files for varcode 9.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| varcode-9.3.6.tar.gz | 440.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| varcode-9.3.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 717.8 kB
Release files / varcode-9.3.6.tar.gz
| Download URL | varcode-9.3.6.tar.gz |
|---|---|
| Size | 440.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb513a20b3d1e60b64da3be152e2d6a8f068a38a39282f7f304185dab84e3b06
|
|
BLAKE2b-256 checksum How to use checksums |
77fe4f4d9941e3724c1ff2e11ed9e73d1bfb112ddf633ad5cb1f8dc562ab1857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|
Release files / varcode-9.3.6-py3-none-any.whl
| Download URL | varcode-9.3.6-py3-none-any.whl |
|---|---|
| Size | 277.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
586d3322cecbf57ee58118819331409e2d0e7f5b6c7f0c5fb3c2e7fa616cb0ae
|
|
BLAKE2b-256 checksum How to use checksums |
5329e13b29800249f30a1bd35ad51f0e4be96564f5b7a0f48a48b6445bd75c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|