Skip to main content

Cache-based VCF annotation accelerator

Project description

VCFcache – Cache once, annotate fast

Cache common variants once, reuse them for every sample. VCFcache builds a normalized blueprint, annotates it once, and reuses those results so only rare/novel variants are annotated at runtime.

Pure Python. No Nextflow/JVM required.


Quick Start - pip install

Requires: Python >= 3.11, bcftools >= 1.20

pip install vcfcache
vcfcache demo --smoke-test  # Run comprehensive demo
vcfcache --help

Install bcftools separately:

  • Ubuntu/Debian: sudo apt-get install bcftools
  • macOS: brew install bcftools
  • Conda: conda install -c bioconda bcftools

Quick Start - Docker

Docker includes bcftools - no separate installation needed.

docker pull ghcr.io/julius-muller/vcfcache:latest

# Use a public cache from Zenodo
docker run --rm -v $(pwd):/work ghcr.io/julius-muller/vcfcache:latest \
  annotate \
    -a cache-hg38-gnomad-4.1joint-AF0100-vep-115.2-basic \
    --vcf /work/sample.vcf.gz \
    --output /work/out \
    --force

# List available public caches
docker run --rm ghcr.io/julius-muller/vcfcache:latest list --public-caches

Quick Start - from source

git clone https://github.com/julius-muller/vcfcache.git
cd vcfcache
uv venv .venv && source .venv/bin/activate
uv pip install -e ".[dev]"
vcfcache --help

Build Your Own Cache

  1. Create blueprint (normalize/deduplicate variants):
vcfcache blueprint-init --vcf gnomad.bcf --output ./cache -y params.yaml
  1. Annotate blueprint (create cache):
vcfcache cache-build --name vep_cache --db ./cache -a annotation.yaml -y params.yaml
  1. Use cache on samples:
vcfcache annotate -a ./cache/cache/vep_cache --vcf sample.vcf.gz --output ./results

Configuration

Override system bcftools (if needed):

export VCFCACHE_BCFTOOLS=/path/to/bcftools-1.22

Or in params.yaml:

bcftools_cmd: "/path/to/bcftools"

See WIKI.md for detailed configuration, cache distribution via Zenodo, and troubleshooting.


Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vcfcache-0.3.7.tar.gz (96.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vcfcache-0.3.7-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

Details for the file vcfcache-0.3.7.tar.gz.

File metadata

  • Download URL: vcfcache-0.3.7.tar.gz
  • Upload date:
  • Size: 96.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for vcfcache-0.3.7.tar.gz
Algorithm Hash digest
SHA256 bc8ea41c7d490bfbcf3006030e3f6f1e5da46e48da0369b465b1019d614756dd
MD5 ab4f94f3d67f94326c3f9f29e2eac072
BLAKE2b-256 76ee841827d96f75a4239337a4269e582ca2f742bd228ea38f92e1393f3ba4e4

See more details on using hashes here.

File details

Details for the file vcfcache-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: vcfcache-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 70.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for vcfcache-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6a512d685df964957185b5c635e54f323ae35c74094d7bebe0d17d69596dd0ab
MD5 255fb3f1c2bceea7f195bf34618fecd4
BLAKE2b-256 5a3bf7be0d52da6fda7878310018b2de4de7f54772ea09f3f4fb06b92b54ed45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page