Skip to content

calico/sniff

Repository files navigation

Sniff

Sniff provides Borzoi-informed annotations for functionally informed fine mapping. The framework is described in the Sniff preprint. Precomputed Sniff-102 annotation parquet files and processed Baseline-LF parquet files are available from Google Cloud Storage: Sniff-102 and Baseline-LF.

Borzoi predicts variant effects across 6,385 molecular measurements, including gene expression and chromatin accessibility. Sniff reduces those predictions to 102 annotations that PolyFun can use to estimate variant-level prior causal probabilities for SuSiE fine mapping.

Sniff does not replace PolyFun or SuSiE. This repository supplies the released Sniff-102 annotations, the code used to construct them, and worked examples for passing them to PolyFun.

Choose a workflow

Workflow Use it when What is runnable here
Use precomputed annotations Your GWAS variants overlap the released set A staged PolyFun/SuSiE reproduction recipe; large external reference data and a separate PolyFun environment are required
Score variants and construct annotations You need rare or ancestry-specific variants absent from the release Borzoi scoring requires a compatible GPU, model, and reference FASTA; the matching target table is bundled
Use another sequence model You already have scores from another model Implement two small adapter functions, then use the same annotation-building and PolyFun stages

The first workflow is the recommended starting point. Annotation LD scores are trait-independent, so prepared annotation resources can be reused across GWAS.

flowchart LR
    R["Released<br/>Sniff-102 annotations"] --> P["PolyFun<br/>priors"]
    N["New variants<br/>scored by Borzoi"] --> B["Construct<br/>annotations"]
    B --> P
    P --> S["SuSiE<br/>fine mapping"]
Loading

Install the Sniff package

Clone with the pinned external tools, then create the small environment used by the annotation-building package:

git submodule update --init --recursive
conda env create -f environment.yml
conda activate sniff
python -m pip install -e .

Run the package tests with:

python -m pytest -q

Or run the small CPU-only annotation test (synthetic data, temporary outputs, no Borzoi or PolyFun):

python examples/00_smoke_test_annotation_build.py

PolyFun and Borzoi scoring have their own dependencies (see below) and are not included in the base environment.

Additional setup for Borzoi scoring

Baskerville is a toolkit for training genomic deep neural networks and scoring variants with models such as Borzoi. Install the pinned Baskerville submodule in an environment suitable for its TensorFlow dependencies:

python -m pip install ./external/baskerville

The examples call Baskerville by path, so editing Baskerville's developer-specific env_vars.sh is not required. If another tool needs its environment variable:

export BASKERVILLE_DIR=/absolute/path/to/sniff/external/baskerville

See the variant-scoring example for the model, target table, FASTA, GPU, and storage requirements.

PolyFun and SuSiE

The pinned PolyFun fork has its own environment. Follow external/polyfun/README.md and external/polyfun/polyfun.yml. The fork differs from upstream only in the fine-mapping regions file used by the manuscript.

Documentation

Important limitations

  • Annotation PCs fit only on a small new variant set are not directly comparable to released Sniff-102 annotations. Combine the new scores with the released raw scores before transforming raw scores into lower-dimensional annotations.
  • Confirm that A1/A2 orientation agrees with the baseline-LF files. Annotation construction reports merge retention and raises if a chromosome has no matching variants.

Contact

Open a GitHub issue for questions or comments.

About

Borzoi-informed fine mapping with PolyFun

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages