Forge Tools enrichr

enrichr read

scidex.forge.enrichr

Run gene set enrichment analysis via Enrichr (maayanlab.cloud/Enrichr). Submits a list of HGNC gene symbols and returns ranked enriched terms from curated libraries: GO Biological Process/Molecular Function/Cellular Component, KEGG pathways, Reactome, MSigDB Hallmarks, GWAS Catalog, transcription factor target sets, and 200+ other libraries. Two-step API: POST /addList submits the gene list once; parallel GET /enrich queries each requested library concurrently. Input: 2–500 gene symbols; up to 50 terms per library sorted by combined_score. Unknown library names go silently to not_found_libraries. Enrichr is the most widely-used bioinformatics tool for interpreting gene lists. API: public, no auth required.

HTTP: POST /api/scidex/forge/enrichr

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.enrichr``.",
  "properties": {
    "gene_symbols": {
      "description": "HGNC gene symbols for enrichment analysis (e.g. ['TP53', 'BRCA1']). Minimum 2, maximum 500 symbols per call.",
      "items": {
        "type": "string"
      },
      "maxItems": 500,
      "minItems": 2,
      "title": "Gene Symbols",
      "type": "array"
    },
    "libraries": {
      "default": [
        "GO_Biological_Process_2023",
        "KEGG_2021_Human"
      ],
      "description": "Enrichr library names to query. Common options: GO_Biological_Process_2023, GO_Molecular_Function_2023, KEGG_2021_Human, Reactome_2022, MSigDB_Hallmark_2020, GWAS_Catalog_2023, TF_Perturbations_Followed_by_Expression. Unknown library names go to not_found_libraries without an error.",
      "items": {
        "type": "string"
      },
      "title": "Libraries",
      "type": "array"
    },
    "top_n": {
      "default": 10,
      "description": "Maximum terms to return per library, sorted by combined_score descending.",
      "maximum": 50,
      "minimum": 1,
      "title": "Top N",
      "type": "integer"
    },
    "description": {
      "default": "SciDEX enrichment",
      "description": "Label for the gene list (used by Enrichr for list naming).",
      "title": "Description",
      "type": "string"
    }
  },
  "required": [
    "gene_symbols"
  ],
  "title": "ForgeEnrichrIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "EnrichrLibraryResult": {
      "description": "Enrichment results for one Enrichr library.",
      "properties": {
        "library": {
          "description": "Enrichr library name queried.",
          "title": "Library",
          "type": "string"
        },
        "terms": {
          "description": "Ranked enriched terms (sorted by combined_score, limited to top_n).",
          "items": {
            "$ref": "#/$defs/EnrichrTerm"
          },
          "title": "Terms",
          "type": "array"
        },
        "genes_submitted": {
          "description": "Number of gene symbols submitted.",
          "title": "Genes Submitted",
          "type": "integer"
        },
        "genes_found": {
          "description": "Number of submitted genes overlapping with at least one term in this library.",
          "title": "Genes Found",
          "type": "integer"
        }
      },
      "required": [
        "library",
        "genes_submitted",
        "genes_found"
      ],
      "title": "EnrichrLibraryResult",
      "type": "object"
    },
    "EnrichrTerm": {
      "description": "One ranked term from an Enrichr enrichment result.",
      "properties": {
        "rank": {
          "description": "Rank of this term (1 = most enriched).",
          "title": "Rank",
          "type": "integer"
        },
        "term": {
          "description": "Term name, e.g. 'Apoptosis (GO:0006915)'.",
          "title": "Term",
          "type": "string"
        },
        "p_value": {
          "description": "Fisher's exact test p-value.",
          "title": "P Value",
          "type": "number"
        },
        "adjusted_p_value": {
          "description": "Benjamini-Hochberg adjusted p-value.",
          "title": "Adjusted P Value",
          "type": "number"
        },
        "odds_ratio": {
          "description": "Enrichment odds ratio (z-score from Enrichr — effect-size measure).",
          "title": "Odds Ratio",
          "type": "number"
        },
        "combined_score": {
          "description": "Enrichr combined score: -log(p) × z-score.",
          "title": "Combined Score",
          "type": "number"
        },
        "genes_in_term": {
          "description": "Submitted genes overlapping with this term's gene set.",
          "items": {
            "type": "string"
          },
          "title": "Genes In Term",
          "type": "array"
        }
      },
      "required": [
        "rank",
        "term",
        "p_value",
        "adjusted_p_value",
        "odds_ratio",
        "combined_score"
      ],
      "title": "EnrichrTerm",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.enrichr``.",
  "properties": {
    "gene_symbols": {
      "description": "Gene symbols submitted for enrichment.",
      "items": {
        "type": "string"
      },
      "title": "Gene Symbols",
      "type": "array"
    },
    "results_by_library": {
      "description": "Enrichment results for each requested library (in request order).",
      "items": {
        "$ref": "#/$defs/EnrichrLibraryResult"
      },
      "title": "Results By Library",
      "type": "array"
    },
    "not_found_libraries": {
      "description": "Requested library names not available in Enrichr, or that returned no data.",
      "items": {
        "type": "string"
      },
      "title": "Not Found Libraries",
      "type": "array"
    }
  },
  "required": [
    "gene_symbols"
  ],
  "title": "ForgeEnrichrOut",
  "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/enrichr' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{
  "gene_symbols": []
}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.