[Integrations](https://spiral.ai/integrations) › [Claude Code](https://spiral.ai/integrations/claude-code) › [gnomAD gene constraint](https://spiral.ai/integrations/claude-code/gnomad-gene-constraint)

# How to Use gnomAD gene constraint in Claude Code

Returns gnomAD observed and expected variant counts, observed/expected ratios, LOEUF, pLI, and missense and synonymous Z-scores. Use it to compare genes' tolerance to variation and prioritize research candidates.

|  |  |
| --- | --- |
| Model | gnomAD gene constraint |
| Available through | Alexandria |
| Category | Health |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with gnomAD gene constraint in Claude Code

- Use gnomAD gene constraint to extract GRCh38 results for SCN1A, SCN2A, and KCNQ2, then add LOEUF, pLI, and observed and expected loss-of-function counts to the project's gene table.
- Use gnomAD gene constraint to retrieve results for CHD7 and CHD8, then create a CSV in the project showing transcript identifiers, LOEUF, pLI, and missense Z-scores.
- Use gnomAD gene constraint to compare available PTEN transcript results and update the project's report to identify which transcript each score describes.
- Use gnomAD gene constraint to compare GRCh37 and GRCh38 results for SCN1A, then write a project report with observed/expected ratios and Z-scores side by side.
- Use gnomAD gene constraint to retrieve BRCA1, BRCA2, and PALB2 results, then add a comparison table to the research notebook with counts, LOEUF, pLI, and transcript identifiers.

## How to set up gnomAD gene constraint in Claude Code

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**: This adds Spiral to the current project. Add `--scope user` to use it in every project.

```bash
claude mcp add --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `claude`, type `/mcp`, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

### Use the Spiral skill

1. **Send Claude Code this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run gnomAD gene constraint**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "gnomad-broadinstitute-org/genes/constraint",
    "input": {
      "gene": "<gene>"
    }
  }'
```

Then paste one of the prompts above: Claude Code finds gnomAD gene constraint on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/claude-code

## gnomAD gene constraint tools and prices

- [Population allele frequencies and gene constraint (Broad Institute) · Constraint](https://spiral.ai/tools/alexandria/gnomad-broadinstitute-org/genes/constraint) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| reference_genome | GRCh38, GRCh37 | — | GRCh38 for gnomAD v4.1.2 constraint (the default) or GRCh37 for v2.1.1. A pasted URL's dataset picks it when this is absent. |

## What can you do with gnomAD gene constraint in Claude Code?

Add transcript-specific constraint evidence to a research gene table in your project. A coding agent can join observed and expected counts, LOEUF, pLI, and Z-scores while keeping release comparisons explicit.

### Prioritize research genes by loss-of-function constraint

Compare LOEUF, pLI, and observed versus expected loss-of-function counts for a candidate gene list. Produce a ranked table with the transcript used for each comparison.

### Compare missense and loss-of-function depletion

Place missense Z-scores beside LOEUF and pLI for genes such as SCN1A, SCN2A, and KCNQ2. Identify which type of variation drives each gene's constraint evidence.

### Check transcript-dependent results

Compare available transcript scores for a gene before selecting a single row for a research report. Keep MANE Select and canonical transcript choices explicit.

### Revisit an analysis built on older constraint data

Compare v2.1.1 and current constraint results for the same research genes. Show observed/expected ratios alongside Z-scores to expose changes influenced by sample size.

### Annotate a research gene table

Add constraint counts, ratios, LOEUF, pLI, and Z-scores to a project's gene table. Preserve transcript identifiers so later comparisons use the same biological unit.

### Audit changes after a constraint release

Compare stored constraint results with a new retrieval. Report changes to numeric scores separately from rank and bin changes, following the distinction in the v4.1.2 correction.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Claude Code guides](https://spiral.ai/integrations/claude-code)

## gnomAD gene constraint in other agents

- [Amp](https://spiral.ai/integrations/amp/gnomad-gene-constraint)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/gnomad-gene-constraint)
- [Claude](https://spiral.ai/integrations/claude-desktop/gnomad-gene-constraint)
- [Cline](https://spiral.ai/integrations/cline/gnomad-gene-constraint)
- [Codex](https://spiral.ai/integrations/codex/gnomad-gene-constraint)
- [Cursor](https://spiral.ai/integrations/cursor/gnomad-gene-constraint)
- [Devin](https://spiral.ai/integrations/devin/gnomad-gene-constraint)
- [dots](https://spiral.ai/integrations/dots/gnomad-gene-constraint)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/gnomad-gene-constraint)
- [Gemini](https://spiral.ai/integrations/gemini/gnomad-gene-constraint)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/gnomad-gene-constraint)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/gnomad-gene-constraint)
- [goose](https://spiral.ai/integrations/goose/gnomad-gene-constraint)
- [Grok](https://spiral.ai/integrations/grok/gnomad-gene-constraint)
- [Grok Build](https://spiral.ai/integrations/grok-build/gnomad-gene-constraint)
- [Hermes](https://spiral.ai/integrations/hermes/gnomad-gene-constraint)
- [Instinct](https://spiral.ai/integrations/instinct/gnomad-gene-constraint)
- [Manus](https://spiral.ai/integrations/manus/gnomad-gene-constraint)
- [Muse](https://spiral.ai/integrations/muse/gnomad-gene-constraint)
- [Muse Code](https://spiral.ai/integrations/muse-code/gnomad-gene-constraint)
- [n8n](https://spiral.ai/integrations/n8n/gnomad-gene-constraint)
- [Notion](https://spiral.ai/integrations/notion/gnomad-gene-constraint)
- [OpenClaw](https://spiral.ai/integrations/openclaw/gnomad-gene-constraint)
- [opencode](https://spiral.ai/integrations/opencode/gnomad-gene-constraint)
- [Perplexity](https://spiral.ai/integrations/perplexity/gnomad-gene-constraint)
- [Raycast](https://spiral.ai/integrations/raycast/gnomad-gene-constraint)
- [VS Code](https://spiral.ai/integrations/vscode/gnomad-gene-constraint)
- [Windsurf](https://spiral.ai/integrations/windsurf/gnomad-gene-constraint)
- [Zapier](https://spiral.ai/integrations/zapier/gnomad-gene-constraint)

## More Claude Code guides

- [gnomAD allele frequencies](https://spiral.ai/integrations/claude-code/gnomad-allele-frequencies)
- [gnomAD gene variation search](https://spiral.ai/integrations/claude-code/gnomad-gene-variation-search)
- [dbSNP population allele frequencies](https://spiral.ai/integrations/claude-code/dbsnp-population-allele-frequencies)
- [851 Labs Background Remover](https://spiral.ai/integrations/claude-code/851-labs-background-remover)
- [dbSNP SNP details](https://spiral.ai/integrations/claude-code/dbsnp-snp-details)
- [Age Modify](https://spiral.ai/integrations/claude-code/age-modify)

## Questions about gnomAD gene constraint in Claude Code

**Can Claude Code use gnomAD gene constraint?**

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run gnomAD gene constraint like any built-in tool.

**How much does gnomAD gene constraint cost in Claude Code?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Claude Code plan is separate.

**Do I need an Alexandria account to use gnomAD gene constraint in Claude Code?**

No. Spiral runs gnomAD gene constraint on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up gnomAD gene constraint in Claude Code?**

About two minutes: add the hosted server, then sign in.

**Does Claude Code wait while gnomAD gene constraint runs?**

gnomAD gene constraint runs in the background. Claude Code starts the run, checks on it and gives you the json when it's ready.

**What does gnomAD gene constraint measure?**

It compares observed variation with the amount expected under a mutation model. The data include missense and synonymous Z-scores, plus LOEUF and pLI for loss-of-function constraint.

**Does the loss-of-function count include frameshift variants?**

No. Constraint counts use single nucleotide variants below 0.1% alternate allele frequency that pass quality control; the loss-of-function model excludes frameshift-producing insertions and deletions.

**Which transcript represents a gene?**

The gene display uses MANE Select for v4 on GRCh38 and canonical transcripts for v2 on GRCh37. Calculations also exist for other transcripts, so a gene symbol alone does not establish which transcript's score you are comparing.

**What changed in the v4.1.2 constraint update?**

v4.1.2 fixes ranks and bins that previously included transcripts with missing constraint values in their ranking denominator. LOEUF and the other constraint values remain unchanged from v4.1.1.

**What LOEUF cutoff does gnomAD recommend?**

For v4.1.1 constraint interpretation, gnomAD recommends LOEUF below 0.45 when a cutoff is necessary. v4.1.2 leaves those metric values unchanged.

