Forge Tools efo_ontology

efo_ontology read

scidex.forge.efo_ontology

Query the Experimental Factor Ontology (EFO) via EBI OLS4 for standardized GWAS trait identifiers and experimental condition terms. EFO provides 17,000+ controlled terms for quantitative traits (blood pressure, BMI), molecular measurements, and experimental conditions used by GWAS Catalog, GTEx, ArrayExpress, and all major EBI databases. Given a trait name or EFO ID (e.g. EFO:0004340 for blood pressure), returns the term label, definition, synonyms, parent hierarchy, and obsolescence status. Complements scidex.forge.hpo_phenotype (clinical phenotypes) and scidex.forge.disease_ontology (disease terms). API: EBI OLS4 (ebi.ac.uk/ols4) — public, no authentication required.

HTTP: POST /api/scidex/forge/efo_ontology

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.efo_ontology``.",
  "properties": {
    "query": {
      "description": "Trait name, keyword, or EFO identifier to search (e.g. 'blood pressure', 'body mass index', 'EFO:0004340'). Interpreted as free-text when ``query_type='label'``, or as an exact EFO ID when ``query_type='efo_id'``.",
      "maxLength": 200,
      "title": "Query",
      "type": "string"
    },
    "query_type": {
      "default": "label",
      "description": "How to interpret ``query``. 'label' — free-text search against term labels and synonyms. 'efo_id' — exact lookup by EFO identifier (e.g. 'EFO:0004340').",
      "title": "Query Type",
      "type": "string"
    },
    "include_obsolete": {
      "default": false,
      "description": "If True, include deprecated/obsolete EFO terms in results. Default False — obsolete terms are filtered out.",
      "title": "Include Obsolete",
      "type": "boolean"
    },
    "limit": {
      "default": 20,
      "description": "Maximum number of EFO terms to return. Default 20.",
      "maximum": 100,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    }
  },
  "required": [
    "query"
  ],
  "title": "ForgeEfoOntologyIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "EfoOntologyTerm": {
      "description": "One EFO term in the response.",
      "properties": {
        "efo_id": {
          "description": "EFO identifier (e.g. 'EFO:0004340').",
          "title": "Efo Id",
          "type": "string"
        },
        "label": {
          "default": "",
          "description": "Term label/name.",
          "title": "Label",
          "type": "string"
        },
        "definition": {
          "default": "",
          "description": "Term definition (may be empty).",
          "title": "Definition",
          "type": "string"
        },
        "synonyms": {
          "description": "Synonym terms from the Experimental Factor Ontology.",
          "items": {
            "type": "string"
          },
          "title": "Synonyms",
          "type": "array"
        },
        "parent_terms": {
          "description": "Direct parent EFO term IDs (is_a hierarchy).",
          "items": {
            "type": "string"
          },
          "title": "Parent Terms",
          "type": "array"
        },
        "is_obsolete": {
          "default": false,
          "description": "True if this term has been deprecated in the EFO.",
          "title": "Is Obsolete",
          "type": "boolean"
        }
      },
      "required": [
        "efo_id"
      ],
      "title": "EfoOntologyTerm",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.efo_ontology``.",
  "properties": {
    "query": {
      "description": "The search query as provided.",
      "title": "Query",
      "type": "string"
    },
    "query_type": {
      "description": "The query type used ('label' or 'efo_id').",
      "title": "Query Type",
      "type": "string"
    },
    "terms": {
      "description": "EFO terms matching the query.",
      "items": {
        "$ref": "#/$defs/EfoOntologyTerm"
      },
      "title": "Terms",
      "type": "array"
    },
    "not_found": {
      "description": "True if no EFO terms were found for the query.",
      "title": "Not Found",
      "type": "boolean"
    },
    "source": {
      "default": "Experimental Factor Ontology via EBI OLS4 (ebi.ac.uk/ols4)",
      "description": "Data source attribution.",
      "title": "Source",
      "type": "string"
    }
  },
  "required": [
    "query",
    "query_type",
    "not_found"
  ],
  "title": "ForgeEfoOntologyOut",
  "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/efo_ontology' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{
  "query": ""
}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.