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
- Read effects and protein sequences
- Select variants for a sample or compare tumor and normal
- Check a cohort for sample mix-ups
- Save and reload tables
- Fix reference, allele, and sample-name errors
Specific variant types and evidence
- Splice variants and their possible outcomes
- Structural variants and gene fusions
- Compare SV calls across callers and samples
- Include patient germline variants or phase linked variants
- Attach observed RNA structures or Exacto protein predictions
- Pair breakends or left-align indels
Reference and extensions¶
- Varcode, Isovar, and Vaxrank: which library does what.
- Transcript models: cDNA, partial structures, and missing sequence.
- Effect types and API reference: classes and parameters.
- Experimental annotators: optional alternative implementations.
- Writing an annotator: plugging in your own model.
- Changelog: release history.