vcfclick
vcfclick turns VCF cohorts into local, queryable SQL databases for research labs and bioinformatics teams.
- Ingest joint VCFs or batches of per-sample VCFs.
- Query variants, genotypes, samples, and ingestions with SQL.
- Run trio / family analysis (de-novo, recessive, dominant, compound-het) over a loaded pedigree, with gnomAD population-AF rarity filtering — validated against the GIAB benchmark trio.
- Check per-sample quality with
db qc(het/hom, Ti/Tv, chrX sex check). - Compute population-genetics statistics per population with
db popgen— θ_W, π, Tajima's D, Fay & Wu's H, heterozygosity, the site-frequency spectrum (projected for missing data) and Hudson F_ST, genome-wide or in sliding windows — after loading a population panel (1000 Genomes format) withdb panel. - Combine multiple callers' call sets with
set=provenance — the GATK3CombineVariantsthat GATK4 removed. - Explore cohorts in an optional terminal UI, or a local browser UI (SQL, natural-language→SQL, trio, combine).
- Share databases as portable Parquet bundles.
- Use MCP to let an LLM write visible, auditable SQL.
Status: research preview. vcfclick is intended for exploratory research workflows, not clinical reporting.
Try It First
The browser demo runs DuckDB-Wasm over a public 1000 Genomes Parquet cohort. It does not require installing vcfclick. It is a quick way to see the core interaction: ask a genomics question, inspect the generated SQL, and view the result.
Run the demo notebook in Colab
(examples/vcfclick-demo.ipynb) — a
self-contained notebook that installs vcfclick, downloads its own VCFs,
and runs the headline flows: ingest → SQL, GIAB-validated trio de novo,
compound-het + gnomAD rarity filtering, sample QC, and combine.
The installable CLI is different: it creates local databases under your
VCFCLICK_HOME (default ~/.vcfclick) and can use embedded chDB
(ClickHouse engine) or DuckDB as the storage backend.
Install
vcfclick is a Python CLI installed as a standalone tool — no
project, virtualenv, or pip juggling. Use uv
(recommended) or pipx:
uv tool install vcfclick # or: pipx install vcfclick
vcfclick --help
With the optional terminal UI or local web UI:
uv tool install "vcfclick[tui]" # terminal UI: vcfclick tui
uv tool install "vcfclick[web]" # browser UI: vcfclick web <db>
Upgrade or remove later:
uv tool upgrade vcfclick # pipx: pipx upgrade vcfclick
uv tool uninstall vcfclick # pipx: pipx uninstall vcfclick
From a source checkout:
git clone https://github.com/nuin/vcfclick.git
cd vcfclick
uv sync --extra tui --group dev
uv run vcfclick --help
Platform notes
vcfclick depends on native Python wheels (cyvcf2, chdb, duckdb,
pyarrow), which uv / pipx resolve automatically. Prebuilt wheels
cover common macOS arm64 and Linux x86_64 Python versions; if your
platform builds cyvcf2 from source, install htslib development
headers first.
There is no Homebrew or conda-forge package: chdb (the embedded
ClickHouse engine) ships as a binary wheel with no source build, so a
from-source formula isn't possible. uv tool install / pipx are the
supported install paths and work the same on macOS and Linux.
30-Second CLI Demo
Pull the public BRCA1 demo bundle, then run a SQL query:
vcfclick db pull demo \
https://github.com/nuin/vcfclick/releases/download/v0.1.0/1000g-brca1-demo.tar.gz
vcfclick db query demo \
"SELECT count(DISTINCT (ingest_id, sample_id)) AS samples
FROM genotypes
WHERE chrom = 'chr17'
AND pos BETWEEN 43044295 AND 43170245"
Open the same database in the TUI:
vcfclick tui --db demo
Documentation
Start here:
- Getting started - install, pull the demo, run first SQL queries, launch the TUI.
- CLI reference - every command, with a summary, an example, and its full option list.
- User guide - create databases, ingest VCFs, query, inspect, compare, export, bundle, and restore.
- Backends - chDB vs DuckDB, install paths, conda, and moving data between backends.
- Terminal UI - install the Textual extra and use the Locus, Operations, and SQL panes.
- Web UI -
vcfclick weblocal browser interface: SQL explorer, natural-language→SQL, trio and combine panels. - MCP and annotations - configure an MCP client, load gene/ClinVar references, and use visible LLM-generated SQL.
- Trio / family analysis - merge per-sample VCFs, load a pedigree, and report de-novo / recessive / dominant / compound-het candidates.
- Trio validation - de-novo recovery against the
GIAB benchmark trio with its high-confidence BED as ground truth,
cross-checked with
bcftools +mendelian2. - Combining call sets - merge multiple callers of the
same cohort with
set=provenance and consensus filtering (the GATK3 CombineVariants GATK4 removed). - Benchmarking VCFs -
benchmarka query against a truth (hap.py-style concordance), plus SQL-native stratification by gnomAD/ClinVar/gene/region, ROC curves, annotated-error audit, and multi-caller cohorts. - Sample QC -
db qcper-sample het/hom, Ti/Tv, and a chrX-heterozygosity sex check flagged against the pedigree. - Population genetics - load a population panel and compute θ, π, Tajima's D, Fay & Wu's H, SFS and Hudson F_ST per population; how missing data and ancestral alleles are handled.
- Schema reference - table definitions, query conventions, sparse genotype rules, and common SQL patterns.
- FAQ - common install, memory, query, backend, and data interpretation questions.
Project and contributor docs:
- Examples - worked BRCA1 natural-language SQL session.
- Benchmarks - ingest performance measurements.
- Contributing - development setup, tests, releases.
- Citation - DOI and BibTeX.
- License rationale - Apache 2.0 and what it means.
Core Concepts
One Database Per Cohort Or Project
The CLI manages named databases under:
~/.vcfclick/dbs/<name>/
Set VCFCLICK_HOME=/path/to/home if you want databases somewhere else.
Cohort Tables
Every database has the same core logical tables:
| Table | Meaning |
|---|---|
variants |
one row per (ingest_id, chrom, pos, ref, alt) |
genotypes |
sparse non-reference sample calls only |
samples |
one row per (ingest_id, sample_id) |
ingestions |
one row per uploaded VCF or imported dump |
missing_genotypes |
one row per fully missing (./.) sample call |
pedigree, populations |
sample relationships and population labels, loaded separately |
The most important rule: genotypes is sparse. Homozygous-reference
calls (0/0) are not stored; no-calls are recorded in missing_genotypes,
and variants.n_called / an_called / ac_called hold exact per-site
called counts. See schema query patterns
before writing allele-frequency or hom-ref queries by hand.
Backend Choice
vcfclick can run on either backend:
- chDB: embedded ClickHouse engine, default when installed, best fit for cohort-scale local databases.
- DuckDB: embedded single-file backend, useful for conda/Bioconda packaging and lightweight environments.
Choose with:
VCFCLICK_BACKEND=chdb vcfclick db list
VCFCLICK_BACKEND=duckdb vcfclick db list
Backends use different on-disk formats. Move data between them with
vcfclick db dump and vcfclick db ingest-parquet; details are in
Backends.
Architecture
vcfclick separates sample/cohort data from reference annotations.
VCF / Parquet input
|
v
named vcfclick database
- variants
- genotypes
- samples
- ingestions
|
+-- SQL CLI / TUI
+-- MCP tools for visible generated SQL
shared annotation store
- gene coordinates
- ClinVar significance table
Sample data lives in the selected backend for each named database. Annotation data lives in an embedded DuckDB reference store shared by the MCP tools.
Current Limits
- Multi-allelic sites must be decomposed before ingest:
bcftools norm -m - input.vcf.gz. - Pedigrees are loaded explicitly with
vcfclick db ped(standard PED/FAM); vcfclick does not infer relationships from the VCF. - Trio analysis is candidate FILTERING, not variant calling; defensible
de-novo needs
db ingest --keep-reference. See Trio. db popgenanalyses autosomes of one ingestion at a time; sex chromosomes (which need per-sample ploidy) are not supported yet.- DuckDB backend support is useful but not identical to chDB support; some operations may be chDB-first.
- The natural-language layer is meant to produce visible SQL, not to hide SQL from the user.
License
Apache License 2.0. See LICENSE and LICENSING.md.
Metadata
Release files for vcfclick 0.14.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vcfclick-0.14.3.tar.gz | 213.0 kB | Without provenance | Details for vcfclick-0.14.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vcfclick-0.14.3-py3-none-any.whl | Python 3 | none | any | Details for vcfclick-0.14.3-py3-none-any.whl |
Total release size: 442.3 kB
Release files / vcfclick-0.14.3.tar.gz
| Download URL | vcfclick-0.14.3.tar.gz |
|---|---|
| Size | 213.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb204819c686f943fffb9e367b7d0951c1e050ae6a3c55d497346891b8354aaf
|
|
BLAKE2b-256 checksum How to use checksums |
cfb06899916f1388124dc857e2904e3d74f980db613415a48dd2b0edf8d2aa6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.3 {"installer":{"name":"uv","version":"0.13.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vcfclick-0.14.3-py3-none-any.whl
| Download URL | vcfclick-0.14.3-py3-none-any.whl |
|---|---|
| Size | 229.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
711f3d2db39fc0988e0a37ec5d1dccd4c7d3bce69a890bb59dc4a2db9a69fb89
|
|
BLAKE2b-256 checksum How to use checksums |
5a6a94e3fd189be64112d96f7ffeb3edaf6e0825f164a04add817bdb78b3694b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.3 {"installer":{"name":"uv","version":"0.13.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for vcfclick 0.14.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.