Gnomad Database
Google DeepMindOfficialPublished by Google DeepMind
- Skill
- Tool integration
- Science and research
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The gnomad-database skill provides a structured interface to query the Genome Aggregation Database (gnomAD). It enables researchers to retrieve allele frequencies for specific genetic variants, obtain gene constraint metrics such as pLI and LOEUF scores, and search for variants within defined genomic regions or genes. The skill includes helper scripts to manage API interactions and rate limits, ensuring consistent data retrieval for genomic analysis.
What it does
- Retrieves global and ancestry-specific allele frequencies for genetic variants.
- Fetches gene constraint metrics including pLI and LOEUF scores.
- Searches for variants within specific genomic regions or genes.
- Supports querying by variant ID, rsID, or gene symbol.
- Provides filtering allele frequency (FAF) data for variant assessment.
When to use it
- When determining the rarity or allele frequency of specific genetic variants.
- When assessing loss-of-function intolerance using gene constraint metrics.
- When identifying variants located within a particular gene or genomic coordinate range.
- When querying structural variants in the context of population genetics.
Advantages
- Automated handling of API rate limits via provided helper scripts.
- Standardized output formats for variant and gene constraint data.
- Integration with local execution environments using managed dependencies.
- Direct access to aggregated population-scale genomic data.
Usage examples
- “Get the allele frequency for variant 1-55516888-G-GA.”
- The agent executes the variant frequency script and returns a JSON file containing global and ancestry-specific allele frequencies for the specified variant.
- “What are the constraint metrics for the BRCA1 gene?”
- The agent retrieves the pLI and LOEUF scores for BRCA1 and saves the data to a JSON file.
- “Find all missense variants in the TP53 gene.”
- The agent queries the database for TP53 variants filtered by the missense consequence and outputs the results to a file.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google-deepmind/gnomad-database/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gnomad-database.zip -d .agents/skills
Documentation by Google DeepMind
gnomAD Database
Prerequisites
uv: Read theuvskill and follow its Setup instructions to ensureuvis installed and on PATH.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.
# 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.json2. Gene Constraint. Retrieves constraint metrics for a gene. The response
will explicitly contain pli, and the LOEUF score is represented by
oe_lof_upper.
uv run scripts/get_gene_constraint.py --gene {gene_symbol} --output {gene_symbol}_constraint.json3. Region/Gene Variant Search. Finds all variants in a region or gene.
# 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.jsonReferences
Further documentation on the data: https://gnomad.broadinstitute.org/data#api More general database documentation: https://gnomad.broadinstitute.org/help
Files
- ATTRIBUTION.mdAdded by AutoGineer912 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md3.0 KiB
- references/citation.bib5.1 KiB
- scripts/get_gene_constraint.pyScript2.4 KiB
- scripts/get_variant_frequency.pyScript4.2 KiB
- scripts/search_variants.pyScript5.2 KiB
scripts/get_gene_constraint.py
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Fetches gene constraint metrics from gnomAD.
This script retrieves constraint metrics (pLI, LOEUF, etc.) for a given gene
from the gnomAD database using its GraphQL API. It enforces a rate limit
of 10 queries per minute to respect the API's usage policy.
"""
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "polite-http",
# ]
# ///
import argparse
import json
import os
from polite_http import http_client
# Respect 10 queries per minute requirement.
CLIENT = http_client.HttpClient("https://gnomad.broadinstitute.org", qps=0.1666)
def get_gene_constraint(
gene_symbol: str,
output_path: str,
):
"""Fetch gene constraint from gnomAD."""
url = "https://gnomad.broadinstitute.org/api"
query = """
query($geneSymbol: String!, $referenceGenome: ReferenceGenomeId!) {
gene(gene_symbol: $geneSymbol, reference_genome: $referenceGenome) {
gene_id
symbol
gnomad_constraint {
pli
oe_lof
oe_lof_lower
oe_lof_upper
oe_mis
oe_mis_lower
oe_mis_upper
}
}
}
"""
variables = {"geneSymbol": gene_symbol, "referenceGenome": "GRCh38"}
response_data = CLIENT.fetch_json(
url,
method="POST",
json_body={"query": query, "variables": variables},
)
result = json.dumps(response_data, indent=2)
os.makedirs(os.path.dirname(output_path), exist_ok=True)
with open(output_path, "w") as f:
f.write(result)
f.write("\n")
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Fetch gene constraint from gnomAD"
)
parser.add_argument("--gene", required=True, help="Gene symbol (e.g. PCSK9)")
parser.add_argument(
"--output",
"-o",
required=True,
help="Output file path. Prints to stdout if not specified.",
)
args = parser.parse_args()
get_gene_constraint(args.gene, args.output)
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Google DeepMind
- Publisher
- Google DeepMind (Official)
- Source
- google-deepmind/science-skills · skills/gnomad_database · commit 4de6786
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google DeepMind.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gnomad-database.zip