Opengwas Tools

Configuration File: opengwas_tools.json Tool Type: Local Tools Count: 1

This page contains all tools defined in the opengwas_tools.json configuration file.

Available Tools

OpenGWAS_get_mr_instruments (Type: OpenGWASTool)

Assemble harmonized two-sample Mendelian randomization (MR) instruments from the IEU OpenGWAS dat…

OpenGWAS_get_mr_instruments tool specification

Tool Information:

  • Name: OpenGWAS_get_mr_instruments

  • Type: OpenGWASTool

  • Description: Assemble harmonized two-sample Mendelian randomization (MR) instruments from the IEU OpenGWAS database for an arbitrary exposure/outcome GWAS pair. Fetches the genome-wide significant, LD-clumped SNP instruments for the exposure (/tophits) and those SNPs’ effects in the outcome GWAS (/associations), then aligns both onto a common effect allele so the result is ready to feed into an IVW or MR-Egger estimator. Use this when EpiGraphDB’s pre-computed MR-EvE does not cover the trait pair, or when you need custom instruments (own p-value/clumping thresholds). Requires a free OpenGWAS JWT token. Pass OpenGWAS study IDs (e.g. ‘ieu-a-2’ for BMI, ‘ieu-a-7’ for coronary heart disease); use EpiGraphDB_search_opengwas to look IDs up by trait name.

Parameters:

  • exposure_id (string) (required) IEU OpenGWAS study ID for the exposure (e.g. ‘ieu-a-2’). Find IDs via EpiGraphDB_search_opengwas.

  • outcome_id (string) (optional) IEU OpenGWAS study ID for the outcome (e.g. ‘ieu-a-7’). Optional — omit to return only the exposure instruments.

  • pval (number) (optional) Instrument p-value threshold for the exposure (default 5e-8, genome-wide significance).

  • clump (integer) (optional) 1 to LD-clump instruments to independent SNPs (default), 0 to skip clumping.

  • r2 (number) (optional) LD r2 threshold for clumping (default 0.001).

  • kb (integer) (optional) Clumping window in kb (default 10000).

  • pop (string) (optional) Reference population for LD clumping (default ‘EUR’).

Example Usage:

query = {
    "name": "OpenGWAS_get_mr_instruments",
    "arguments": {
        "exposure_id": "example_value"
    }
}
result = tu.run(query)