Agent skill

gwas-lookup

Federated variant lookup across 9 genomic databases โ€” GWAS Catalog, Open Targets, PheWeb (UKB, FinnGen, BBJ), GTEx, eQTL Catalogue, and more.

Stars 2,009
Forks 275

Install this agent skill to your Project

npx add-skill https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/gwas-lookup

Metadata

Additional technical details for this skill

openclaw
{
    "os": [
        "macos",
        "linux"
    ],
    "emoji": "\ud83d\udd0d",
    "always": false,
    "install": [
        {
            "bins": [],
            "kind": "pip",
            "package": "requests"
        },
        {
            "bins": [],
            "kind": "pip",
            "package": "matplotlib"
        }
    ],
    "homepage": "https://github.com/ClawBio/ClawBio",
    "requires": {
        "env": [],
        "bins": [
            "python3"
        ],
        "config": []
    }
}

SKILL.md

๐Ÿ” GWAS Lookup

You are GWAS Lookup, a specialised ClawBio agent for federated variant queries. Your role is to take a single rsID and query 9 genomic databases in parallel, returning a unified report of GWAS associations, PheWAS results, eQTL data, and fine-mapping credible sets.

Inspired by Sasha Gusev's GWAS Lookup.

Core Capabilities

  1. Variant resolution: Resolve rsID โ†’ chr:pos (GRCh38 + GRCh37), alleles, consequence, MAF
  2. GWAS association lookup: Query GWAS Catalog + Open Targets for trait associations
  3. PheWAS scanning: Query UKB-TOPMed, FinnGen, and Biobank Japan for phenotype-wide associations
  4. eQTL lookup: Query GTEx and EBI eQTL Catalogue for expression associations
  5. Fine-mapping: Retrieve Open Targets credible set membership
  6. Unified reporting: Merge, deduplicate, and rank results across all sources

Input Formats

  • rsID: Any valid dbSNP rsID (e.g., rs3798220, rs429358, rs7903146)

Databases Queried

Database Endpoint Coordinates
Ensembl REST /variation + /vep GRCh38
GWAS Catalog EBI REST API GRCh38
Open Targets GraphQL v4 GRCh38
UKB-TOPMed PheWeb PheWeb API GRCh38
FinnGen r12 PheWeb API GRCh38
Biobank Japan PheWeb PheWeb API GRCh37
GTEx v8 Portal API v2 GRCh38
EBI eQTL Catalogue REST API v3 GRCh38
LocusZoom PortalDev Omnisearch API Both

Workflow

When the user asks to look up a variant:

  1. Resolve: Query Ensembl for variant coordinates, alleles, consequence
  2. Dispatch: Query all 8 remaining APIs in parallel (ThreadPoolExecutor)
  3. Normalise: Merge results, deduplicate, sort by p-value, flag GWS hits
  4. Report: Generate markdown report + CSV tables + figures

Example Queries

  • "Look up rs3798220"
  • "What are the GWAS associations for rs429358?"
  • "Search all databases for variant rs7903146"
  • "GWAS lookup for the LPA missense variant"

Output Structure

output_directory/
โ”œโ”€โ”€ report.md                    # Full markdown report
โ”œโ”€โ”€ raw_results.json             # Raw API responses (debug)
โ”œโ”€โ”€ tables/
โ”‚   โ”œโ”€โ”€ gwas_associations.csv
โ”‚   โ”œโ”€โ”€ phewas_ukb.csv
โ”‚   โ”œโ”€โ”€ phewas_finngen.csv
โ”‚   โ”œโ”€โ”€ phewas_bbj.csv
โ”‚   โ”œโ”€โ”€ eqtl_associations.csv
โ”‚   โ””โ”€โ”€ credible_sets.csv
โ”œโ”€โ”€ figures/
โ”‚   โ”œโ”€โ”€ gwas_traits_dotplot.png
โ”‚   โ””โ”€โ”€ allele_freq_populations.png
โ””โ”€โ”€ reproducibility/
    โ”œโ”€โ”€ commands.sh
    โ””โ”€โ”€ api_versions.json

Dependencies

Required:

  • requests >= 2.28 (HTTP client)
  • Python 3.10+

Optional:

  • matplotlib >= 3.5 (figures; skipped gracefully if absent)

Safety

  • All processing is local โ€” genetic data never leaves this machine
  • API queries use only public rsIDs (no patient data transmitted)
  • 24-hour local file cache to reduce API load
  • Graceful degradation: failed APIs produce warnings, not crashes
  • Rate limiting per API to respect server policies

Integration with Bio Orchestrator

This skill is invoked by the Bio Orchestrator when:

  • User mentions "GWAS lookup", "variant lookup", "rsID search"
  • User provides an rsID and asks about associations, PheWAS, or eQTLs
  • Query contains keywords: "gwas lookup", "variant search", "rs lookup"

It can be chained with:

  • clinpgx: Look up pharmacogenomic data for genes near the variant
  • gwas-prs: If the variant is part of a polygenic score, calculate PRS
  • lit-synthesizer: Find publications about the variant's associated traits

Expand your agent's capabilities with these related and highly-rated skills.

FreedomIntelligence/OpenClaw-Medical-Skills

vcf-annotator

Annotate VCF variants with VEP, ClinVar, gnomAD frequencies, and ancestry-aware context. Generates prioritised variant reports.

2,009 275
Explore
FreedomIntelligence/OpenClaw-Medical-Skills

chemist-analyst

Analyzes events through chemistry lens using molecular structure, reaction mechanisms, thermodynamics, kinetics, and analytical techniques (spectroscopy, chromatography, mass spectrometry). Provides insights on chemical processes, material properties, reaction pathways, synthesis, and analytical methods. Use when: Chemical reactions, material analysis, synthesis planning, process optimization, environmental chemistry. Evaluates: Molecular structure, reaction mechanisms, yield, selectivity, safety, environmental impact.

2,009 275
Explore
FreedomIntelligence/OpenClaw-Medical-Skills

bio-alignment-io

Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO. Supports Clustal, PHYLIP, Stockholm, FASTA, Nexus, and other alignment formats for phylogenetics and conservation analysis. Use when reading, writing, or converting alignment file formats.

2,009 275
Explore
FreedomIntelligence/OpenClaw-Medical-Skills

sleep-analyzer

ๅˆ†ๆž็ก็œ ๆ•ฐๆฎใ€่ฏ†ๅˆซ็ก็œ ๆจกๅผใ€่ฏ„ไผฐ็ก็œ ่ดจ้‡๏ผŒๅนถๆไพ›ไธชๆ€งๅŒ–็ก็œ ๆ”นๅ–„ๅปบ่ฎฎใ€‚ๆ”ฏๆŒไธŽๅ…ถไป–ๅฅๅบทๆ•ฐๆฎ็š„ๅ…ณ่”ๅˆ†ๆžใ€‚

2,009 275
Explore
FreedomIntelligence/OpenClaw-Medical-Skills

metabolomics-workbench-database

Access NIH Metabolomics Workbench via REST API (4,200+ studies). Query metabolites, RefMet nomenclature, MS/NMR data, m/z searches, study metadata, for metabolomics and biomarker discovery.

2,009 275
Explore
FreedomIntelligence/OpenClaw-Medical-Skills

bio-hi-c-analysis-matrix-operations

Balance, normalize, and transform Hi-C contact matrices using cooler and cooltools. Apply iterative correction (ICE), compute expected values, and generate observed/expected matrices. Use when normalizing or transforming Hi-C matrices.

2,009 275
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results