Chea api

From aipoch/medical-research-skills · View interactive version

Chea api is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Access ChEA3 and Harmonizome ChEA data for transcription factor enrichment analysis and metadata retrieval. Use when the user needs to perform ChEA3 enrichment analysis on a gene set, get metadata about the ChEA dataset, or retrieve information about a specific transcription factor (attribute).

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

ChEA API Skill

This skill provides programmatic access to the ChEA3 enrichment analysis API and Harmonizome ChEA dataset metadata.

When to Use

Key Features

Dependencies

Example Usage

See ## Usage above for related details.

cd "20260316/scientific-skills/Evidence Insight/chea-api"
python -m py_compile scripts/chea_client.py
python scripts/chea_client.py --help

Example run plan:

  1. Confirm the user input, output path, and any required config values.
  2. Edit the in-file CONFIG block or documented parameters if the script uses fixed settings.
  3. Run python scripts/chea_client.py with the validated inputs.
  4. Review the generated output and return the final artifact with any assumptions called out.

Implementation Details

Usage

1. Enrichment Analysis

Perform enrichment analysis on a list of genes to identify associated transcription factors.

Script: scripts/chea_client.py

Command: enrich

import json
import sys

# Add scripts directory to path if needed, or run as subprocess
sys.path.append('scripts')
from chea_client import enrich

genes = ["FOXM1", "SMAD9", "MYC", "SMAD3", "STAT1", "STAT3"]
results = enrich(genes, query_name="my_analysis")
print(json.dumps(results, indent=2))

2. Get Dataset Metadata

Retrieve metadata for the ChEA dataset from Harmonizome.

Script: scripts/chea_client.py

Command: metadata

from chea_client import get_dataset_metadata

metadata = get_dataset_metadata()
print(json.dumps(metadata, indent=2))

3. Get Attribute (Transcription Factor) Info

Get details about a specific transcription factor (Attribute) from Harmonizome.

Script: scripts/chea_client.py

Command: attribute

from chea_client import get_attribute_info

# Example: Get info for CREB1
info = get_attribute_info("CREB1")
print(json.dumps(info, indent=2))

CLI Usage

You can also run the script directly from the command line:


# Enrichment
python scripts/chea_client.py enrich FOXM1 SMAD9 MYC

# Metadata
python scripts/chea_client.py metadata

# Attribute Info
python scripts/chea_client.py attribute CREB1

Requirements

When Not to Use

Required Inputs

Recommended Workflow

  1. Validate the request against the skill boundary and confirm all required inputs are present.
  2. Select the documented execution path and prefer the simplest supported command or procedure.
  3. Produce the expected output using the documented file format, schema, or narrative structure.
  4. Run a final validation pass for completeness, consistency, and safety before returning the result.

Output Contract

Validation and Safety Rules

Failure Handling

Quick Validation

Run this minimal verification path before full execution when possible:

python scripts/chea_client.py --help

Expected output format:

Result file: chea_api_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.