Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 2.55 KB

File metadata and controls

83 lines (59 loc) · 2.55 KB

VariantScoringFunctions

Core functions for variant scoring

Installing the library

The core library (variant annotation, region classification, AlphaMissense / parquet lookups, prioritization) is TensorFlow-free and installs on macOS arm64 and modern Python:

pip install varscore

Conservation 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.

Development setup

Make sure you have uv installed. See here for installation instructions.

Sync Dependencies

uv sync

Setup

These annotations rely on large files of bulk reference data. These need to be constructed first.

CCREs

  1. Download the CCRE bed file:
./varscore/scripts/download_ccres.sh
  1. Run the following script to construct the DNATree from the CCRE bed file:
uv run python -m varscore.scripts.construct_ccre_dnatree

Variants

(Specifically, minor allele frequencies for variants)

  1. Download the OpenTargets variant files
./varscore/scripts/download_variants.sh
  1. Run the following script to construct the variants dataframe from the OpenTargets variant files:
uv run python -m varscore.scripts.construct_variants_df

Documentation

Model images

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