Claude Skill

alterlab-borzoi

Predict genome-wide functional genomics tracks from DNA sequence with Borzoi (Linder 2025) — a sequence-to-function model outputting RNA-seq, CAGE, ATAC, and ChIP coverage across long context, used to score non-coding and regulatory variant effects. Use when predicting functional

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download alterlab-ieu-alterlab-academic-skills-skills_bioinformatics_alterlab-borzoi-e4836c0.zip · 5 KB
Part of alterlab-ieu/alterlab-academic-skills — 94 skills

Install

skills CLI npx skills add https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/bioinformatics/alterlab-borzoi
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install alterlab-ieu-alterlab-academic-skills@llmmart
Git git clone https://github.com/AlterLab-IEU/AlterLab-Academic-Skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole alterlab-ieu/alterlab-academic-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Borzoi (sequence → function)

Overview

Borzoi (Linder et al. 2025; calico/borzoi) is a sequence-to-function deep-learning model: given a DNA sequence over a long genomic context, it predicts genome-wide functional tracks — RNA-seq, CAGE, ATAC-seq, and ChIP coverage across many assays/tissues. Its headline use is non-coding variant effect scoring: run the reference and alternate alleles through the model and compare predicted tracks to estimate a regulatory variant's impact on expression or chromatin.

It predicts function from sequence; it does not look up known variants. For a variant's population frequency use alterlab-gnomad; for clinical significance use alterlab-clinvar.

When to Use This Skill

Use this skill when the user wants to:

  • Predict functional tracks (RNA-seq/CAGE/ATAC/ChIP) from a DNA sequence or locus.
  • Score a non-coding / regulatory variant's predicted effect (ref vs. alt).
  • Run in-silico mutagenesis to find driver bases in a regulatory element.
  • Prioritize candidate regulatory variants by predicted functional impact.

Does NOT Trigger

Scenario Use instead
Look up a variant's population frequency alterlab-gnomad
Look up a variant's clinical significance alterlab-clinvar
Predict a protein-structure / coding effect alterlab-alphafold
Single-cell foundation-model tasks alterlab-scgpt
Standard variant calling from reads alterlab-nf-core-sarek (or the relevant pipeline skill)

Core Capabilities

1. Track prediction from sequence

The quickest path is the PyTorch port, which loads ported weights straight from the Hub:

from borzoi_pytorch import Borzoi

# replicates 0-3, human by default; 'johahi/borzoi-replicate-0-mouse' for mouse heads
model = Borzoi.from_pretrained("johahi/borzoi-replicate-0").eval().cuda()
# one-hot encode the reference window around your locus, then:
# predictions = model(one_hot_batch)   # (batch, tracks, bins)

The reference TensorFlow implementation (calico/borzoi on top of calico/baskerville) is the source of truth for the published results and ships the variant-scoring and interpretation tutorials. Either way: provide a genome window (coordinates + reference, or a FASTA), one-hot encode it, and read predicted coverage across the output tracks.

2. Non-coding variant effect scoring

The core workflow: build the reference and alternate sequences for a variant, predict tracks for each, and quantify the difference (e.g. SAD/SED-style scores) to estimate the variant's regulatory effect. Prioritize candidates by the magnitude of predicted change.

3. In-silico mutagenesis

Systematically mutate bases across a regulatory element and read the predicted-track deltas to localize functionally important positions (motif/driver discovery).

4. GPU and dispatch

Borzoi takes long context and is GPU-heavy; genome-wide or many-variant scans should be dispatched via alterlab-remote-compute (submit → poll → harvest). Flashzoi (johahi/flashzoi-replicate-0..3, needs FlashAttention-2) is a drop-in ~3x faster variant at comparable accuracy — worth it for large scans.

Resources

  • references/borzoi_usage.md — install/pinning, sequence extraction, predict calls, ref/alt variant scoring, in-silico mutagenesis, and Enformer lineage. Loaded on demand.

Part of the AlterLab Academic Skills suite.

