用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills --skill enrichr-api命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | enrichr-api |
| description | Perform gene set enrichment analysis using the Enrichr API |
| metadata | {"openclaw":{"emoji":"🔬","category":"domains","subcategory":"biomedical","keywords":["gene set enrichment","pathway analysis","GO terms","KEGG","Enrichr","functional analysis"],"source":"https://maayanlab.cloud/Enrichr"}} |
Enrichr is the most widely used gene set enrichment analysis tool, developed by the Ma'ayan Lab at the Icahn School of Medicine at Mount Sinai. It tests whether a user-supplied gene list is statistically over-represented in curated gene set libraries spanning pathways, ontologies, transcription factor targets, disease associations, and cell types. The API provides access to 225 background libraries covering over 500,000 annotated gene sets. Free, no authentication required.
Enrichr uses a submit-then-query pattern:
/addList -- returns a userListId token/enrich using that token and a chosen libraryThe userListId persists on the server, so you can run multiple library queries against the same submission without re-uploading.
https://maayanlab.cloud/Enrichr
curl -X POST "https://maayanlab.cloud/Enrichr/addList" \
-F "list=BRCA1
BRCA2
TP53
EGFR
MYC
PTEN
AKT1
KRAS
PIK3CA
RAF1" \
-F "description=cancer_genes"
Response:
{
"shortId": "8619200cc78f1513ff1029a04af90ad7",
"userListId": 124544426
}
Genes are newline-separated. The request must use multipart/form-data (the -F flag), not application/x-www-form-urlencoded.
curl "https://maayanlab.cloud/Enrichr/enrich?userListId=124544426&backgroundType=KEGG_2021_Human"
Response (first 3 of 143 results):
{
"KEGG_2021_Human": [
[1, "Breast cancer", 3.37e-22, 198530.0, 9815800.25,
["PIK3CA","MYC","PTEN","AKT1","KRAS","BRCA1","BRCA2","RAF1","TP53","EGFR"],
4.82e-20, 0, 0],
[2, "Endometrial cancer", 1.35e-19, 1595.2, 69306.12,
["PIK3CA","MYC",
Each result array contains: [rank, term_name, p_value, z_score, combined_score, overlapping_genes, adjusted_p_value, old_p_value, old_adjusted_p_value].
curl "https://maayanlab.cloud/Enrichr/view?userListId=124544426"
{
"genes": ["PIK3CA","MYC","AKT1","PTEN","BRCA1","KRAS","BRCA2","EGFR","TP53","RAF1"],
"description": "cancer_genes"
}
curl "https://maayanlab.cloud/Enrichr/export?userListId=124544426&backgroundType=KEGG_2021_Human&filename=results" \
-o enrichr_results.txt
curl "https://maayanlab.cloud/Enrichr/datasetStatistics"
Returns metadata for all 225 libraries, each entry containing libraryName, numTerms, geneCoverage, and genesPerTerm.
| Library | Terms | Genes |
|---|---|---|
| KEGG_2026 | 352 | 8,110 |
| KEGG_2021_Human | 320 | 8,078 |
| WikiPathways_2024_Human | 829 | 8,281 |
| Reactome_Pathways_2024 | 2,105 | 11,671 |
| BioCarta_2016 | 237 | 1,348 |
| Library | Terms | Genes |
|---|---|---|
| GO_Biological_Process_2025 | 5,343 | 14,674 |
| GO_Molecular_Function_2025 | 1,174 | 11,484 |
| GO_Cellular_Component_2025 | 468 | 11,501 |
| Library | Terms | Genes |
|---|---|---|
| DisGeNET | 9,828 | 17,464 |
| GWAS_Catalog_2025 | 2,369 | 15,030 |
| ClinVar_2025 | 609 | 3,481 |
| OMIM_Disease | 90 | 1,759 |
| Human_Phenotype_Ontology | 1,779 | 3,096 |
| Library | Terms | Genes |
|---|---|---|
| ChEA_2022 | 757 | 18,365 |
| ENCODE_TF_ChIP-seq_2015 | 816 | 26,382 |
| JASPAR_PWM_Human_2025 | 675 | 18,518 |
| Library | Terms | Genes |
|---|---|---|
| CellMarker_2024 | 1,692 | 12,642 |
| ARCHS4_Tissues | 108 | 21,809 |
| Human_Gene_Atlas | 84 | 13,373 |
| Library | Terms | Genes |
|---|---|---|
| MSigDB_Hallmark_2020 | 50 | 4,383 |
| MSigDB_Oncogenic_Signatures | 189 | 11,250 |
| DGIdb_Drug_Targets_2024 | 659 | 2,513 |
userListId persists server-side; avoid re-submitting the same list repeatedlyimport requests
ENRICHR_URL = "https://maayanlab.cloud/Enrichr"
def submit_gene_list(genes: list[str], description: str = "") -> int:
"""Submit a gene list to Enrichr, return userListId."""
payload = {
"list": (None, "\n".join(genes)),
"description": (None, description),
}
resp = requests.post(f"{ENRICHR_URL}/addList", files=payload)
resp.raise_for_status()
return resp.json()["userListId"]
def get_enrichment(user_list_id: int, library: str) -> list[dict]:
"""Retrieve enrichment results for a given library."""
resp = requests.get(
f"{ENRICHR_URL}/enrich",
params={"userListId": user_list_id, "backgroundType": library},
)
resp.raise_for_status()
data = resp.json()
results = []
for entry in data.get(library, []):
results.append({
"rank": entry[0],
"term": entry[1],
"p_value": entry[2],
"z_score": entry[3],
"combined_score": entry[4],
"genes": entry[],
: entry[],
})
results
() -> []:
resp = requests.get()
resp.raise_for_status()
resp.json()[]
genes = [, , , , ,
, , , , ]
list_id = submit_gene_list(genes, )
()
kegg = get_enrichment(list_id, )
()
r kegg[:]:
()
(
)
go_bp = get_enrichment(list_id, )
()
r go_bp[:]:
()
()