Skip to content

Varcode

Varcode is a Python library that predicts what genomic variants do to genes, transcripts, and proteins. For each variant on each overlapping transcript, it reports the predicted consequence and, where it can be determined, the mutant protein sequence.

New here? Getting started walks through installing reference data, annotating a variant and a VCF, reading the predicted protein, and saving results.

Annotate a VCF

import varcode

# Use an annotation release matching your VCF's genome build.
variants = varcode.load_vcf("variants.vcf", genome=81)  # GRCh38
effects = variants.effects()
for variant, effect in effects.top_priority_effect_per_variant().items():
    print(variant.short_description, effect.short_description)

The setup instructions install the reference data for this example. Before relying on the output, read how to read results: predictions are per transcript, and "top priority" means most severe, not most likely.

Guides

Everyday tasks

Specific variant types and evidence

Reference and extensions