Files (alterlab-academic-skills)
  • evals
    • evals.json 2.8 KB
      {
        "skill": "alterlab-borzoi",
        "evals": [
          {
            "id": "predict-tracks",
            "prompt": "Predict the RNA-seq and ATAC coverage tracks for this genomic locus directly from its DNA sequence.",
            "expected_output": "Invokes alterlab-borzoi: extracts the reference sequence window and runs the model to output multi-track predicted coverage (RNA-seq/CAGE/ATAC/ChIP). Notes GPU need and dispatch via alterlab-remote-compute.",
            "assertions": [
              { "type": "should_trigger", "value": true },
              { "type": "output_contains", "value": "track" },
              { "type": "behavior", "value": "Predicts functional coverage from sequence rather than looking up annotations." }
            ]
          },
          {
            "id": "noncoding-variant-effect",
            "prompt": "I have a non-coding variant in a promoter. Predict whether it changes expression by scoring its effect from sequence.",
            "expected_output": "Invokes alterlab-borzoi for variant effect scoring: builds reference and alternate sequences, predicts tracks for each, and quantifies the difference to estimate the regulatory effect — framing it as a prediction to corroborate with annotations.",
            "assertions": [
              { "type": "should_trigger", "value": true },
              { "type": "output_contains", "value": "variant" }
            ]
          },
          {
            "id": "in-silico-mutagenesis",
            "prompt": "Run in-silico mutagenesis across this enhancer to find which bases drive its activity.",
            "expected_output": "Invokes alterlab-borzoi to systematically mutate bases and read predicted-track deltas, localizing functionally important positions in the regulatory element.",
            "assertions": [
              { "type": "should_trigger", "value": true },
              { "type": "behavior", "value": "Performs in-silico mutagenesis using predicted-track changes." }
            ]
          },
          {
            "id": "near-miss-gnomad",
            "prompt": "How common is this variant in the general population? I just need its allele frequency.",
            "expected_output": "Should NOT trigger this skill; defers to alterlab-gnomad, which reports population allele frequencies. Borzoi predicts a variant's functional effect from sequence; it does not look up observed frequencies.",
            "assertions": [
              { "type": "should_not_trigger", "value": true },
              { "type": "output_contains", "value": "alterlab-gnomad" }
            ]
          },
          {
            "id": "near-miss-clinvar",
            "prompt": "Is this variant classified as pathogenic? I want its clinical significance from the curated database.",
            "expected_output": "Should NOT trigger this skill; defers to alterlab-clinvar for curated clinical significance. Borzoi offers a predicted regulatory effect, not a clinical classification lookup.",
            "assertions": [
              { "type": "should_not_trigger", "value": true },
              { "type": "output_contains", "value": "alterlab-clinvar" }
            ]
          }
        ]
      }
      
  • references
    • borzoi_usage.md 3.9 KB
      # Borzoi — Usage Reference
      
      Deeper detail for `alterlab-borzoi`, verified against the upstream `calico/borzoi` README and
      the `borzoi-pytorch` package (0.5.1, current as of 2026-09).
      
      ## Two runtimes
      
      | | Reference (TensorFlow) | PyTorch port |
      |---|---|---|
      | Package | `calico/borzoi` + `calico/baskerville`, installed from git (`pip install -e .`) | `pip install borzoi-pytorch` |
      | Framework pin | TensorFlow **2.15.x** | current PyTorch |
      | Weights | 4 replicate `.h5` files per species from `storage.googleapis.com/seqnn-share/borzoi/f{0..3}/`, or `./download_models.sh` | Hugging Face `johahi/borzoi-replicate-[0-3]`, `…-mouse` |
      | Extras | training (`calico/westminster`), data processing, published tutorials | Flashzoi and Borzoi Prime variants |
      
      The PyTorch port reproduces the reference implementation's predictions (the repo ships a
      comparison notebook); pick TensorFlow when you need the published training/scoring scripts,
      PyTorch when you want to embed Borzoi in a torch pipeline.
      
      ```python
      from borzoi_pytorch import Borzoi
      
      model = Borzoi.from_pretrained("johahi/borzoi-replicate-0").eval().cuda()
      
      # Flashzoi: ~3x faster at comparable or slightly better accuracy, needs FlashAttention-2
      fast = Borzoi.from_pretrained("johahi/flashzoi-replicate-0").eval().cuda()
      
      # Borzoi Prime (human head) uses its own class
      from borzoi_pytorch import Prime
      prime = Prime.from_pretrained("johahi/borzoi-prime-replicate-0").eval().cuda()
      ```
      
      Averaging the four replicates is the standard way to stabilise variant scores.
      
      ## Lineage
      
      Borzoi extends the **Enformer** sequence-to-function paradigm to a longer context window and
      RNA-seq coverage prediction (Linder et al., *Nature Genetics* 2025,
      doi:10.1038/s41588-024-02053-6). Existing Enformer tooling concepts — input window, one-hot
      encoding, multi-track output, SAD/SED-style variant scoring — carry over.
      
      ## Predicting tracks
      
      1. Extract the reference sequence window centred on the locus (coordinates + a genome
         reference FASTA, or a supplied FASTA).
      2. One-hot encode it to the model's expected input length.
      3. Run the model to get predicted coverage across its output tracks (RNA-seq, CAGE, ATAC,
         ChIP; human and mouse heads have different track sets — read the `targets.txt` that ships
         with the weights to map track indices to assays/tissues).
      
      ## Variant effect scoring
      
      1. Build **reference** and **alternate** sequences for the variant, centred in the window.
      2. Predict tracks for both.
      3. Summarise the difference (SAD/SED-style aggregates over the relevant gene or region).
      
      The upstream repo's `tutorials/latest/score_variants` (and a `legacy` variant using the
      manuscript's transformations) is the reference implementation — follow it rather than
      re-deriving the aggregation. The curated e-/s-/pa-/ipaQTL benchmark sets used in the paper
      are published under `gs://borzoi-paper/qtl/`, which is the honest way to calibrate what a
      given score magnitude means.
      
      Prioritise candidate non-coding variants by predicted change, and remember this is a
      *prediction*: corroborate with measured data and known annotations (`alterlab-gnomad` for
      frequency, `alterlab-clinvar` for clinical significance).
      
      ## In-silico mutagenesis
      
      Mutate each base across a regulatory element and read predicted-track deltas to localise the
      functionally important positions. The repo's `tutorials/latest/interpret_sequence` covers
      gradient-based attribution as a cheaper alternative to exhaustive ISM.
      
      ## Mini Borzoi models
      
      Calico also publishes smaller models trained on subsets of modalities (e.g. K562 RNA-seq
      only, or DNase+ATAC+RNA) under `gs://seqnn-share/borzoi/mini/`, each with its own
      `targets.txt` and `params.json`. These are a good fit when you only care about one assay and
      want a faster model.
      
      ## GPU dispatch
      
      Genome-wide or many-variant scans are heavy — dispatch via `alterlab-remote-compute`
      (submit → poll → harvest), and consider Flashzoi plus replicate-averaging to keep runtime
      manageable.
      
  • SKILL.md 4.7 KB
    ---
    name: alterlab-borzoi
    description: Predict genome-wide functional genomics tracks from DNA sequence with Borzoi (Linder 2025) — a sequence-to-function model outputting RNA-seq, CAGE, ATAC, and ChIP coverage across long context, used to score non-coding and regulatory variant effects. Use when predicting functional tracks from a DNA sequence, scoring a non-coding/regulatory variant's effect on expression or chromatin, or doing in-silico mutagenesis of a locus. To LOOK UP a variant's population frequency prefer alterlab-gnomad; for its clinical significance prefer alterlab-clinvar; for protein-structure effects prefer alterlab-alphafold; for single-cell foundation models prefer alterlab-scgpt. Part of the AlterLab Academic Skills suite.
    license: Apache-2.0
    allowed-tools: Read Write Edit Bash(python:*) Bash(uv:*)
    compatibility: "Reference TensorFlow code (`calico/borzoi` + `calico/baskerville` from git, TF 2.15.x) or the PyTorch port `borzoi-pytorch` (0.5.1 as of 2026-09, Hugging Face weights), under `uv run python`. Weights cache after first download; a CUDA GPU is strongly recommended (~500 kb DNA context). Input: DNA (FASTA or coordinates + reference); output: multi-track coverage arrays. Dispatch large scans via alterlab-remote-compute."
    metadata:
        skill-author: AlterLab
        version: "1.1.0"
        last_updated: "2026-09-23"
    ---
    
    # Borzoi (sequence → function)
    
    ## Overview
    
    **Borzoi** (Linder et al. 2025; `calico/borzoi`) is a **sequence-to-function** deep-learning
    model: given a DNA sequence over a long genomic context, it predicts **genome-wide functional
    tracks** — RNA-seq, CAGE, ATAC-seq, and ChIP coverage across many assays/tissues. Its headline
    use is **non-coding variant effect scoring**: run the reference and alternate alleles through
    the model and compare predicted tracks to estimate a regulatory variant's impact on expression
    or chromatin.
    
    It **predicts** function from sequence; it does not *look up* known variants. For a variant's
    population frequency use `alterlab-gnomad`; for clinical significance use `alterlab-clinvar`.
    
    ## When to Use This Skill
    
    Use this skill when the user wants to:
    - Predict **functional tracks** (RNA-seq/CAGE/ATAC/ChIP) from a DNA sequence or locus.
    - Score a **non-coding / regulatory variant's** predicted effect (ref vs. alt).
    - Run **in-silico mutagenesis** to find driver bases in a regulatory element.
    - Prioritize candidate regulatory variants by predicted functional impact.
    
    ### Does NOT Trigger
    
    | Scenario | Use instead |
    |----------|-------------|
    | Look up a variant's **population frequency** | `alterlab-gnomad` |
    | Look up a variant's **clinical significance** | `alterlab-clinvar` |
    | Predict a **protein-structure** / coding effect | `alterlab-alphafold` |
    | Single-cell foundation-model tasks | `alterlab-scgpt` |
    | Standard variant calling from reads | `alterlab-nf-core-sarek` (or the relevant pipeline skill) |
    
    ## Core Capabilities
    
    ### 1. Track prediction from sequence
    
    The quickest path is the PyTorch port, which loads ported weights straight from the Hub:
    
    ```python
    from borzoi_pytorch import Borzoi
    
    # replicates 0-3, human by default; 'johahi/borzoi-replicate-0-mouse' for mouse heads
    model = Borzoi.from_pretrained("johahi/borzoi-replicate-0").eval().cuda()
    # one-hot encode the reference window around your locus, then:
    # predictions = model(one_hot_batch)   # (batch, tracks, bins)
    ```
    
    The reference TensorFlow implementation (`calico/borzoi` on top of `calico/baskerville`)
    is the source of truth for the published results and ships the variant-scoring and
    interpretation tutorials. Either way: provide a genome window (coordinates + reference, or a
    FASTA), one-hot encode it, and read predicted coverage across the output tracks.
    
    ### 2. Non-coding variant effect scoring
    
    The core workflow: build the **reference** and **alternate** sequences for a variant, predict
    tracks for each, and quantify the difference (e.g. SAD/SED-style scores) to estimate the
    variant's regulatory effect. Prioritize candidates by the magnitude of predicted change.
    
    ### 3. In-silico mutagenesis
    
    Systematically mutate bases across a regulatory element and read the predicted-track deltas to
    localize functionally important positions (motif/driver discovery).
    
    ### 4. GPU and dispatch
    
    Borzoi takes long context and is GPU-heavy; genome-wide or many-variant scans should be
    dispatched via `alterlab-remote-compute` (submit → poll → harvest). **Flashzoi**
    (`johahi/flashzoi-replicate-0..3`, needs FlashAttention-2) is a drop-in ~3x faster variant at
    comparable accuracy — worth it for large scans.
    
    ## Resources
    
    - `references/borzoi_usage.md` — install/pinning, sequence extraction, predict calls,
      ref/alt variant scoring, in-silico mutagenesis, and Enformer lineage. Loaded on demand.
    
    Part of the AlterLab Academic Skills suite.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related