Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

120 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Heavy / 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.

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

Docker

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

About

Core functions for variant scoring

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages