[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M735QTX1RJP0VA9866VT0AMZ":3,"skill-same:01M735QTX1RJP0VA9866VT0AMZ":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M735QTX1RJP0VA9866VT0AMZ","alterlab-monarch",null,"Query the Monarch Initiative knowledge graph for disease-gene-phenotype associations across species. Integrates OMIM, ORPHANET, HPO, ClinVar, and model organism databases. Use for rare disease gene discovery, phenotype-to-gene mapping, cross-species disease modeling, and HPO term lookup. Part of the AlterLab Academic Skills suite.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"CC0-1.0","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Falterlab-monarch\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: alterlab-monarch\ndescription: Query the Monarch Initiative knowledge graph for disease-gene-phenotype associations across species. Integrates OMIM, ORPHANET, HPO, ClinVar, and model organism databases. Use for rare disease gene discovery, phenotype-to-gene mapping, cross-species disease modeling, and HPO term lookup. Part of the AlterLab Academic Skills suite.\nlicense: CC0-1.0\nmetadata:\n    skill-author: AlterLab\n    version: \"1.0.0\"\n---\n\n# Monarch Initiative Database\n\n## Overview\n\nThe Monarch Initiative (https:\u002F\u002Fmonarchinitiative.org\u002F) is a multi-species integrated knowledgebase that links genes, diseases, and phenotypes across humans and model organisms. It integrates data from over 40 sources including OMIM, ORPHANET, HPO (Human Phenotype Ontology), ClinVar, MGI (Mouse Genome Informatics), ZFIN (Zebrafish), RGD (Rat), FlyBase, and WormBase.\n\nMonarch enables:\n- Mapping phenotypes across species to identify candidate disease genes\n- Finding all genes associated with a disease or phenotype\n- Discovering model organisms for human diseases\n- Navigating the HPO hierarchy for phenotype ontology queries\n\n**Key resources:**\n- Monarch portal: https:\u002F\u002Fmonarchinitiative.org\u002F\n- Monarch API v3: https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\u002Fdocs\n- API docs: https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\u002Fdocs\n- HPO browser: https:\u002F\u002Fhpo.jax.org\u002F\n\n## When to Use This Skill\n\nUse Monarch when:\n\n- **Rare disease gene discovery**: What genes are associated with my patient's phenotypes (HPO terms)?\n- **Phenotype similarity**: Are two diseases similar based on their phenotypic profiles?\n- **Cross-species modeling**: Are there mouse\u002Fzebrafish models for my disease of interest?\n- **HPO term lookup**: Retrieve HPO term names, definitions, and ontology hierarchy\n- **Disease-phenotype mapping**: List all HPO terms associated with a specific disease\n- **Gene-phenotype associations**: What phenotypes are caused by variants in a gene?\n- **Ortholog-phenotype mapping**: Use animal model phenotypes to infer human gene function\n\n## Core Capabilities\n\n### 1. Monarch API v3\n\nBase URL: `https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\u002Fdocs`\n\n```python\nimport requests\n\nBASE_URL = \"https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\"\n\ndef monarch_get(endpoint, params=None):\n    \"\"\"Make a GET request to the Monarch API.\"\"\"\n    url = f\"{BASE_URL}\u002F{endpoint}\"\n    response = requests.get(url, params=params, headers={\"Accept\": \"application\u002Fjson\"})\n    response.raise_for_status()\n    return response.json()\n```\n\n### 2. Phenotype-to-Gene Association (Pheno2Gene)\n\n```python\ndef get_genes_for_phenotypes(hpo_ids, limit=50, offset=0):\n    \"\"\"\n    Find genes associated with a list of HPO phenotype terms.\n    Core use case: rare disease differential diagnosis.\n\n    Args:\n        hpo_ids: List of HPO term IDs (e.g., [\"HP:0001250\", \"HP:0004322\"])\n        limit: Maximum number of results\n    \"\"\"\n    params = {\n        \"terms\": hpo_ids,\n        \"limit\": limit,\n        \"offset\": offset\n    }\n    return monarch_get(\"semsim\u002Ftermset-pairwise-similarity\u002Fanalyze\", params)\n\ndef phenotype_to_gene(hpo_ids):\n    \"\"\"\n    Return genes whose phenotypes match the given HPO terms.\n    Uses semantic similarity scoring.\n    \"\"\"\n    # Use the \u002Fassociation endpoint for direct phenotype-gene links\n    all_genes = []\n    for hpo_id in hpo_ids:\n        data = monarch_get(\"association\u002Fall\", {\n            \"subject\": hpo_id,\n            \"predicate\": \"biolink:has_phenotype\",\n            \"category\": \"biolink:GeneToPhenotypicFeatureAssociation\",\n            \"limit\": 50\n        })\n        for assoc in data.get(\"items\", []):\n            all_genes.append({\n                \"phenotype_id\": hpo_id,\n                \"gene_id\": assoc.get(\"object\", {}).get(\"id\"),\n                \"gene_name\": assoc.get(\"object\", {}).get(\"name\"),\n                \"evidence\": assoc.get(\"evidence_type\")\n            })\n    return all_genes\n\n# Example: Find genes associated with seizures and short stature\nhpo_terms = [\"HP:0001250\", \"HP:0004322\"]  # Seizures, Short stature\ngenes = phenotype_to_gene(hpo_terms)\n```\n\n### 3. Disease-to-Gene Associations\n\n```python\ndef get_genes_for_disease(disease_id, limit=100):\n    \"\"\"\n    Get all genes associated with a disease.\n    Disease IDs: OMIM:146300, MONDO:0007739, ORPHANET:558, etc.\n    \"\"\"\n    params = {\n        \"object\": disease_id,\n        \"category\": \"biolink:DiseaseToDiseaseAssociation\",\n        \"limit\": limit\n    }\n    # Use the gene-disease association endpoint\n    gene_params = {\n        \"subject\": disease_id,\n        \"category\": \"biolink:GeneToPhenotypicFeatureAssociation\",\n        \"limit\": limit\n    }\n\n    data = monarch_get(\"association\u002Fall\", {\n        \"object\": disease_id,\n        \"predicate\": \"biolink:has_phenotype\",\n        \"limit\": limit\n    })\n    return data\n\ndef get_disease_genes(disease_id, limit=100):\n    \"\"\"Get genes causally linked to a disease.\"\"\"\n    data = monarch_get(\"association\u002Fall\", {\n        \"subject_category\": \"biolink:Gene\",\n        \"object\": disease_id,\n        \"predicate\": \"biolink:causes\",\n        \"limit\": limit\n    })\n    return data.get(\"items\", [])\n\n# MONDO disease IDs (preferred over OMIM for cross-ontology queries)\n# MONDO:0007739 - Huntington disease\n# MONDO:0009061 - Cystic fibrosis\n# OMIM:104300 - Alzheimer disease, susceptibility to, type 1\n```\n\n### 4. Gene-to-Phenotype and Disease\n\n```python\ndef get_phenotypes_for_gene(gene_id, limit=100):\n    \"\"\"\n    Get all phenotypes associated with a gene.\n    Gene IDs: HGNC:7884, NCBIGene:4137, etc.\n    \"\"\"\n    data = monarch_get(\"association\u002Fall\", {\n        \"subject\": gene_id,\n        \"predicate\": \"biolink:has_phenotype\",\n        \"limit\": limit\n    })\n    return data.get(\"items\", [])\n\ndef get_diseases_for_gene(gene_id, limit=100):\n    \"\"\"Get diseases caused by variants in a gene.\"\"\"\n    data = monarch_get(\"association\u002Fall\", {\n        \"subject\": gene_id,\n        \"object_category\": \"biolink:Disease\",\n        \"limit\": limit\n    })\n    return data.get(\"items\", [])\n\n# Example: What diseases does BRCA1 cause?\nbrca1_diseases = get_diseases_for_gene(\"HGNC:1100\")\nfor assoc in brca1_diseases:\n    print(f\"  {assoc.get('object', {}).get('name')} ({assoc.get('object', {}).get('id')})\")\n```\n\n### 5. HPO Term Lookup\n\n```python\ndef get_hpo_term(hpo_id):\n    \"\"\"Fetch information about an HPO term.\"\"\"\n    return monarch_get(f\"entity\u002F{hpo_id}\")\n\ndef search_hpo_terms(query, limit=20):\n    \"\"\"Search for HPO terms by name.\"\"\"\n    params = {\n        \"q\": query,\n        \"category\": \"biolink:PhenotypicFeature\",\n        \"limit\": limit\n    }\n    return monarch_get(\"search\", params)\n\n# Example: look up the HPO term for seizures\nseizure_term = get_hpo_term(\"HP:0001250\")\nprint(f\"Name: {seizure_term.get('name')}\")\nprint(f\"Definition: {seizure_term.get('description')}\")\n\n# Search for related terms\nepilepsy_terms = search_hpo_terms(\"epilepsy\")\nfor term in epilepsy_terms.get(\"items\", [])[:5]:\n    print(f\"  {term['id']}: {term['name']}\")\n```\n\n### 6. Semantic Similarity (Disease Comparison)\n\n```python\ndef compare_disease_phenotypes(disease_id_1, disease_id_2):\n    \"\"\"\n    Compare two diseases by semantic similarity of their phenotype profiles.\n    Returns similarity score using HPO hierarchy.\n    \"\"\"\n    params = {\n        \"subjects\": [disease_id_1],\n        \"objects\": [disease_id_2],\n        \"metric\": \"ancestor_information_content\"\n    }\n    return monarch_get(\"semsim\u002Fcompare\", params)\n\n# Example: Compare Dravet syndrome with CDKL5-deficiency disorder\nsimilarity = compare_disease_phenotypes(\"MONDO:0100135\", \"MONDO:0014917\")\n```\n\n### 7. Cross-Species Orthologs\n\n```python\ndef get_orthologs(gene_id, species=None):\n    \"\"\"\n    Get orthologs of a human gene in model organisms.\n    Useful for finding animal models of human diseases.\n    \"\"\"\n    params = {\"limit\": 50}\n    if species:\n        params[\"subject_taxon\"] = species\n\n    data = monarch_get(\"association\u002Fall\", {\n        \"subject\": gene_id,\n        \"predicate\": \"biolink:orthologous_to\",\n        \"limit\": 50\n    })\n    return data.get(\"items\", [])\n\n# NCBI Taxonomy IDs for common model organisms:\n# Mouse: 10090 (Mus musculus)\n# Zebrafish: 7955 (Danio rerio)\n# Fruit fly: 7227 (Drosophila melanogaster)\n# C. elegans: 6239\n# Rat: 10116 (Rattus norvegicus)\n```\n\n### 8. Full Workflow: Rare Disease Gene Prioritization\n\n```python\nimport requests\nimport pandas as pd\n\ndef rare_disease_gene_finder(patient_hpo_terms, candidate_gene_ids=None, top_n=20):\n    \"\"\"\n    Find genes that match a patient's HPO phenotype profile.\n\n    Args:\n        patient_hpo_terms: List of HPO IDs from clinical assessment\n        candidate_gene_ids: Optional list to restrict search\n        top_n: Number of top candidates to return\n    \"\"\"\n    BASE_URL = \"https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\"\n\n    # 1. Find genes associated with each phenotype\n    gene_phenotype_counts = {}\n\n    for hpo_id in patient_hpo_terms:\n        data = requests.get(\n            f\"{BASE_URL}\u002Fassociation\u002Fall\",\n            params={\n                \"object\": hpo_id,\n                \"subject_category\": \"biolink:Gene\",\n                \"limit\": 100\n            }\n        ).json()\n\n        for item in data.get(\"items\", []):\n            gene_id = item.get(\"subject\", {}).get(\"id\")\n            gene_name = item.get(\"subject\", {}).get(\"name\")\n            if gene_id:\n                if gene_id not in gene_phenotype_counts:\n                    gene_phenotype_counts[gene_id] = {\"name\": gene_name, \"count\": 0, \"phenotypes\": []}\n                gene_phenotype_counts[gene_id][\"count\"] += 1\n                gene_phenotype_counts[gene_id][\"phenotypes\"].append(hpo_id)\n\n    # 2. Rank by number of matching phenotypes\n    ranked = sorted(gene_phenotype_counts.items(),\n                    key=lambda x: -x[1][\"count\"])[:top_n]\n\n    results = []\n    for gene_id, info in ranked:\n        results.append({\n            \"gene_id\": gene_id,\n            \"gene_name\": info[\"name\"],\n            \"matching_phenotypes\": info[\"count\"],\n            \"total_patient_phenotypes\": len(patient_hpo_terms),\n            \"phenotype_overlap\": info[\"count\"] \u002F len(patient_hpo_terms),\n            \"matching_hpo_terms\": info[\"phenotypes\"]\n        })\n\n    return pd.DataFrame(results)\n\n# Example usage\npatient_phenotypes = [\n    \"HP:0001250\",  # Seizures\n    \"HP:0004322\",  # Short stature\n    \"HP:0001252\",  # Hypotonia\n    \"HP:0000252\",  # Microcephaly\n    \"HP:0001263\",  # Global developmental delay\n]\ncandidates = rare_disease_gene_finder(patient_phenotypes)\nprint(candidates[[\"gene_name\", \"matching_phenotypes\", \"phenotype_overlap\"]].to_string())\n```\n\n## Query Workflows\n\n### Workflow 1: HPO-Based Differential Diagnosis\n\n1. Extract HPO terms from clinical notes or genetics consultation\n2. Run phenotype-to-gene query against Monarch\n3. Rank candidate genes by number of matching phenotypes\n4. Cross-reference with gnomAD (constraint scores) and ClinVar (variant evidence)\n5. Prioritize genes with high pLI and known pathogenic variants\n\n### Workflow 2: Disease Model Discovery\n\n1. Identify gene or disease of interest\n2. Query Monarch for cross-species orthologs\n3. Find phenotype associations in model organism databases\n4. Identify experimental models that recapitulate human disease features\n\n### Workflow 3: Phenotype Annotation of Novel Genes\n\n1. For a gene with unknown function, query all known phenotype associations\n2. Map to HPO hierarchy to understand affected body systems\n3. Cross-reference with OMIM and ORPHANET for disease links\n\n## Common Identifier Prefixes\n\n| Prefix | Namespace | Example |\n|--------|-----------|---------|\n| `HP:` | Human Phenotype Ontology | HP:0001250 (Seizures) |\n| `MONDO:` | Monarch Disease Ontology | MONDO:0007739 |\n| `OMIM:` | OMIM disease | OMIM:104300 |\n| `ORPHANET:` | Orphanet rare disease | ORPHANET:558 |\n| `HGNC:` | HGNC gene symbol | HGNC:7884 |\n| `NCBIGene:` | NCBI gene ID | NCBIGene:4137 |\n| `ENSEMBL:` | Ensembl gene | ENSEMBL:ENSG... |\n| `MGI:` | Mouse gene | MGI:1338833 |\n| `ZFIN:` | Zebrafish gene | ZFIN:ZDB-GENE... |\n\n## Best Practices\n\n- **Use MONDO IDs** for diseases — they unify OMIM\u002FORPHANET\u002FMESH identifiers\n- **Use HPO IDs** for phenotypes — the standard for clinical phenotype description\n- **Handle pagination**: Large queries may require iterating with offset parameter\n- **Semantic similarity is better than exact match**: Ancestor HPO terms catch related phenotypes\n- **Cross-validate with ClinVar and OMIM**: Monarch aggregates many sources; quality varies\n- **Use HGNC IDs for genes**: More stable than gene symbols across database versions\n\n## Additional Resources\n\n- **Monarch portal**: https:\u002F\u002Fmonarchinitiative.org\u002F\n- **API v3 docs**: https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\u002Fdocs\n- **HPO browser**: https:\u002F\u002Fhpo.jax.org\u002F\n- **MONDO ontology**: https:\u002F\u002Fmondo.monarchinitiative.org\u002F\n- **Citation**: Shefchek KA et al. (2020) Nucleic Acids Research. PMID: 31701156\n- **Phenomizer** (HPO-based diagnosis): https:\u002F\u002Fhpo.jax.org\u002F\n","# Monarch Initiative Database\n\n## Overview\n\nThe Monarch Initiative (https:\u002F\u002Fmonarchinitiative.org\u002F) is a multi-species integrated knowledgebase that links genes, diseases, and phenotypes across humans and model organisms. It integrates data from over 40 sources including OMIM, ORPHANET, HPO (Human Phenotype Ontology), ClinVar, MGI (Mouse Genome Informatics), ZFIN (Zebrafish), RGD (Rat), FlyBase, and WormBase.\n\nMonarch enables:\n- Mapping phenotypes across species to identify candidate disease genes\n- Finding all genes associated with a disease or phenotype\n- Discovering model organisms for human diseases\n- Navigating the HPO hierarchy for phenotype ontology queries\n\n**Key resources:**\n- Monarch portal: https:\u002F\u002Fmonarchinitiative.org\u002F\n- Monarch API v3: https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\u002Fdocs\n- API docs: https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\u002Fdocs\n- HPO browser: https:\u002F\u002Fhpo.jax.org\u002F\n\n## When to Use This Skill\n\nUse Monarch when:\n\n- **Rare disease gene discovery**: What genes are associated with my patient's phenotypes (HPO terms)?\n- **Phenotype similarity**: Are two diseases similar based on their phenotypic profiles?\n- **Cross-species modeling**: Are there mouse\u002Fzebrafish models for my disease of interest?\n- **HPO term lookup**: Retrieve HPO term names, definitions, and ontology hierarchy\n- **Disease-phenotype mapping**: List all HPO terms associated with a specific disease\n- **Gene-phenotype associations**: What phenotypes are caused by variants in a gene?\n- **Ortholog-phenotype mapping**: Use animal model phenotypes to infer human gene function\n\n## Core Capabilities\n\n### 1. Monarch API v3\n\nBase URL: `https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\u002Fdocs`\n\n```python\nimport requests\n\nBASE_URL = \"https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\"\n\ndef monarch_get(endpoint, params=None):\n    \"\"\"Make a GET request to the Monarch API.\"\"\"\n    url = f\"{BASE_URL}\u002F{endpoint}\"\n    response = requests.get(url, params=params, headers={\"Accept\": \"application\u002Fjson\"})\n    response.raise_for_status()\n    return response.json()\n```\n\n### 2. Phenotype-to-Gene Association (Pheno2Gene)\n\n```python\ndef get_genes_for_phenotypes(hpo_ids, limit=50, offset=0):\n    \"\"\"\n    Find genes associated with a list of HPO phenotype terms.\n    Core use case: rare disease differential diagnosis.\n\n    Args:\n        hpo_ids: List of HPO term IDs (e.g., [\"HP:0001250\", \"HP:0004322\"])\n        limit: Maximum number of results\n    \"\"\"\n    params = {\n        \"terms\": hpo_ids,\n        \"limit\": limit,\n        \"offset\": offset\n    }\n    return monarch_get(\"semsim\u002Ftermset-pairwise-similarity\u002Fanalyze\", params)\n\ndef phenotype_to_gene(hpo_ids):\n    \"\"\"\n    Return genes whose phenotypes match the given HPO terms.\n    Uses semantic similarity scoring.\n    \"\"\"\n    # Use the \u002Fassociation endpoint for direct phenotype-gene links\n    all_genes = []\n    for hpo_id in hpo_ids:\n        data = monarch_get(\"association\u002Fall\", {\n            \"subject\": hpo_id,\n            \"predicate\": \"biolink:has_phenotype\",\n            \"category\": \"biolink:GeneToPhenotypicFeatureAssociation\",\n            \"limit\": 50\n        })\n        for assoc in data.get(\"items\", []):\n            all_genes.append({\n                \"phenotype_id\": hpo_id,\n                \"gene_id\": assoc.get(\"object\", {}).get(\"id\"),\n                \"gene_name\": assoc.get(\"object\", {}).get(\"name\"),\n                \"evidence\": assoc.get(\"evidence_type\")\n            })\n    return all_genes\n\n# Example: Find genes associated with seizures and short stature\nhpo_terms = [\"HP:0001250\", \"HP:0004322\"]  # Seizures, Short stature\ngenes = phenotype_to_gene(hpo_terms)\n```\n\n### 3. Disease-to-Gene Associations\n\n```python\ndef get_genes_for_disease(disease_id, limit=100):\n    \"\"\"\n    Get all genes associated with a disease.\n    Disease IDs: OMIM:146300, MONDO:0007739, ORPHANET:558, etc.\n    \"\"\"\n    params = {\n        \"object\": disease_id,\n        \"category\": \"biolink:DiseaseToDiseaseAssociation\",\n        \"limit\": limit\n    }\n    # Use the gene-disease association endpoint\n    gene_params = {\n        \"subject\": disease_id,\n        \"category\": \"biolink:GeneToPhenotypicFeatureAssociation\",\n        \"limit\": limit\n    }\n\n    data = monarch_get(\"association\u002Fall\", {\n        \"object\": disease_id,\n        \"predicate\": \"biolink:has_phenotype\",\n        \"limit\": limit\n    })\n    return data\n\ndef get_disease_genes(disease_id, limit=100):\n    \"\"\"Get genes causally linked to a disease.\"\"\"\n    data = monarch_get(\"association\u002Fall\", {\n        \"subject_category\": \"biolink:Gene\",\n        \"object\": disease_id,\n        \"predicate\": \"biolink:causes\",\n        \"limit\": limit\n    })\n    return data.get(\"items\", [])\n\n# MONDO disease IDs (preferred over OMIM for cross-ontology queries)\n# MONDO:0007739 - Huntington disease\n# MONDO:0009061 - Cystic fibrosis\n# OMIM:104300 - Alzheimer disease, susceptibility to, type 1\n```\n\n### 4. Gene-to-Phenotype and Disease\n\n```python\ndef get_phenotypes_for_gene(gene_id, limit=100):\n    \"\"\"\n    Get all phenotypes associated with a gene.\n    Gene IDs: HGNC:7884, NCBIGene:4137, etc.\n    \"\"\"\n    data = monarch_get(\"association\u002Fall\", {\n        \"subject\": gene_id,\n        \"predicate\": \"biolink:has_phenotype\",\n        \"limit\": limit\n    })\n    return data.get(\"items\", [])\n\ndef get_diseases_for_gene(gene_id, limit=100):\n    \"\"\"Get diseases caused by variants in a gene.\"\"\"\n    data = monarch_get(\"association\u002Fall\", {\n        \"subject\": gene_id,\n        \"object_category\": \"biolink:Disease\",\n        \"limit\": limit\n    })\n    return data.get(\"items\", [])\n\n# Example: What diseases does BRCA1 cause?\nbrca1_diseases = get_diseases_for_gene(\"HGNC:1100\")\nfor assoc in brca1_diseases:\n    print(f\"  {assoc.get('object', {}).get('name')} ({assoc.get('object', {}).get('id')})\")\n```\n\n### 5. HPO Term Lookup\n\n```python\ndef get_hpo_term(hpo_id):\n    \"\"\"Fetch information about an HPO term.\"\"\"\n    return monarch_get(f\"entity\u002F{hpo_id}\")\n\ndef search_hpo_terms(query, limit=20):\n    \"\"\"Search for HPO terms by name.\"\"\"\n    params = {\n        \"q\": query,\n        \"category\": \"biolink:PhenotypicFeature\",\n        \"limit\": limit\n    }\n    return monarch_get(\"search\", params)\n\n# Example: look up the HPO term for seizures\nseizure_term = get_hpo_term(\"HP:0001250\")\nprint(f\"Name: {seizure_term.get('name')}\")\nprint(f\"Definition: {seizure_term.get('description')}\")\n\n# Search for related terms\nepilepsy_terms = search_hpo_terms(\"epilepsy\")\nfor term in epilepsy_terms.get(\"items\", [])[:5]:\n    print(f\"  {term['id']}: {term['name']}\")\n```\n\n### 6. Semantic Similarity (Disease Comparison)\n\n```python\ndef compare_disease_phenotypes(disease_id_1, disease_id_2):\n    \"\"\"\n    Compare two diseases by semantic similarity of their phenotype profiles.\n    Returns similarity score using HPO hierarchy.\n    \"\"\"\n    params = {\n        \"subjects\": [disease_id_1],\n        \"objects\": [disease_id_2],\n        \"metric\": \"ancestor_information_content\"\n    }\n    return monarch_get(\"semsim\u002Fcompare\", params)\n\n# Example: Compare Dravet syndrome with CDKL5-deficiency disorder\nsimilarity = compare_disease_phenotypes(\"MONDO:0100135\", \"MONDO:0014917\")\n```\n\n### 7. Cross-Species Orthologs\n\n```python\ndef get_orthologs(gene_id, species=None):\n    \"\"\"\n    Get orthologs of a human gene in model organisms.\n    Useful for finding animal models of human diseases.\n    \"\"\"\n    params = {\"limit\": 50}\n    if species:\n        params[\"subject_taxon\"] = species\n\n    data = monarch_get(\"association\u002Fall\", {\n        \"subject\": gene_id,\n        \"predicate\": \"biolink:orthologous_to\",\n        \"limit\": 50\n    })\n    return data.get(\"items\", [])\n\n# NCBI Taxonomy IDs for common model organisms:\n# Mouse: 10090 (Mus musculus)\n# Zebrafish: 7955 (Danio rerio)\n# Fruit fly: 7227 (Drosophila melanogaster)\n# C. elegans: 6239\n# Rat: 10116 (Rattus norvegicus)\n```\n\n### 8. Full Workflow: Rare Disease Gene Prioritization\n\n```python\nimport requests\nimport pandas as pd\n\ndef rare_disease_gene_finder(patient_hpo_terms, candidate_gene_ids=None, top_n=20):\n    \"\"\"\n    Find genes that match a patient's HPO phenotype profile.\n\n    Args:\n        patient_hpo_terms: List of HPO IDs from clinical assessment\n        candidate_gene_ids: Optional list to restrict search\n        top_n: Number of top candidates to return\n    \"\"\"\n    BASE_URL = \"https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\"\n\n    # 1. Find genes associated with each phenotype\n    gene_phenotype_counts = {}\n\n    for hpo_id in patient_hpo_terms:\n        data = requests.get(\n            f\"{BASE_URL}\u002Fassociation\u002Fall\",\n            params={\n                \"object\": hpo_id,\n                \"subject_category\": \"biolink:Gene\",\n                \"limit\": 100\n            }\n        ).json()\n\n        for item in data.get(\"items\", []):\n            gene_id = item.get(\"subject\", {}).get(\"id\")\n            gene_name = item.get(\"subject\", {}).get(\"name\")\n            if gene_id:\n                if gene_id not in gene_phenotype_counts:\n                    gene_phenotype_counts[gene_id] = {\"name\": gene_name, \"count\": 0, \"phenotypes\": []}\n                gene_phenotype_counts[gene_id][\"count\"] += 1\n                gene_phenotype_counts[gene_id][\"phenotypes\"].append(hpo_id)\n\n    # 2. Rank by number of matching phenotypes\n    ranked = sorted(gene_phenotype_counts.items(),\n                    key=lambda x: -x[1][\"count\"])[:top_n]\n\n    results = []\n    for gene_id, info in ranked:\n        results.append({\n            \"gene_id\": gene_id,\n            \"gene_name\": info[\"name\"],\n            \"matching_phenotypes\": info[\"count\"],\n            \"total_patient_phenotypes\": len(patient_hpo_terms),\n            \"phenotype_overlap\": info[\"count\"] \u002F len(patient_hpo_terms),\n            \"matching_hpo_terms\": info[\"phenotypes\"]\n        })\n\n    return pd.DataFrame(results)\n\n# Example usage\npatient_phenotypes = [\n    \"HP:0001250\",  # Seizures\n    \"HP:0004322\",  # Short stature\n    \"HP:0001252\",  # Hypotonia\n    \"HP:0000252\",  # Microcephaly\n    \"HP:0001263\",  # Global developmental delay\n]\ncandidates = rare_disease_gene_finder(patient_phenotypes)\nprint(candidates[[\"gene_name\", \"matching_phenotypes\", \"phenotype_overlap\"]].to_string())\n```\n\n## Query Workflows\n\n### Workflow 1: HPO-Based Differential Diagnosis\n\n1. Extract HPO terms from clinical notes or genetics consultation\n2. Run phenotype-to-gene query against Monarch\n3. Rank candidate genes by number of matching phenotypes\n4. Cross-reference with gnomAD (constraint scores) and ClinVar (variant evidence)\n5. Prioritize genes with high pLI and known pathogenic variants\n\n### Workflow 2: Disease Model Discovery\n\n1. Identify gene or disease of interest\n2. Query Monarch for cross-species orthologs\n3. Find phenotype associations in model organism databases\n4. Identify experimental models that recapitulate human disease features\n\n### Workflow 3: Phenotype Annotation of Novel Genes\n\n1. For a gene with unknown function, query all known phenotype associations\n2. Map to HPO hierarchy to understand affected body systems\n3. Cross-reference with OMIM and ORPHANET for disease links\n\n## Common Identifier Prefixes\n\n| Prefix | Namespace | Example |\n|--------|-----------|---------|\n| `HP:` | Human Phenotype Ontology | HP:0001250 (Seizures) |\n| `MONDO:` | Monarch Disease Ontology | MONDO:0007739 |\n| `OMIM:` | OMIM disease | OMIM:104300 |\n| `ORPHANET:` | Orphanet rare disease | ORPHANET:558 |\n| `HGNC:` | HGNC gene symbol | HGNC:7884 |\n| `NCBIGene:` | NCBI gene ID | NCBIGene:4137 |\n| `ENSEMBL:` | Ensembl gene | ENSEMBL:ENSG... |\n| `MGI:` | Mouse gene | MGI:1338833 |\n| `ZFIN:` | Zebrafish gene | ZFIN:ZDB-GENE... |\n\n## Best Practices\n\n- **Use MONDO IDs** for diseases — they unify OMIM\u002FORPHANET\u002FMESH identifiers\n- **Use HPO IDs** for phenotypes — the standard for clinical phenotype description\n- **Handle pagination**: Large queries may require iterating with offset parameter\n- **Semantic similarity is better than exact match**: Ancestor HPO terms catch related phenotypes\n- **Cross-validate with ClinVar and OMIM**: Monarch aggregates many sources; quality varies\n- **Use HGNC IDs for genes**: More stable than gene symbols across database versions\n\n## Additional Resources\n\n- **Monarch portal**: https:\u002F\u002Fmonarchinitiative.org\u002F\n- **API v3 docs**: https:\u002F\u002Fapi-v3.monarchinitiative.org\u002Fv3\u002Fdocs\n- **HPO browser**: https:\u002F\u002Fhpo.jax.org\u002F\n- **MONDO ontology**: https:\u002F\u002Fmondo.monarchinitiative.org\u002F\n- **Citation**: Shefchek KA et al. (2020) Nucleic Acids Research. PMID: 31701156\n- **Phenomizer** (HPO-based diagnosis): https:\u002F\u002Fhpo.jax.org\u002F\n",{"name":5,"license":14,"metadata":23,"description":7},{"version":24,"skill-author":25},"1.0.0","AlterLab","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Falterlab-monarch",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add roohe\u002Fagentic-super-skills --skill alterlab-monarch",{"tool":40,"command":41},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill alterlab-monarch",{"tool":43,"command":44},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill alterlab-monarch","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Falterlab-monarch\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fphenotype_ontology.md","REFERENCE","参考文档",5156,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Falterlab-monarch\u002Freferences\u002Fphenotype_ontology.md",[55,63,70,77,84,91],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":59,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]