Every variant ranked, with the reasons shown.
varlens reads a VCF file, annotates each variant with ClinVar and gnomAD, and sorts it into one of four priority tiers using plain rules you can audit. Every call comes with the evidence behind it.
An educational project written in Python with no external dependencies. It is not a clinical tool and must not be used for diagnosis or medical decisions.
Triage one variant
Change the evidence and watch the tier move. This runs the same rules as the Python tool, in your browser.
Evidence
How it works
One command takes a patient VCF and produces a sortable HTML report, plus a TSV if you want one.
- VCFStreamed line by line
- AnnotateClinVar and gnomAD
- Apply the rulesFour tiers, with evidence
- ReportHTML and TSV
Reads large files
The VCF is streamed, multi-allelic sites are split per allele, and --region scans one chromosome or a coordinate window of a whole-genome file without cutting it first.
Annotates without a giant download
ClinVar comes from its VCF. Frequencies come from a local gnomAD file or gnomAD's public API, with adaptive backoff when it rate-limits and an on-disk cache so reruns skip repeated lookups.
Explains each call
Each tier carries the evidence lines that produced it, so a reviewer can disagree with a call for a specific reason instead of trusting a score.
The rules
The rules are inspired by the ACMG/AMP evidence types and are deliberately short. Defaults are configurable from the command line.
| Evidence | Rule (defaults) | Effect |
|---|---|---|
| BA1 | Allele frequency of 5% or more | Low priority Overrides everything else |
| BS1 | Allele frequency of 1% or more | Low priority or a flagged conflict with a ClinVar pathogenic call |
| PM2, supporting | Absent, or 0.01% or less | Supporting evidence line |
| Loss of function | Stop gain, frameshift, canonical splice, start loss | Rare and absent from ClinVar: Manual review |
| ClinVar pathogenic | 2 or more review stars | High priority |
| ClinVar pathogenic | Fewer stars, or conflicting | Manual review |
| ClinVar benign | 1 or more review stars | Low priority |
| Anything else | No decisive evidence | Uncertain |
ClinVar is shown as its own evidence line rather than as the classic PP5 and BP6 criteria, because ClinGen's Sequence Variant Interpretation group recommended retiring those.
Does it work? A blind test against ClinVar
Ranking ClinVar variants using ClinVar's own verdict would be circular, because the answer key would also be an input. So the benchmark hides it. Each ClinVar variant goes through the rules with no ClinVar record, using only the population frequency and molecular consequence stored in ClinVar's VCF. The pathogenic or benign label is used afterwards, only to score the result.
That makes the question narrower and fairer: how much of the pathogenic versus benign signal do the frequency and consequence rules recover on their own?
Results have not been generated yet. Run the benchmark on the full ClinVar VCF and it writes its numbers into this page:
varlens-benchmark clinvar.vcf.gz --markdown BENCHMARK.md --embed docs/index.html
Run it
Python 3.9 or newer. The demo uses synthetic data that ships with the repository.
git clone https://github.com/Print-Samuel/varlens.git cd varlens pip install -e ".[dev]" varlens data/example_patient.vcf --clinvar data/example_clinvar.vcf --freq data/example_freq.vcf --out report.html
Scan one region of a real genome, looking up frequencies through gnomAD's API:
varlens sample.vcf.gz --region 21:20000000-26000000 --clinvar clinvar.vcf.gz --freq-api --out report.html
See what the output looks like in the example report.
What it does not do
- It is not a clinical classifier. It prioritises variants for a human to look at, and it has not been validated for diagnosis.
- Variants are matched exactly on chromosome, position, reference and alternate allele, so normalise indels first.
- Through gnomAD's API, frequencies are one request per variant: fine for a region, too slow for a whole genome.
- Loss of function is flagged, not asserted. There is no gene-disease mechanism data and no in-silico predictors.
- The benchmark only tests what the rules can know without ClinVar's verdict. It says nothing about variants ClinVar has never seen.