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 varscoreConservation functionality lives behind an extra. The legacy model extra remains temporarily for direct
ChromBPNet installation compatibility, but production ML environments are independently locked under
images/:
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 model execution, use the independently locked
ChromBPNet and Cherimoya images.
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- Model images — independently locked ChromBPNet and Cherimoya runtimes
- Region classification — region labels, setup, and scorer routing
- AlphaMissense — setup and variant scoring
Each image has its own project and lockfile so incompatible ML stacks never share one dependency resolution. See docs/docker.md for build, run, and runtime-mount details.
docker build -f images/chrombpnet/Dockerfile -t kundajelab/varscore:dev .
docker build -f images/cherimoya/Dockerfile -t kundajelab/cherimoya:dev .
docker run --rm kundajelab/varscore:dev varscore.preprocessing.region_filter --help # sanity check before pushing