Core functions for variant scoring
The core library (variant annotation, region classification, AlphaMissense / parquet lookups, prioritization) is TensorFlow-free and installs on macOS arm64 and modern Python:
pip install varscoreHeavy / platform-constrained functionality lives behind extras:
pip install "varscore[model]" # ChromBPNet model scoring + SHAP (legacy TensorFlow stack; Python < 3.10)
pip install "varscore[conservation]" # CADD / PhyloP conservation lookups (pysam, pyBigWig)Bulk reference data is not bundled — build it with the
varscore/scripts/download_* + construct_* pairs (see below and the
per-dataset docs). For environments that can't satisfy the model extra (e.g.
Kubernetes), use the published Docker image instead, which
bundles the TensorFlow stack and the region-annotation data.
Make sure you have uv installed. See here for installation instructions.
uv syncThese annotations rely on large files of bulk reference data. These need to be constructed first.
- Download the CCRE bed file:
./varscore/scripts/download_ccres.sh- Run the following script to construct the DNATree from the CCRE bed file:
uv run python -m varscore.scripts.construct_ccre_dnatree(Specifically, minor allele frequencies for variants)
- Download the OpenTargets variant files
./varscore/scripts/download_variants.sh- Run the following script to construct the variants dataframe from the OpenTargets variant files:
uv run python -m varscore.scripts.construct_variants_df- Docker — building/running the published image and its data
- Region classification — region labels, setup, and scorer routing
- AlphaMissense — setup and variant scoring
A published image bundles the TensorFlow / ChromBPNet stack and the region-annotation data so the full pipeline runs in environments that can't install the pinned TF versions (k8s, macOS arm64, modern Python). See docs/docker.md for build, run, and runtime-mount details.
docker build -t kundajelab/varscore:dev -f Dockerfile .
docker run --rm kundajelab/varscore:dev varscore.preprocessing.region_filter --help # sanity check before pushing
docker push kundajelab/varscore:dev