[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DPARNE0NF69DXDGXDYKDT4":3,"skill-same:01M6DPARNE0NF69DXDGXDYKDT4":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":45,"commitSha":46,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6DPARNE0NF69DXDGXDYKDT4","monarch-database",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.","huamu668\u002Fclawhub-openclaw-medical","huamu668","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F202473531?v=4","01M6DK1V7D7VP9PJ06Z1VXVK13","huamu","01M6DK1VBYG1BX5FT154AFZHAS",0,"CC0-1.0","https:\u002F\u002Fgithub.com\u002Fhuamu668\u002Fclawhub-openclaw-medical\u002Fblob\u002Fmain\u002Fmonarch-database\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37],"database","monarch database","graph","knowledge graph","lookup","discovery","knowledge","model","use","databases","query","across","gene mapping","modeling","2026-11-10 10:12:30",false,"---\nname: monarch-database\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.\nlicense: CC0-1.0\nmetadata:\n    skill-author: Kuan-lin Huang\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\u002F\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\u002F`\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\u002Fcompbio.charite.de\u002Fphenomizer\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\u002F\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\u002F`\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\u002Fcompbio.charite.de\u002Fphenomizer\u002F\n",{"name":5,"license":15,"metadata":43,"description":7},{"skill-author":44},"Kuan-lin Huang","main","d3998984163a67a891ee8397e35adf79b14e872d","https:\u002F\u002Fgithub.com\u002Fhuamu668\u002Fclawhub-openclaw-medical","https:\u002F\u002Fgithub.com\u002Fhuamu668","2026-03-12 11:49:42",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add huamu668\u002Fclawhub-openclaw-medical --skill monarch-database",{"tool":56,"command":57},"bunx","bunx skills add huamu668\u002Fclawhub-openclaw-medical --skill monarch-database",{"tool":59,"command":60},"pnpm","pnpm dlx skills add huamu668\u002Fclawhub-openclaw-medical --skill monarch-database","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhuamu668\u002Fclawhub-openclaw-medical\u002Fblob\u002Fmain\u002Fmonarch-database\u002FSKILL.md",true,[],[65,86,114,133,147,176],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":38},"01M6DR3JGAEX5G5FR7TK3D8NS8","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\u002Fhuamu668\u002Fclawhub-openclaw-medical\u002Fblob\u002Fmain\u002Fzarr-python\u002FSKILL.md",[],[73,74,75,76,77,78,79,80,81,82,83,84,85],"python","zarr python","storage","scientific computing","numpy","arrays","pipelines","parallel","dask","cloud","gcs","s3","integration",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":95,"publishedAt":38},"01M6DR101MEDE5XT2ZZ5VBEAA5","vaex","Use this skill for processing and analyzing large tabular datasets (billions of rows) that exceed available RAM. Vaex excels at out-of-core DataFrame operations, lazy evaluation, fast aggregations, efficient visualization of big data, and machine learning on large datasets. Apply when users need to work with large CSV\u002FHDF5\u002FArrow\u002FParquet files, perform fast statistics on massive datasets, create visualizations of big data, or build ML pipelines that do not fit in memory.","https:\u002F\u002Fgithub.com\u002Fhuamu668\u002Fclawhub-openclaw-medical\u002Fblob\u002Fmain\u002Fvaex\u002FSKILL.md",[92],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000013","分析与可视化",[88,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,32,112,113],"machine learning","in memory","learning","csv","visualization","create","core","ml","big data","memory","visualizations","fit","statistics","do","build","files","operations","work",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":38},"01M6DQVMB0GBKF2W44FKXVD1P7","torch-geometric","Graph Neural Networks (PyG). Node\u002Fgraph classification, link prediction, GCN, GAT, GraphSAGE, heterogeneous graphs, molecular property prediction, for geometric deep learning.","https:\u002F\u002Fgithub.com\u002Fhuamu668\u002Fclawhub-openclaw-medical\u002Fblob\u002Fmain\u002Ftorch-geometric\u002FSKILL.md",[],[121,98,122,123,124,125,126,127,128,129,26,130,131,132],"torch geometric","node","Neural","link","gat","molecular","graphs","deep","networks","neural networks","deep learning","classification",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":38},"01M6DQH2GZPZKEQ140GRCJ9746","tiledbvcf","Efficient storage and retrieval of genomic variant data using TileDB. Scalable VCF\u002FBCF ingestion, incremental sample addition, compressed storage, parallel queries, and export capabilities for population genomics.","https:\u002F\u002Fgithub.com\u002Fhuamu668\u002Fclawhub-openclaw-medical\u002Fblob\u002Fmain\u002Ftiledbvcf\u002FSKILL.md",[],[135,140,141,142,143,144,145,80,146,75],"data","genomics","sample","queries","ingestion","export","capabilities",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":161,"publishedAt":38},"01M6DQD9G958EM6NHJ994D0SK1","solublempnn","Solubility-optimized protein sequence design using SolubleMPNN. Use this skill when: (1) Designing for E. coli expression, (2) Optimizing solubility of designed proteins, (3) Reducing aggregation propensity, (4) Need high-yield expression, (5) Avoiding inclusion body formation.\nFor standard design, use proteinmpnn. For ligand-aware design, use ligandmpnn.","https:\u002F\u002Fgithub.com\u002Fhuamu668\u002Fclawhub-openclaw-medical\u002Fblob\u002Fmain\u002Fsolublempnn\u002FSKILL.md",[153,156],{"categoryNo":154,"categoryName":155,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":157,"categoryName":158,"taxonomyType":159,"taxonomyTypeDesc":160},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[149,162,163,32,164,165,166,167,168,169,170,171,172,173,174,175],"inclusion","yield","modal","Tools","aggregation","design","proteins","solubility","proteinmpnn","ligandmpnn","ligand-aware","inverse-folding","expression","sequence-design",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":180,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":38},"01M6DQ8W91A93MGGCEEW949HBC","scvelo","RNA velocity analysis with scVelo. Estimate cell state transitions from unspliced\u002Fspliced mRNA dynamics, infer trajectory directions, compute latent time, and identify driver genes in single-cell RNA-seq data. Complements Scanpy\u002FscVI-tools for trajectory inference.","BSD-3-Clause","https:\u002F\u002Fgithub.com\u002Fhuamu668\u002Fclawhub-openclaw-medical\u002Fblob\u002Fmain\u002Fscvelo\u002FSKILL.md",[],[178,184,185,186,187,188,189,190,191,192,193,165,140,194,195],"RNA","single-cell","infer","cell","transitions","time","compute","velocity","scanpy","analysis","state","inference"]