Forge Tools gwas_catalog

gwas_catalog read

scidex.forge.gwas_catalog

Query the NHGRI-EBI GWAS Catalog for genome-wide-significant variant-trait associations. Accepts gene symbols and/or a trait keyword. Returns rsID, mapped gene, trait, p-value, odds ratio, effect allele, study accession, and PubMed ID. Complements ClinVar (rare clinical variants) with common GWAS evidence. REST API: https://www.ebi.ac.uk/gwas/rest/api — public, no auth.

HTTP: POST /api/scidex/forge/gwas_catalog

Invoke

Calls scidex.tool.invoke on the substrate with this tool name. Edit the JSON below — it must match the input schema. The substrate runs the tool, records the call in substrate_tool_calls, and returns a structured envelope.

Sign in to invoke this tool. Schema and curl snippet are visible to anyone.

Schemas

Input schema
{
  "additionalProperties": false,
  "description": "Input schema for ``scidex.forge.gwas_catalog``.",
  "properties": {
    "gene_symbols": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "HGNC gene symbols to query (e.g. ``['APOE', 'BIN1']``). Returns associations where the mapped gene matches. Mutually inclusive with ``trait`` — at least one must be provided.",
      "title": "Gene Symbols"
    },
    "trait": {
      "anyOf": [
        {
          "maxLength": 200,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Disease or trait keyword (e.g. ``'Alzheimer disease'``). Matched against the GWAS Catalog diseaseTraits field. At least one of ``gene_symbols`` / ``trait`` must be provided.",
      "title": "Trait"
    },
    "p_value_threshold": {
      "default": 5e-8,
      "description": "Maximum p-value for inclusion. Default 5e-8 (genome-wide significance threshold). Raise to 1e-5 to include sub-threshold hits.",
      "exclusiveMinimum": 0,
      "maximum": 1,
      "title": "P Value Threshold",
      "type": "number"
    },
    "limit": {
      "default": 20,
      "description": "Maximum number of associations to return per query. Default 20.",
      "maximum": 200,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    }
  },
  "title": "ForgeGWASCatalogIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "GWASAssociation": {
      "description": "One GWAS variant-trait association from the NHGRI-EBI Catalog.",
      "properties": {
        "variant_id": {
          "description": "dbSNP rsID (e.g. ``rs429358``).",
          "title": "Variant Id",
          "type": "string"
        },
        "mapped_gene": {
          "default": "",
          "description": "Author-reported mapped gene symbol.",
          "title": "Mapped Gene",
          "type": "string"
        },
        "trait_name": {
          "default": "",
          "description": "Disease / trait name.",
          "title": "Trait Name",
          "type": "string"
        },
        "efo_trait_uri": {
          "default": "",
          "description": "EFO ontology URI for the trait (may be empty).",
          "title": "Efo Trait Uri",
          "type": "string"
        },
        "p_value": {
          "description": "Association p-value (genome-wide scale).",
          "title": "P Value",
          "type": "number"
        },
        "odds_ratio": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Odds ratio per copy (``orPerCopyNum``); None if not reported.",
          "title": "Odds Ratio"
        },
        "effect_allele": {
          "default": "",
          "description": "Effect allele (from ``riskAlleleName`` after the hyphen).",
          "title": "Effect Allele",
          "type": "string"
        },
        "study_accession": {
          "default": "",
          "description": "GWAS Catalog study accession (e.g. ``GCST000538``).",
          "title": "Study Accession",
          "type": "string"
        },
        "pubmed_id": {
          "default": "",
          "description": "PubMed ID of the primary publication.",
          "title": "Pubmed Id",
          "type": "string"
        }
      },
      "required": [
        "variant_id",
        "p_value"
      ],
      "title": "GWASAssociation",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.gwas_catalog``.",
  "properties": {
    "associations": {
      "description": "Genome-wide-significant variant-trait associations.",
      "items": {
        "$ref": "#/$defs/GWASAssociation"
      },
      "title": "Associations",
      "type": "array"
    },
    "took_ms": {
      "description": "Wall-clock time for the upstream call(s).",
      "title": "Took Ms",
      "type": "integer"
    }
  },
  "required": [
    "took_ms"
  ],
  "title": "ForgeGWASCatalogOut",
  "type": "object"
}

curl snippet

Replace $SCIDEX_JWT with a valid bearer token. Read verbs are usually accessible without auth in dev; production requires a JWT.

curl -sS -X POST '/api/scidex/forge/gwas_catalog' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.