--- id: varcode version: "7.0.0" license: unclear license_treatment: permissive maintenance: active --- # varcode — Variant annotation in Python License: permissive · Maintenance: active · Downloads: 96.7K/mo ## What it is and what it does Varcode is a Python library for working with genomic variant data and predicting the impact of those variants on protein sequences. It loads variants from standard formats like MAF files, organizes them by gene, and computes detailed mutation effects—such as amino acid substitutions, frameshifts, premature stops, and splice disruptions—on each affected transcript. The library represents effects as typed objects (e.g., `Substitution`, `FrameShift`, `PrematureStop`) that expose the mutant protein sequence, the transcript involved, and the gene context. The package is built on numpy, pandas, and pyensembl for reference genome lookups. It handles complex scenarios like multi-outcome effects (where a variant's impact is ambiguous without additional information), structural variants, and germline-aware annotation. Users typically load variant collections, filter or group by gene, call `.effects()` to compute annotations, and inspect the resulting effect objects for downstream analysis—such as identifying driver mutations, predicting immunogenicity, or prioritizing variants for experimental validation. Use it for: - Load TCGA or other cancer variant datasets and predict which mutations cause protein-truncating effects like premature stops or frameshifts. - Annotate somatic variants in a tumor sample to identify which genes are affected and classify each variant's functional impact. - Group variants by gene and compute effects across all transcripts to understand isoform-specific consequences of the same mutation. - Filter variant collections for high-priority effects (e.g., nonsense mutations) to prioritize candidates for experimental validation or clinical reporting. - Analyze multi-sample VCF files with per-sample genotype information to classify variants as somatic or germline and compute sample-aware effects. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Varcode loads and analyzes genomic variant data, predicting how DNA variants affect protein sequences by annotating their biological effects on genes and transcripts. Yes. Varcode is actively maintained, has low install friction, carries a permissive license, and fills a specific niche in genomic variant annotation. It is well-suited for researchers and bioinformaticians working with variant data who need reliable effect prediction. Requires Python ≥3.9 and a one-time setup of reference genome data via pyensembl; no known security vulnerabilities. ## Install pip install varcode uv add varcode poetry add varcode ## Installing varcode Before you install: Low install friction with a pure-Python wheel. Active maintenance as of 2026-07-09 with recent release (36 days old). Depends on numpy, pandas, and pyensembl; requires reference genome data installed separately via pyensembl. License in practice: Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions. Quickstart: pip install varcode pyensembl install --release 75 import varcode variants = varcode.load_maf("variants.maf") effects = variants.effects() print(effects[0]) Requires reference genome data installed via pyensembl (e.g., `pyensembl install --release 75 76`) before variant effects can be computed. Verify before relying: - Whether pyensembl reference data download and setup is straightforward for first-time users - Performance characteristics with large variant sets (e.g., whole-genome or multi-sample VCFs) - Completeness of effect annotation coverage across all variant types and edge cases ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 96.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags genomic variant annotation, predict protein mutation effects, variant impact prediction, MAF file parsing, DNA variant analysis, transcript effect annotation, somatic variant classification, bioinformatics, genomics, variant-annotation [View on SkillFed](https://skillfed.io/packages/varcode) · [View on PyPI](https://pypi.org/project/varcode/)