Skip to main content
skill CX Codex

gnomad-database — Claude Code skill: what it does, how to install

This skill queries gnomAD for variant frequencies, gene constraint metrics, and regional variant searches. Use it for genetics research workflows.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add google-deepmind/science-skills --skill gnomad-database -a claude-code
npx skills add google-deepmind/science-skills --skill gnomad_database -a claude-code
Open on GitHub

What gnomad-database does

The skill queries the Genome Aggregation Database through helper scripts. It retrieves allele frequency for a variant by variant_id or rsID, with ancestry data, homozygote counts, and FAF. Another script returns pli and oe_lof_upper for a gene. A region or gene search can find variants with pLoF or missense consequences, and the skill also supports structural variant queries.

uv must be installed and available on PATH. Before first use, the skill checks for .licenses/gnomad_database_LICENSE.txt, asks the user to review gnomAD terms, and records a notification with a timestamp. Check uv first. The supplied scripts are get_variant_frequency.py, get_gene_constraint.py, and search_variants.py; they run through uv run and write JSON output.

What it helps with

  • check the frequency of a genetic variant
  • retrieve constraint metrics for a gene
  • search for variants across a gene or region
  • query structural variants
  • look up a variant by rsID or genomic coordinates

Example prompts for the agent

  • Check the gnomAD frequency for 1-55516888-G-GA and save the result to variant_frequency.json.
  • Get pli and oe_lof_upper for BRCA1 and write them to BRCA1_constraint.json.
  • Search BRCA1 for pLoF variants and save the results to BRCA1_variants.json.

How to install gnomad-database

1Skills CLI (Vercel)

npx skills add google-deepmind/science-skills --skill gnomad-database -a claude-code
npx skills add google-deepmind/science-skills --skill gnomad_database -a claude-code

2Manually: put the files in place

~/.claude/skills/gnomad_database/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gnomad_database/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gnomad-database

How do I install gnomad-database in Claude Code?

Run npx skills add google-deepmind/science-skills --skill gnomad-database -a claude-code, then check ~/.claude/skills/gnomad_database/SKILL.md.

What does gnomad-database do?

It queries gnomAD for genetic variant frequencies, pli and oe_lof_upper gene metrics, and variants found in genes or genomic regions.

What does gnomad-database require?

uv must be available on PATH. On first use, review the gnomAD terms and let the skill save the notice in .licenses/gnomad_database_LICENSE.txt.

Source text

SKILL.md · Apache-2.0
---
name: gnomad-database
description: >
  Query the Genome Aggregation Database (gnomAD). Use when determining the
  rarity or allele frequency of specific genetic variants, retrieving gene
  constraint metrics (pLI, LOEUF) to assess loss-of-function intolerance,
  finding variants in a genomic region or gene, or querying structural variants.
  Don't use for analyzing individual patient genomes, tracking somatic mutations
  in cancer (use COSMIC), or requesting raw sequencing reads (use ENA).
---

# gnomAD Database

## Prerequisites

1.  **`uv`**: Read the `uv` skill and follow its Setup instructions to ensure
    `uv` is installed and on PATH.
2.  **User Notification**: If .licenses/gnomad_database_LICENSE.txt does not
    already exist in the workspace root directory then (1) prominently notify
    the user to check the terms at https://gnomad.broadinstitute.org/policies
    and https://gnomad.broadinstitute.org/data#api, then (2) create the file
    recording the notification text and timestamp.

## Core Rules

-   **Use the Wrapper**: ALWAYS execute the provided helper scripts to query the
    database rather than accessing the database directly. The scripts
    automatically enforce the gnomAD API rate limits gracefully.
-   **Notification**: If this skill is used, ensure this is mentioned in the
    output.

## Utility Scripts

All scripts are located in the `scripts/` subdirectory of this skill's
installation directory. When running them, use the full absolute path to the
script (e.g. `/path/to/gnomad_database/scripts/get_variant_frequency.py`).

**1. Variant Frequency.** Retrieves global and ancestry-specific allele
frequencies, homozygote counts, and **Grpmax Filtering AF** (faf95/faf99) for
exome, genome, and total (exome+genome combined) data. The filtering allele
frequency (FAF) is the maximum credible genetic ancestry group AF (lower bound
of the 95% or 99% CI). Variant ID format must be `chrom-pos-ref-alt` (e.g.,
`1-55516888-G-GA`). Alternately, you may provide an `rsID`.

```bash
# By variant ID:
uv run scripts/get_variant_frequency.py --variant_id {variant_id} [--dataset {dataset}] --output variant_frequency.json

# By rsID (e.g., rs1800562):
uv run scripts/get_variant_frequency.py --rsid {rsid} [--dataset {dataset}] --output variant_frequency.json
```

**2. Gene Constraint.** Retrieves constraint metrics for a gene. The response
will explicitly contain `pli`, and the LOEUF score is represented by
`oe_lof_upper`.

```bash
uv run scripts/get_gene_constraint.py --gene {gene_symbol} --output {gene_symbol}_constraint.json
```

**3. Region/Gene Variant Search.** Finds all variants in a region or gene.

```bash
# By region:
uv run scripts/search_variants.py --chrom {chrom} --start {start} --end {end} --output region_variants.json
# By gene:
uv run scripts/search_variants.py --gene {gene_symbol} --consequence {pLoF|missense} --output {gene_symbol}_variants.json
```

## References

Further documentation on the data: https://gnomad.broadinstitute.org/data#api
More general database documentation: https://gnomad.broadinstitute.org/help

© google-deepmind · Apache-2.0 · google-deepmind/science-skills

Similar skills

Everything for Science and research →

From the same set39

pdb-database Searches and downloads experimental 3D structures of biomolecules from RCSB PDB using sequence similarity, structure comparisons, or chemical attributes. CX Codex +1 2,200installs unibind-database This skill queries UniBind for experimentally validated transcription-factor binding sites and downloads BED or FASTA coordinates for local analysis. CX Codex +1 2,100installs ucsc-conservation-and-tfbs Pulls evolutionary conservation scores (phyloP, phastCons) and transcription factor binding sites out of the UCSC Genome Browser. Handy when you are reading non-coding variants. CX Codex +1 2,100installs encode-ccres-database Queries the ENCODE Registry of cis-regulatory elements using the SCREEN GraphQL API and REST API. It identifies promoters or enhancers across cell types. CX Codex +1 2,100installs quickgo-database Queries the QuickGO and ECO REST API to link genes to biological processes, molecular functions and cellular components. Useful when working through gene annotations. CX Codex +1 2,100installs jaspar-database Queries the JASPAR database for transcription factor binding profiles. Useful when fetching PFM or PWM matrices and converting gene names into stable matrix IDs. CX Codex +1 2,100installs gtex-database Retrieves RNA expression and eQTL data from GTEx across 54 non-diseased human tissue sites. Use it to query genes, variants, or tissue-specific expression. CX Codex +1 2,100installs foldseek-structural-search Sends a protein 3D structure file to the Foldseek API and returns structurally similar proteins. Built for cases where you have coordinates, not just a sequence. CX Codex +1 2,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor