
Tooluniverse Rare Disease Diagnosis
- 360 installs
- 1.6k repo stars
- Updated August 4, 2026
- mims-harvard/tooluniverse
tooluniverse-rare-disease-diagnosis is an agent skill that supports rare-disease differential diagnosis by integrating phenotypes, genotypes, literature evidence, and ranked diagnoses for clinician or researcher review.
About
tooluniverse-rare-disease-diagnosis is a Harvard ToolUniverse agent skill for systematic rare-disease diagnostic reasoning. It matches patient phenotypes to HPO terms, retrieves candidate diseases from Orphanet and OMIM, prioritizes gene panels via ClinGen and MARRVEL, and interprets variants using ClinVar, gnomAD, FAVOR annotation, and ACMG criteria. The workflow produces ranked differential diagnoses with phenotype overlap scores, gene-tier scoring, and variant pathogenicity evidence for genetic-counseling or research review. Bioinformatics developers and health-AI engineers reach for tooluniverse-rare-disease-diagnosis when building diagnostic agents, explaining VUS findings, or scoping gene panels for unexplained phenotypes.
- Phenotype-to-gene mapping
- Differential diagnosis ranking
- Literature and database triangulation
- Variant and syndrome cross-checks
- Explainable evidence summaries
Tooluniverse Rare Disease Diagnosis by the numbers
- 360 all-time installs (skills.sh)
- +7 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #531 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mims-harvard/tooluniverse --skill tooluniverse-rare-disease-diagnosisAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 360 |
|---|---|
| repo stars | ★ 1.6k |
| Last updated | August 4, 2026 |
| Repository | mims-harvard/tooluniverse ↗ |
How do agents rank rare disease differentials from phenotypes?
Support rare-disease diagnostic reasoning by integrating phenotypes, genotypes, literature evidence, and ranked differential diagnoses for clinician or researcher review.
Who is it for?
Bioinformatics developers and health-AI engineers building diagnostic agents that integrate HPO, Orphanet, OMIM, ClinVar, and gnomAD evidence.
Skip if: General software teams without biomedical data access or clinicians expecting autonomous diagnosis without human review.
When should I use this skill?
The user asks about rare disease differential diagnosis, unexplained phenotypes, VUS interpretation, or which genes to test for a symptom profile.
What you get
Ranked differential diagnosis list, prioritized gene panels, ACMG variant interpretations, and phenotype overlap scores for clinician review.
- ranked differential diagnosis
- prioritized gene panel
- ACMG variant interpretation
Files
Rare Disease Diagnosis Advisor
Systematic diagnosis support for rare diseases using phenotype matching, gene panel prioritization, and variant interpretation across Orphanet, OMIM, HPO, ClinVar, and structure-based analysis.
KEY PRINCIPLES: 1. Report-first - Create report file FIRST, update progressively 2. Phenotype-driven - Convert symptoms to HPO terms before searching 3. Multi-database triangulation - Cross-reference Orphanet, OMIM, OpenTargets 4. Evidence grading - Grade diagnoses by supporting evidence strength 5. English-first queries - Always use English terms in tool calls
LOOK UP, DON'T GUESS
When uncertain about any scientific fact, SEARCH databases first rather than reasoning from memory.
---
COMPUTE, DON'T DESCRIBE
When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
Clinical Reasoning Framework (BEFORE Tools)
Apply these strategies to form a 3-5 candidate differential, then use tools to confirm/refute:
1. Multi-system involvement - Symptoms spanning 2+ organ systems = strongest rare disease signal. Ask: what single pathway explains ALL features? 2. Regression question - Losing abilities vs never acquired? Regression = neurodegenerative/metabolic storage. Stable = developmental/structural. 3. Trigger question - Episodic/triggered (fasting, illness, exercise) = metabolic disorder (often treatable). Constitutive = structural/degenerative. 4. Rarest feature first - Build differential from most specific finding, not most prominent. Check remaining features for consistency. 5. Treatable-first - Move treatable conditions to top for urgent workup (enzyme replacement, dietary, chelation, vitamin-responsive). 6. Occupational/environmental exposure - Latency up to 50 years. Asbestos/silica/heavy metals/solvents/farming. Always ask about PAST jobs. 7. Autoimmune differential - Which joints? Symmetric? Extra-articular? Serologic pattern? Organ under attack? 8. Rare syndrome signals - Named triads, common diagnoses failing to explain ALL findings, failed standard treatment, unusual lab findings. 9. Tools verify, not generate - Form hypothesis first, then use databases to confirm.
Common pitfalls: Felty's (RA+splenomegaly+neutropenia) mimics infection; SLE nephritis mimics PSGN (check ASO); occupational exposures trigger autoimmunity (silica→scleroderma/RA/SLE).
---
Tool Parameter Corrections
| Tool | WRONG | CORRECT |
|---|---|---|
OpenTargets_get_associated_drugs_by_target_ensemblID | ensemblID | ensemblId |
ClinVar_get_variant_details | variant_id | id |
MyGene_query_genes | gene | q |
gnomad_get_variant | variant | variant_id |
---
Workflow
Phase 0: Clinical Reasoning → 3-5 candidate differential
Phase 1: Phenotype → HPO terms (HPO_search_terms), core vs variable, onset, family history
Phase 2: Disease Matching → Orphanet_search_diseases, OMIM_search, DisGeNET_search_gene
Phase 3: Gene Panel → MARRVEL_get_gene (aggregated IDs) + MARRVEL_get_omim_phenotypes (OMIM disease+inheritance), ClinGen validation, GTEx expression, prioritization scoring
Phase 3.5: Expression Context → CELLxGENE, ChIPAtlas for tissue/cell-type confirmation
Phase 3.6: Pathway Analysis → KEGG, IntAct for convergent pathways
Phase 4: Variant Interpretation → FAVOR_annotate_variant (one-call: freq + CADD/SIFT/PolyPhen/AlphaMissense + ClinVar + conservation), then ClinVar, gnomAD frequency, EVE/SpliceAI, ACMG criteria
Phase 5: Structure Analysis → AlphaFold2, InterPro domains (for VUS)
Phase 6: Literature → PubMed, BioRxiv/MedRxiv, OpenAlex
Phase 7: Report Synthesis → Prioritized differential with next stepsKey Phase Details
Phase 2 - Disease Matching: Orphanet_search_diseases(operation="search_diseases", query=keyword) then Orphanet_get_genes(operation="get_genes", orpha_code=code). Score overlap: Excellent >80%, Good 60-80%, Possible 40-60%.
Phase 3 - Gene Panel: For each candidate gene, MARRVEL_get_gene(symbol) resolves OMIM/HGNC/Ensembl/Entrez/UniProt IDs in one call, and MARRVEL_get_omim_phenotypes(symbol) lists the Mendelian diseases linked to the gene with mode of inheritance — use the inheritance pattern to filter candidates against the pedigree (e.g. drop AR genes for a clearly dominant pedigree). Then ClinGen classification drives inclusion (Definitive/Strong/Moderate = include; Limited = flag; Disputed/Refuted = exclude). Scoring: Tier 1 (top disease gene +5), Tier 2 (multi-disease +3), Tier 3 (ClinGen Definitive +3), Tier 4 (tissue expression +2), Tier 5 (pLI >0.9 +1).
Phase 4 - Variants: Start with FAVOR_annotate_variant("chr-pos-ref-alt") (GRCh38) for a single-call snapshot — population frequencies (gnomAD by ancestry, BRAVO), GENCODE consequence, CADD/SIFT/PolyPhen-2/AlphaMissense scores, conservation, and ClinVar significance — then drill into ClinVar/gnomAD/EVE/SpliceAI for detail. gnomAD frequency classes: ultra-rare <0.00001, rare <0.0001, low-freq <0.01. ACMG: PVS1 (null), PS1 (same AA), PM2 (absent pop), PP3 (computational), BA1 (>5% AF). 2+ concordant predictors strengthen PP3.
---
Evidence Grading
| Tier | Criteria |
|---|---|
| T1 (High) | Phenotype match >80% + gene match |
| T2 (Medium-High) | Phenotype match 60-80% OR likely pathogenic variant |
| T3 (Medium) | Phenotype match 40-60% OR VUS in candidate gene |
| T4 (Low) | Phenotype <40% OR uncertain gene |
---
Fallback Chains
| Primary | Fallback 1 | Fallback 2 |
|---|---|---|
get_joint_associated_diseases_by_HPO_ID_list | Orphanet_search_diseases | PubMed phenotype search |
MARRVEL_get_omim_phenotypes | OMIM_search | Orphanet gene-disease |
FAVOR_annotate_variant | ClinVar_get_variant_details | gnomad_get_variant |
ClinVar_get_variant_details | gnomad_get_variant | VEP annotation |
GTEx_get_expression_summary | HPA_search_genes_by_query | Tissue-specific literature |
---
Reference Files
- DIAGNOSTIC_WORKFLOW.md - Code examples and algorithms per phase
- REPORT_TEMPLATE.md - Report template and examples
- CHECKLIST.md - Interactive completeness checklist
scripts/clinical_patterns.py- Clinical pattern lookup (syndromes, differentials, red flags, occupational exposures)
Rare Disease Diagnosis Checklist
Pre-delivery verification checklist for rare disease diagnostic reports.
Report Quality Checklist
Structure & Format
- [ ] Report file created:
[PATIENT_ID]_rare_disease_report.md - [ ] All 8 main sections present
- [ ] Executive summary completed (not
[Researching...]) - [ ] Data sources section populated
Phase 1: Phenotype Standardization
- [ ] All clinical features converted to HPO terms
- [ ] HPO IDs provided for each term
- [ ] Core features distinguished from variable
- [ ] Age of onset documented
- [ ] Family history recorded (or "Unknown")
- [ ] Inheritance pattern suspected (AD/AR/XL/Unknown)
Phase 2: Disease Matching
- [ ] ≥5 candidate diseases identified (or all if fewer match)
- [ ] Each disease has ORPHA ID
- [ ] Each disease has OMIM ID (if available)
- [ ] Phenotype match % calculated for each
- [ ] Diseases ranked by match score
- [ ] Inheritance pattern for each disease
- [ ] Causative genes listed for each disease
- [ ] Top 3 diseases have detailed feature comparison
Phase 3: Gene Panel
- [ ] ≥5 genes in recommended panel (or all from top diseases)
- [ ] Each gene has evidence level (ClinGen: Definitive/Strong/Moderate)
- [ ] Constraint scores (pLI) provided
- [ ] Expression validation for relevant tissue
- [ ] Genes prioritized by tier (★★★/★★☆/★☆☆)
- [ ] Testing strategy recommended (single gene vs panel vs WES)
- [ ] Cost-effectiveness considered
Phase 4: Variant Interpretation (if variants provided)
- [ ] ClinVar ID and classification retrieved
- [ ] gnomAD allele frequency checked
- [ ] Population-specific frequencies noted
- [ ] CADD/REVEL scores obtained
- [ ] ACMG criteria systematically applied
- [ ] Each criterion has evidence documented
- [ ] Preliminary classification stated
- [ ] Confidence in classification noted
Phase 5: Structure Analysis (if VUS)
- [ ] NVIDIA_API_KEY availability documented
- [ ] Structure prediction method stated
- [ ] pLDDT confidence at variant position reported
- [ ] Domain location assessed
- [ ] Conservation data included
- [ ] Nearby pathogenic variants noted
- [ ] Structural evidence summarized
- [ ] Impact on ACMG classification stated
Phase 6: Recommendations
- [ ] ≥3 specific next steps listed
- [ ] Priority order for actions
- [ ] Specialist referrals suggested (genetics, cardiology, etc.)
- [ ] Family screening recommendations
- [ ] Follow-up timeline suggested
- [ ] Genetic counseling mentioned
Phase 7: Data Gaps
- [ ] All gaps aggregated in one section
- [ ] Reason for each gap documented
- [ ] Alternative approaches suggested
---
Citation Requirements
Every Section Must Include
- [ ] Source database name
- [ ] Tool used (in backticks)
- [ ] Specific identifiers (ORPHA, OMIM, HP, etc.)
Format Examples
*Source: Orphanet via `Orphanet_558` (ORPHA:558)*
*Source: OMIM via `OMIM_get_entry` (MIM:154700)*
*Source: HPO via `HPO_search_terms` (HP:0001166)*
*Source: ClinVar via `ClinVar_get_variant_details` (VCV000012345)*
*Source: gnomAD via `gnomad_get_variant` (AF: 0.00001)*
*Source: NVIDIA NIM via `NvidiaNIM_alphafold2` (pLDDT: 85.3)*---
Evidence Grading
All Diagnoses Must Have
- [ ] Evidence tier assigned (★★★ to ☆☆☆)
- [ ] Phenotype match % documented
- [ ] Genetic evidence level (if variant found)
Tier Definitions
| Tier | Symbol | Criteria |
|---|---|---|
| T1 | ★★★ | Phenotype >80% + pathogenic variant OR clinical diagnosis met |
| T2 | ★★☆ | Phenotype 60-80% OR likely pathogenic variant |
| T3 | ★☆☆ | Phenotype 40-60% OR VUS in candidate gene |
| T4 | ☆☆☆ | Phenotype <40% OR no supporting genetic evidence |
---
Quantified Minimums
| Section | Minimum Requirement |
|---|---|
| HPO terms | ≥5 standardized terms |
| Candidate diseases | ≥5 ranked diseases (or all matching) |
| Disease details | Top 3 with full feature comparison |
| Gene panel | ≥5 genes with evidence levels |
| ACMG criteria | All applicable criteria evaluated |
| Recommendations | ≥3 specific next steps |
---
Phenotype-Specific Checks
Connective Tissue Phenotypes
- [ ] Cardiac features assessed (aortic root, mitral valve)
- [ ] Skeletal features documented (height, proportions)
- [ ] Ocular features checked (lens, myopia)
- [ ] Skin findings noted (striae, elasticity)
- [ ] Ghent criteria referenced (if Marfan suspected)
Neurological Phenotypes
- [ ] Developmental milestones documented
- [ ] Seizure history (type, onset, frequency)
- [ ] MRI findings (if available)
- [ ] Cognitive assessment
- [ ] Movement disorders noted
Metabolic Phenotypes
- [ ] Biochemical markers (if available)
- [ ] Dietary history relevant
- [ ] Acute decompensation episodes
- [ ] Treatment response history
---
Output Files
Required
- [ ]
[PATIENT_ID]_rare_disease_report.md- Main report
Optional (if applicable)
- [ ]
[PATIENT_ID]_gene_panel.csv- Prioritized genes - [ ]
[PATIENT_ID]_variant_interpretation.csv- Variant details
CSV Column Requirements
gene_panel.csv:
Gene,Evidence_Level,Constraint_pLI,Associated_Diseases,Priority_Tiervariant_interpretation.csv:
Variant,Gene,ClinVar_Class,gnomAD_AF,ACMG_Criteria,Classification---
Final Review
Before Delivery
- [ ] No
[Researching...]placeholders remaining - [ ] All tables properly formatted
- [ ] No empty sections (use "Not applicable" if needed)
- [ ] Executive summary synthesizes key findings
- [ ] Most likely diagnosis clearly stated
- [ ] Recommendations are actionable
- [ ] Report is understandable to referring clinician
Common Issues to Avoid
- [ ] HPO terms without IDs
- [ ] Diseases without ORPHA/OMIM identifiers
- [ ] Variants without population frequency
- [ ] ACMG classification without documented criteria
- [ ] Recommendations without priority order
- [ ] Missing family history implications
---
Urgent Findings Protocol
If any of these found, flag prominently:
- [ ] Pathogenic variant in actionable gene
- [ ] High suspicion for condition requiring immediate intervention
- [ ] Cardiac abnormality suggesting aortic pathology
- [ ] Metabolic emergency risk
- [ ] Cancer predisposition syndrome
Diagnostic Workflow: Detailed Procedures
Detailed diagnostic algorithms, code examples, and phase-by-phase procedures for the Rare Disease Diagnosis skill.
---
Phase 1: Phenotype Standardization
1.1 Convert Symptoms to HPO Terms
def standardize_phenotype(tu, symptoms_list):
"""Convert clinical descriptions to HPO terms."""
hpo_terms = []
for symptom in symptoms_list:
# Search HPO for matching terms
results = tu.tools.HPO_search_terms(query=symptom)
if results:
hpo_terms.append({
'original': symptom,
'hpo_id': results[0]['id'],
'hpo_name': results[0]['name'],
'confidence': 'exact' if symptom.lower() in results[0]['name'].lower() else 'partial'
})
return hpo_terms1.2 Phenotype Categories
| Category | Examples | Weight |
|---|---|---|
| Core features | Always present in disease | High |
| Variable features | Present in >50% | Medium |
| Occasional features | Present in <50% | Low |
| Age-specific | Onset-dependent | Context |
---
Phase 2: Disease Matching
2.1 Orphanet Disease Search
def match_diseases_orphanet(tu, symptom_keywords):
"""Find rare diseases matching symptoms using Orphanet."""
candidate_diseases = []
# Search Orphanet by disease keywords
for keyword in symptom_keywords:
results = tu.tools.Orphanet_search_diseases(
operation="search_diseases",
query=keyword
)
if results.get('status') == 'success':
candidate_diseases.extend(results['data']['results'])
# Get genes for each disease
for disease in candidate_diseases:
orpha_code = disease.get('ORPHAcode')
genes = tu.tools.Orphanet_get_genes(
operation="get_genes",
orpha_code=orpha_code
)
disease['genes'] = genes.get('data', {}).get('genes', [])
return deduplicate_and_rank(candidate_diseases)2.2 OMIM Cross-Reference
def cross_reference_omim(tu, orphanet_diseases, gene_symbols):
"""Get OMIM details for diseases and genes."""
omim_data = {}
for gene in gene_symbols:
search_result = tu.tools.OMIM_search(
operation="search",
query=gene,
limit=5
)
if search_result.get('status') == 'success':
for entry in search_result['data'].get('entries', []):
mim_number = entry.get('mimNumber')
details = tu.tools.OMIM_get_entry(
operation="get_entry",
mim_number=str(mim_number)
)
synopsis = tu.tools.OMIM_get_clinical_synopsis(
operation="get_clinical_synopsis",
mim_number=str(mim_number)
)
omim_data[gene] = {
'mim_number': mim_number,
'details': details.get('data', {}),
'clinical_synopsis': synopsis.get('data', {})
}
return omim_data2.3 DisGeNET Gene-Disease Associations
def get_gene_disease_associations(tu, gene_symbols):
"""Get gene-disease associations from DisGeNET."""
associations = {}
for gene in gene_symbols:
result = tu.tools.DisGeNET_search_gene(
operation="search_gene",
gene=gene,
limit=20
)
if result.get('status') == 'success':
associations[gene] = result['data'].get('associations', [])
return associations
def get_disease_genes_disgenet(tu, disease_name):
"""Get all genes associated with a disease."""
result = tu.tools.DisGeNET_search_disease(
operation="search_disease",
disease=disease_name,
limit=30
)
return result.get('data', {}).get('associations', [])2.4 Phenotype Overlap Scoring
| Match Level | Score | Criteria |
|---|---|---|
| Excellent | >80% | Most core + variable features match |
| Good | 60-80% | Core features match, some variable |
| Possible | 40-60% | Some overlap, needs consideration |
| Unlikely | <40% | Poor phenotype fit |
---
Phase 3: Gene Panel Identification
3.1 Extract Disease Genes
def build_gene_panel(tu, candidate_diseases):
"""Build prioritized gene panel from candidate diseases."""
genes = {}
for disease in candidate_diseases:
for gene in disease['genes']:
if gene not in genes:
genes[gene] = {
'symbol': gene,
'diseases': [],
'evidence_level': 'unknown'
}
genes[gene]['diseases'].append(disease['name'])
return genes3.2 ClinGen Gene-Disease Validity Check
Critical: Always verify gene-disease validity through ClinGen before including in panel.
def get_clingen_gene_evidence(tu, gene_symbol):
"""
Get ClinGen gene-disease validity and dosage sensitivity.
ESSENTIAL for rare disease gene panel prioritization.
"""
# 1. Gene-disease validity classification
validity = tu.tools.ClinGen_search_gene_validity(gene=gene_symbol)
validity_levels = []
diseases_with_validity = []
if validity.get('data'):
for entry in validity.get('data', []):
validity_levels.append(entry.get('Classification'))
diseases_with_validity.append({
'disease': entry.get('Disease Label'),
'mondo_id': entry.get('Disease ID (MONDO)'),
'classification': entry.get('Classification'),
'inheritance': entry.get('Inheritance')
})
# 2. Dosage sensitivity (critical for CNV interpretation)
dosage = tu.tools.ClinGen_search_dosage_sensitivity(gene=gene_symbol)
hi_score = None
ts_score = None
if dosage.get('data'):
for entry in dosage.get('data', []):
hi_score = entry.get('Haploinsufficiency Score')
ts_score = entry.get('Triplosensitivity Score')
break
# 3. Clinical actionability (return of findings context)
actionability = tu.tools.ClinGen_search_actionability(gene=gene_symbol)
is_actionable = (actionability.get('adult_count', 0) > 0 or
actionability.get('pediatric_count', 0) > 0)
# Determine best evidence level
level_priority = ['Definitive', 'Strong', 'Moderate', 'Limited', 'Disputed', 'Refuted']
best_level = 'Not curated'
for level in level_priority:
if level in validity_levels:
best_level = level
break
return {
'gene': gene_symbol,
'evidence_level': best_level,
'diseases_curated': diseases_with_validity,
'haploinsufficiency_score': hi_score,
'triplosensitivity_score': ts_score,
'is_actionable': is_actionable,
'include_in_panel': best_level in ['Definitive', 'Strong', 'Moderate']
}
def prioritize_genes_with_clingen(tu, gene_list):
"""Prioritize genes using ClinGen evidence levels."""
prioritized = []
for gene in gene_list:
evidence = get_clingen_gene_evidence(tu, gene)
score = 0
if evidence['evidence_level'] == 'Definitive':
score = 5
elif evidence['evidence_level'] == 'Strong':
score = 4
elif evidence['evidence_level'] == 'Moderate':
score = 3
elif evidence['evidence_level'] == 'Limited':
score = 1
if evidence['haploinsufficiency_score'] == '3':
score += 1
if evidence['is_actionable']:
score += 1
prioritized.append({
**evidence,
'priority_score': score
})
return sorted(prioritized, key=lambda x: x['priority_score'], reverse=True)ClinGen Classification Impact on Panel:
| Classification | Include in Panel? | Priority |
|---|---|---|
| Definitive | YES - mandatory | Highest |
| Strong | YES - highly recommended | High |
| Moderate | YES | Medium |
| Limited | Include but flag | Low |
| Disputed | Exclude or separate | Avoid |
| Refuted | EXCLUDE | Do not test |
| Not curated | Use other evidence | Variable |
3.3 Gene Prioritization Criteria
| Priority | Criteria | Points |
|---|---|---|
| Tier 1 | Gene causes #1 ranked disease | +5 |
| Tier 2 | Gene causes multiple candidates | +3 |
| Tier 3 | ClinGen "Definitive" evidence | +3 |
| Tier 4 | Expressed in affected tissue | +2 |
| Tier 5 | Constraint score pLI >0.9 | +1 |
3.4 Expression Validation
def validate_expression(tu, gene_symbol, affected_tissue):
"""Check if gene is expressed in relevant tissue."""
gene_info = tu.tools.MyGene_query_genes(q=gene_symbol, species="human")
ensembl_id = gene_info.get('ensembl', {}).get('gene')
expression = tu.tools.GTEx_get_median_gene_expression(
gencode_id=f"{ensembl_id}.latest"
)
return expression.get(affected_tissue, 0) > 1 # TPM > 1---
Phase 3.5: Expression & Tissue Context
Cell-Type Specific Expression (CELLxGENE)
def get_cell_type_expression(tu, gene_symbol, affected_tissues):
"""Get single-cell expression to validate tissue relevance."""
expression = tu.tools.CELLxGENE_get_expression_data(
gene=gene_symbol,
tissue=affected_tissues[0] if affected_tissues else "all"
)
cell_metadata = tu.tools.CELLxGENE_get_cell_metadata(
gene=gene_symbol
)
high_expression = [
ct for ct in expression
if ct.get('mean_expression', 0) > 1.0
]
return {
'expression_data': expression,
'high_expression_cells': high_expression,
'total_cell_types': len(cell_metadata)
}Regulatory Context (ChIPAtlas)
def get_regulatory_context(tu, gene_symbol):
"""Get transcription factor binding for candidate genes."""
tf_binding = tu.tools.ChIPAtlas_enrichment_analysis(
gene=gene_symbol,
cell_type="all"
)
peaks = tu.tools.ChIPAtlas_get_peak_data(
gene=gene_symbol,
experiment_type="TF"
)
return {
'transcription_factors': tf_binding,
'regulatory_peaks': peaks
}---
Phase 3.6: Pathway Analysis
KEGG Pathway Context
def get_pathway_context(tu, gene_symbols):
"""Get pathway context for candidate genes."""
pathways = {}
for gene in gene_symbols:
kegg_genes = tu.tools.kegg_find_genes(query=f"hsa:{gene}")
if kegg_genes:
gene_info = tu.tools.kegg_get_gene_info(gene_id=kegg_genes[0]['id'])
pathways[gene] = gene_info.get('pathways', [])
return pathwaysProtein-Protein Interactions (IntAct)
def get_protein_interactions(tu, gene_symbol):
"""Get interaction partners for candidate genes."""
interactions = tu.tools.intact_search_interactions(
query=gene_symbol,
species="human"
)
network = tu.tools.intact_get_interaction_network(
gene=gene_symbol,
depth=1
)
return {
'interactions': interactions,
'network': network,
'interactor_count': len(interactions)
}---
Phase 4: Variant Interpretation
4.1 ClinVar Lookup
def interpret_variant(tu, variant_hgvs):
"""Get ClinVar interpretation for variant."""
result = tu.tools.ClinVar_search_variants(query=variant_hgvs)
return {
'clinvar_id': result.get('id'),
'classification': result.get('clinical_significance'),
'review_status': result.get('review_status'),
'conditions': result.get('conditions'),
'last_evaluated': result.get('last_evaluated')
}4.2 Population Frequency
def check_population_frequency(tu, variant_id):
"""Get gnomAD allele frequency."""
freq = tu.tools.gnomad_get_variant(variant_id=variant_id)
if freq['allele_frequency'] < 0.00001:
rarity = "Ultra-rare"
elif freq['allele_frequency'] < 0.0001:
rarity = "Rare"
elif freq['allele_frequency'] < 0.01:
rarity = "Low frequency"
else:
rarity = "Common (likely benign)"
return freq, rarity4.3 Computational Pathogenicity Prediction
Use multiple prediction tools for VUS interpretation:
def comprehensive_vus_prediction(tu, variant_info):
"""
Combine multiple prediction tools for VUS classification.
Critical for rare disease variants not in ClinVar.
"""
predictions = {}
# 1. CADD - Deleteriousness
cadd = tu.tools.CADD_get_variant_score(
chrom=variant_info['chrom'],
pos=variant_info['pos'],
ref=variant_info['ref'],
alt=variant_info['alt'],
version="GRCh38-v1.7"
)
if cadd.get('status') == 'success':
predictions['cadd'] = {
'score': cadd['data'].get('phred_score'),
'interpretation': cadd['data'].get('interpretation'),
'acmg': 'PP3' if cadd['data'].get('phred_score', 0) >= 20 else 'neutral'
}
# 2. AlphaMissense - DeepMind pathogenicity
if variant_info.get('uniprot_id') and variant_info.get('aa_change'):
am = tu.tools.AlphaMissense_get_variant_score(
uniprot_id=variant_info['uniprot_id'],
variant=variant_info['aa_change']
)
if am.get('status') == 'success' and am.get('data'):
classification = am['data'].get('classification')
predictions['alphamissense'] = {
'score': am['data'].get('pathogenicity_score'),
'classification': classification,
'acmg': 'PP3 (strong)' if classification == 'pathogenic' else (
'BP4 (strong)' if classification == 'benign' else 'neutral'
)
}
# 2b. ESMC-6B SAE - Mechanism of effect
# AlphaMissense answers "is it pathogenic?". SAE answers "how?" — which
# protein-language-model features are disrupted (catalytic, ligand-binding,
# PTM, etc.). Use when AlphaMissense is ambiguous or when the report
# needs a mechanistic explanation alongside the pathogenicity score.
# Requires ESM_API_KEY env var; missense only. Fetches the WT protein
# sequence on demand from UniProt and parses ref/pos/alt from aa_change.
import re
aa_match = re.match(r'^p?\.?([A-Z])(\d+)([A-Z])$', variant_info.get('aa_change', ''))
if variant_info.get('uniprot_id') and aa_match:
ref_aa, pos_str, alt_aa = aa_match.groups()
position = int(pos_str)
up = tu.tools.UniProt_get_entry_by_accession(accession=variant_info['uniprot_id'])
wt_seq = ((up.get('data') or {}).get('sequence', {}) or {}).get('value') if up.get('status') == 'success' else None
# Only call SAE when the WT residue at `position` matches `ref_aa` —
# otherwise the variant is on a different isoform than the UniProt
# canonical sequence, and a silent skip is safer than the tool's
# ref_aa-mismatch error in the diagnostic report.
if wt_seq and 1 <= position <= len(wt_seq) and wt_seq[position - 1] == ref_aa:
mech = tu.tools.ESM_explain_variant_mechanism(
sequence=wt_seq, position=position, ref_aa=ref_aa, alt_aa=alt_aa,
top_k_features=5,
)
if mech.get('status') == 'success':
predictions['sae_mechanism'] = {
'summary': mech['data']['mechanism_summary'],
'lost_categories': mech['data']['lost_feature_categories'],
'gained_categories': mech['data']['gained_feature_categories'],
# Map to ACMG: catalytic / ligand-binding / ptm loss is
# mechanistic evidence supporting PP3 (does not replace
# functional study PS3).
}
# 3. EVE - Evolutionary prediction
eve = tu.tools.EVE_get_variant_score(
chrom=variant_info['chrom'],
pos=variant_info['pos'],
ref=variant_info['ref'],
alt=variant_info['alt']
)
if eve.get('status') == 'success':
eve_scores = eve['data'].get('eve_scores', [])
if eve_scores:
predictions['eve'] = {
'score': eve_scores[0].get('eve_score'),
'classification': eve_scores[0].get('classification'),
'acmg': 'PP3' if eve_scores[0].get('eve_score', 0) > 0.5 else 'BP4'
}
# 4. SpliceAI - Splice variant prediction
variant_str = f"chr{variant_info['chrom']}-{variant_info['pos']}-{variant_info['ref']}-{variant_info['alt']}"
splice = tu.tools.SpliceAI_predict_splice(
variant=variant_str,
genome="38"
)
if splice.get('data'):
max_score = splice['data'].get('max_delta_score', 0)
interpretation = splice['data'].get('interpretation', '')
if max_score >= 0.8:
splice_acmg = 'PP3 (strong) - high splice impact'
elif max_score >= 0.5:
splice_acmg = 'PP3 (moderate) - splice impact'
elif max_score >= 0.2:
splice_acmg = 'PP3 (supporting) - possible splice effect'
else:
splice_acmg = 'BP7 (if synonymous) - no splice impact'
predictions['spliceai'] = {
'max_delta_score': max_score,
'interpretation': interpretation,
'scores': splice['data'].get('scores', []),
'acmg': splice_acmg
}
# Consensus for PP3/BP4
damaging = sum(1 for p in predictions.values() if 'PP3' in p.get('acmg', ''))
benign = sum(1 for p in predictions.values() if 'BP4' in p.get('acmg', ''))
return {
'predictions': predictions,
'consensus': {
'damaging_count': damaging,
'benign_count': benign,
'pp3_applicable': damaging >= 2 and benign == 0,
'bp4_applicable': benign >= 2 and damaging == 0
}
}4.4 ACMG Classification Criteria
| Evidence Type | Criteria | Weight |
|---|---|---|
| PVS1 | Null variant in gene where LOF is mechanism | Very Strong |
| PS1 | Same amino acid change as established pathogenic | Strong |
| PM2 | Absent from population databases | Moderate |
| PP3 | Computational evidence supports deleterious (AlphaMissense, CADD, EVE, SpliceAI) | Supporting |
| BA1 | Allele frequency >5% | Benign standalone |
Enhanced PP3 Evidence:
- AlphaMissense pathogenic (>0.564) = Strong PP3 support (~90% accuracy)
- CADD >=20 + EVE >0.5 = Multiple concordant predictions
- Agreement from 2+ predictors strengthens PP3 evidence
---
Phase 5: Structure Analysis for VUS
5.1 When to Perform Structure Analysis
Perform when:
- Variant is VUS or conflicting interpretations
- Missense variant in critical domain
- Novel variant not in databases
- Additional evidence needed for classification
5.2 Structure Prediction (NVIDIA NIM)
def analyze_variant_structure(tu, protein_sequence, variant_position):
"""Predict structure and analyze variant impact."""
structure = tu.tools.NvidiaNIM_alphafold2(
sequence=protein_sequence,
algorithm="mmseqs2",
relax_prediction=False
)
variant_plddt = get_residue_plddt(structure, variant_position)
confidence = "High" if variant_plddt > 70 else "Low"
return {
'structure': structure,
'variant_plddt': variant_plddt,
'confidence': confidence
}5.3 Domain Impact Assessment
def assess_domain_impact(tu, uniprot_id, variant_position):
"""Check if variant affects functional domain."""
domains = tu.tools.InterPro_get_protein_domains(accession=uniprot_id)
for domain in domains:
if domain['start'] <= variant_position <= domain['end']:
return {
'in_domain': True,
'domain_name': domain['name'],
'domain_function': domain['description']
}
return {'in_domain': False}---
Phase 6: Literature Evidence
6.1 Published Literature (PubMed)
def search_disease_literature(tu, disease_name, genes):
"""Search for relevant published literature."""
disease_papers = tu.tools.PubMed_search_articles(
query=f'"{disease_name}" AND (genetics OR mutation OR variant)',
limit=20
)
gene_papers = []
for gene in genes[:5]:
papers = tu.tools.PubMed_search_articles(
query=f'"{gene}" AND rare disease AND pathogenic',
limit=10
)
gene_papers.extend(papers)
return {
'disease_literature': disease_papers,
'gene_literature': gene_papers
}6.2 Preprint Literature (BioRxiv/MedRxiv)
def search_preprints(tu, disease_name, genes):
"""Search preprints for cutting-edge findings."""
biorxiv = tu.tools.BioRxiv_list_recent_preprints(
query=f"{disease_name} genetics",
limit=10
)
arxiv = tu.tools.ArXiv_search_papers(
query=f"rare disease diagnosis {' OR '.join(genes[:3])}",
category="q-bio",
limit=5
)
return {
'biorxiv': biorxiv,
'arxiv': arxiv
}6.3 Citation Analysis (OpenAlex)
def analyze_citations(tu, key_papers):
"""Analyze citation network for key papers."""
citation_analysis = []
for paper in key_papers[:5]:
work = tu.tools.openalex_search_works(
query=paper['title'],
limit=1
)
if work:
citation_analysis.append({
'title': paper['title'],
'citations': work[0].get('cited_by_count', 0),
'year': work[0].get('publication_year')
})
return citation_analysisRare Disease Diagnosis - Examples
Example 1: Connective Tissue Disorder
User Query
"23-year-old male with tall stature (6'5"), long fingers, joint hypermobility, and recent echo showing aortic root dilation 4.2cm. Father had similar build and died suddenly at age 45. What could this be?"
Expected Output
# Rare Disease Diagnostic Report
**Patient ID**: Example-001 | **Date**: 2026-02-04
---
## Executive Summary
This patient presents with a classic phenotype highly suggestive of **Marfan syndrome** (★★★). Key findings include tall stature, arachnodactyly, joint hypermobility, and aortic root dilation with a positive family history of sudden death. The phenotype match is 89% for Marfan syndrome. **Immediate FBN1 genetic testing is recommended**, along with urgent cardiology referral given the aortic dilation and family history of sudden death.
---
## 1. Phenotype Analysis
### 1.1 Standardized HPO Terms
| Clinical Feature | HPO Term | HPO ID | Category |
|------------------|----------|--------|----------|
| Tall stature (6'5") | Tall stature | HP:0000098 | Core |
| Long fingers | Arachnodactyly | HP:0001166 | Core |
| Joint hypermobility | Joint hypermobility | HP:0001382 | Core |
| Aortic root dilation | Aortic root aneurysm | HP:0002616 | Core |
| Family history of sudden death | Sudden cardiac death | HP:0001645 | Family |
**Total HPO Terms**: 5
**Age of Onset**: Childhood (stature)
**Family History**: Father deceased age 45, sudden death, similar phenotype
**Suspected Inheritance**: Autosomal dominant
*Source: HPO via `HPO_search_terms`*
---
## 2. Differential Diagnosis
### 2.1 Ranked Candidate Diseases
| Rank | Disease | ORPHA | OMIM | Match | Inheritance | Genes |
|------|---------|-------|------|-------|-------------|-------|
| 1 | Marfan syndrome | 558 | 154700 | 89% ★★★ | AD | FBN1 |
| 2 | Loeys-Dietz syndrome | 60030 | 609192 | 72% ★★☆ | AD | TGFBR1, TGFBR2, SMAD3 |
| 3 | Vascular EDS | 286 | 130050 | 58% ★☆☆ | AD | COL3A1 |
| 4 | Familial TAAD | 91387 | 607086 | 52% ★☆☆ | AD | ACTA2, MYH11 |
| 5 | Homocystinuria | 394 | 236200 | 45% ☆☆☆ | AR | CBS |
### 2.2 Disease Details
#### 1. Marfan Syndrome (★★★)
**ORPHA**: 558 | **OMIM**: 154700 | **Prevalence**: 1-5/10,000
**Phenotype Comparison**:
| Patient Feature | Marfan Feature | Frequency | Match |
|-----------------|----------------|-----------|-------|
| Tall stature | Tall stature | 95% | ✓ |
| Arachnodactyly | Arachnodactyly | 90% | ✓ |
| Joint hypermobility | Joint hypermobility | 85% | ✓ |
| Aortic root dilation | Aortic root dilation | 80% | ✓ |
| Family sudden death | Aortic dissection | 30% | ✓ |
| Ectopia lentis | Ectopia lentis | 60% | Not assessed |
**Ghent Criteria Assessment**:
- Aortic root Z-score: Likely ≥2 (4.2cm at age 23)
- Systemic score: ≥7 points (tall, arachnodactyly, joint hypermobility)
- FBN1 mutation: Pending testing
- **Clinical diagnosis likely met even without genetic testing**
**Gene**: FBN1 (fibrillin-1)
- ClinGen validity: Definitive
- Inheritance: AD (25% de novo)
*Source: Orphanet via `Orphanet_558`, OMIM via `OMIM_get_entry`*
#### 2. Loeys-Dietz Syndrome (★★☆)
**ORPHA**: 60030 | **OMIM**: 609192
**Key Distinguishing Features** (not present in patient):
- Hypertelorism (wide-set eyes)
- Bifid uvula or cleft palate
- Arterial tortuosity
- Translucent skin
**Consider if**: FBN1 negative AND craniofacial features present
*Source: Orphanet, OMIM*
---
## 3. Recommended Gene Panel
### 3.1 Prioritized Genes
| Priority | Gene | Disease | Evidence | pLI | Expression |
|----------|------|---------|----------|-----|------------|
| ★★★ | FBN1 | Marfan | Definitive | 1.00 | Aorta, heart |
| ★★☆ | TGFBR1 | LDS1 | Definitive | 0.98 | Ubiquitous |
| ★★☆ | TGFBR2 | LDS2 | Definitive | 0.99 | Ubiquitous |
| ★★☆ | SMAD3 | LDS3 | Definitive | 0.89 | Ubiquitous |
| ★☆☆ | COL3A1 | vEDS | Definitive | 1.00 | Connective |
| ★☆☆ | ACTA2 | FTAAD | Definitive | 0.97 | Smooth muscle |
### 3.2 Testing Strategy
**Recommended Approach**:
1. **Immediate**: FBN1 sequencing + deletion/duplication analysis
- Highest pre-test probability
- Expected turnaround: 2-4 weeks
2. **If FBN1 negative**: Aortopathy gene panel
- TGFBR1, TGFBR2, SMAD3, COL3A1, ACTA2, MYH11
3. **If panel negative**: Consider WES with phenotype-guided analysis
*Source: ClinGen gene-disease validity, GTEx expression*
---
## 4. Variant Interpretation
**No variants provided for interpretation.**
Genetic testing recommended - see Section 3.
---
## 5. Structural Analysis
**Not applicable** - No VUS requiring structural analysis.
---
## 6. Clinical Recommendations
### 6.1 Diagnostic Next Steps
| Priority | Action | Rationale | Timeline |
|----------|--------|-----------|----------|
| 1 | **Urgent cardiology referral** | Aortic root 4.2cm + family history | This week |
| 2 | **FBN1 genetic testing** | Confirm diagnosis, family cascade | Order now |
| 3 | **Ophthalmology exam** | Ectopia lentis screening | Within 1 month |
| 4 | **Full skeletal assessment** | Document systemic features | Within 1 month |
### 6.2 Specialist Referrals
- **Cardiology** (URGENT): Aortic surveillance, beta-blocker consideration
- **Medical Genetics**: Genetic counseling, testing coordination
- **Ophthalmology**: Slit-lamp exam for ectopia lentis
- **Orthopedics**: Scoliosis screening if indicated
### 6.3 Family Screening
**High priority given family history**:
- Father deceased (autopsy results if available)
- Any siblings should be offered:
- Clinical screening (echo, skeletal exam)
- Genetic testing once proband result available
- Extended family (paternal) should be informed
### 6.4 Urgent Considerations
⚠️ **URGENT**: Given aortic root dilation AND family history of sudden death:
- Avoid competitive sports and isometric exercise
- Discuss blood pressure management
- Review for aortic dissection symptoms
- Cardiology referral within 1 week
---
## 7. Data Gaps & Limitations
| Gap | Impact | Recommendation |
|-----|--------|----------------|
| No ophthalmology exam | Cannot assess ectopia lentis | Schedule exam |
| Echo Z-score not calculated | Need BSA-adjusted measurement | Request from cardiology |
| Father's autopsy unknown | Cannot confirm aortic dissection | Obtain records |
| No genetic testing yet | Diagnosis presumptive | Order FBN1 testing |
---
## 8. Data Sources
| Tool | Query | Data Retrieved |
|------|-------|----------------|
| HPO_search_terms | Patient symptoms | HPO term mapping |
| Orphanet_558 | Marfan syndrome | Disease details |
| OMIM_get_entry | 154700 | Clinical synopsis |
| ClinGen | FBN1-Marfan | Gene-disease validity |
| GTEx | FBN1 expression | Tissue expression |---
Example 2: Pediatric Neurological Phenotype
User Query
"5-year-old with developmental delay, hypotonia, seizures starting at age 2, and MRI showing periventricular white matter changes. WES found a VUS: GFAP c.1186C>T (p.Arg396Cys). What's the diagnosis?"
Expected Output (Key Sections)
# Rare Disease Diagnostic Report
**Patient ID**: Example-002 | **Date**: 2026-02-04
---
## Executive Summary
This patient's phenotype and VUS in GFAP are highly consistent with **Alexander disease** (★★★). The combination of developmental delay, hypotonia, seizures, and frontal-predominant white matter changes in a young child matches infantile/juvenile Alexander disease. The GFAP p.Arg396Cys variant affects a highly conserved residue in the rod domain. **Structural analysis and segregation studies are recommended to support reclassification of this VUS to Likely Pathogenic.**
---
## 1. Phenotype Analysis
| Clinical Feature | HPO Term | HPO ID | Category |
|------------------|----------|--------|----------|
| Developmental delay | Global developmental delay | HP:0001263 | Core |
| Hypotonia | Muscular hypotonia | HP:0001252 | Core |
| Seizures (age 2) | Seizures | HP:0001250 | Core |
| White matter changes | Leukoencephalopathy | HP:0002352 | Core |
| Frontal predominance | Frontal white matter abnormality | HP:0012762 | Specific |
---
## 2. Differential Diagnosis
| Rank | Disease | ORPHA | Match | Key Features |
|------|---------|-------|-------|--------------|
| 1 | Alexander disease | 58 | 92% ★★★ | GFAP, frontal WM, macrocephaly |
| 2 | Vanishing white matter | 135 | 68% ★★☆ | eIF2B genes, progressive |
| 3 | Canavan disease | 141 | 55% ★☆☆ | ASPA, NAA elevated |
| 4 | Metachromatic leukodystrophy | 512 | 48% ★☆☆ | ARSA, progressive |
### Alexander Disease Details
**Diagnostic Criteria**:
1. Clinical: Macrocephaly, seizures, developmental delay ✓
2. MRI: Frontal-predominant white matter changes ✓
3. Genetic: Heterozygous GFAP variant ✓ (VUS)
*Source: Orphanet via `Orphanet_58`*
---
## 4. Variant Interpretation
### Variant: GFAP c.1186C>T (p.Arg396Cys)
| Property | Value | Interpretation |
|----------|-------|----------------|
| Gene | GFAP | Alexander disease gene |
| Consequence | Missense | Amino acid change |
| ClinVar | VUS | 1 submission |
| gnomAD AF | 0.0000032 | Absent (PM2) |
| CADD | 29.2 | Deleterious |
| REVEL | 0.89 | Likely damaging |
### ACMG Evidence
| Criterion | Evidence | Strength |
|-----------|----------|----------|
| PM2 | Absent from gnomAD | Moderate |
| PP3 | CADD=29.2, REVEL=0.89 | Supporting |
| PP4 | Phenotype specific for Alexander | Supporting |
| PM1 | Located in rod domain (critical) | Moderate |
**Current Classification**: VUS (2 Moderate + 2 Supporting)
**With segregation (PS2) or functional data**: Would become Likely Pathogenic
---
## 5. Structural Analysis
### 5.1 Structure Prediction
**Method**: AlphaFold2 via NVIDIA NIM
**Protein**: Glial fibrillary acidic protein (GFAP)
**Sequence Length**: 432 amino acids
| Metric | Value |
|--------|-------|
| Mean pLDDT | 78.4 |
| Position 396 pLDDT | 89.2 (high confidence) |
| Domain | Rod domain, coil 2B |
### 5.2 Variant Impact
**p.Arg396Cys Analysis**:
| Feature | Finding |
|---------|---------|
| Location | Rod domain (coiled-coil) |
| Wild-type | Arginine (positive, polar) |
| Mutant | Cysteine (neutral, potential disulfide) |
| Conservation | 100% across vertebrates |
| Nearby pathogenic | p.Arg398Trp (Pathogenic) |
**Structural Interpretation**:
- Arginine at position 396 participates in coiled-coil interactions
- Cysteine substitution disrupts ionic interactions
- Adjacent residue 398 has pathogenic variants
- **Strong structural support for pathogenicity**
*Source: NVIDIA NIM via `NvidiaNIM_alphafold2`, InterPro*
---
## 6. Clinical Recommendations
### Immediate Actions
1. **Clinical genetics consultation** - Discuss VUS implications
2. **Parental testing** - De novo status would upgrade variant (PS2)
3. **Neurology follow-up** - Seizure management, prognosis discussion
### Supporting Studies
- Obtain parental samples for GFAP c.1186C>T
- If not in parents → add PS2 (strong evidence) → Likely Pathogenic---
Example 3: Limited Data Scenario
User Query
"6-month-old with severe hypotonia and feeding difficulties. No genetic testing done yet. Where do we start?"
Expected Output (Key Sections)
## Executive Summary
This infant presents with a non-specific phenotype (hypotonia + feeding difficulties) that could represent numerous conditions. Given the limited phenotypic information, **a broad approach is recommended**: either chromosomal microarray + trio WES, or a comprehensive neuromuscular panel. Additional clinical information (neuroimaging, EMG, metabolic workup) would help narrow the differential.
---
## 2. Differential Diagnosis
**Note**: With only 2 phenotypic features, differential diagnosis is broad.
### Top Categories to Consider
| Category | Examples | Key Tests |
|----------|----------|-----------|
| **SMA/Neuromuscular** | SMA type 1, CMD | SMN1 del/dup, CK |
| **Congenital myopathy** | RYR1, MTM1 | Muscle biopsy, EMG |
| **Chromosomal** | Prader-Willi, 1p36 del | CMA |
| **Metabolic** | Pompe, mitochondrial | GAA enzyme, lactate |
| **Syndromic** | Various | Dysmorphology exam |
### Priority Testing
| Test | Yield | Rationale |
|------|-------|-----------|
| Chromosomal microarray | 15-20% | Screen for CNVs |
| SMN1 deletion | 8-10% if SMA | Treatable if positive |
| Trio WES | 25-40% | Broad diagnostic screen |
---
## 3. Recommended Additional Workup
Before genetic testing, consider:
| Test | Purpose | Urgency |
|------|---------|---------|
| CK level | Myopathy vs neuropathy | High |
| Lactate | Metabolic disease | Medium |
| Brain MRI | Structural vs metabolic | Medium |
| EMG/NCS | Localize lesion | Medium |
| Dysmorphology exam | Syndromic features | High |
---
## 6. Recommendations
### Immediate
1. **Genetics referral** for comprehensive evaluation
2. **CK and metabolic labs** as first-line screening
3. **SMN1 testing** - treatable condition, high impact
### Diagnostic Strategy Options
**Option A**: Targeted approach
- SMN1 → CMA → Neuromuscular panel → WES
**Option B**: Broad approach (recommended if resources allow)
- Trio WES + CMA concurrently
---
## 7. Data Gaps
| Gap | Impact | Action Needed |
|-----|--------|---------------|
| Limited phenotype | Broad differential | Detailed clinical exam |
| No neuroimaging | Cannot assess CNS | Order brain MRI |
| No metabolic studies | May miss treatable | Order basic metabolic |
| No family history | Cannot assess inheritance | Take detailed pedigree |
*Note: This case has significant diagnostic uncertainty due to limited phenotypic information.*Report Template & Output Examples
Templates and example outputs for each phase of the rare disease diagnosis workflow.
---
Report File Template
File: [PATIENT_ID]_rare_disease_report.md
# Rare Disease Diagnostic Report
**Patient ID**: [ID] | **Date**: [Date] | **Status**: In Progress
---
## Executive Summary
[Researching...]
---
## 1. Phenotype Analysis
### 1.1 Standardized HPO Terms
[Researching...]
### 1.2 Key Clinical Features
[Researching...]
---
## 2. Differential Diagnosis
### 2.1 Ranked Candidate Diseases
[Researching...]
### 2.2 Disease Details
[Researching...]
---
## 3. Recommended Gene Panel
### 3.1 Prioritized Genes
[Researching...]
### 3.2 Testing Strategy
[Researching...]
---
## 4. Variant Interpretation (if applicable)
### 4.1 Variant Details
[Researching...]
### 4.2 ACMG Classification
[Researching...]
---
## 5. Structural Analysis (if applicable)
### 5.1 Structure Prediction
[Researching...]
### 5.2 Variant Impact
[Researching...]
---
## 6. Clinical Recommendations
### 6.1 Diagnostic Next Steps
[Researching...]
### 6.2 Specialist Referrals
[Researching...]
### 6.3 Family Screening
[Researching...]
---
## 7. Data Gaps & Limitations
[Researching...]
---
## 8. Data Sources
[Will be populated as research progresses...]---
Phase Output Examples
Phase 1: Phenotype Analysis Output
## 1. Phenotype Analysis
### 1.1 Standardized HPO Terms
| Clinical Feature | HPO Term | HPO ID | Category |
|------------------|----------|--------|----------|
| Tall stature | Tall stature | HP:0000098 | Core |
| Long fingers | Arachnodactyly | HP:0001166 | Core |
| Heart murmur | Cardiac murmur | HP:0030148 | Variable |
| Joint hypermobility | Joint hypermobility | HP:0001382 | Core |
**Total HPO Terms**: 8
**Onset**: Childhood
**Family History**: Father with similar features (AD suspected)
*Source: HPO via `HPO_search_terms`*Phase 2: Differential Diagnosis Output
## 2. Differential Diagnosis
### Top Candidate Diseases (Ranked by Phenotype Match)
| Rank | Disease | ORPHA | OMIM | Match | Inheritance | Key Gene(s) |
|------|---------|-------|------|-------|-------------|-------------|
| 1 | Marfan syndrome | 558 | 154700 | 85% | AD | FBN1 |
| 2 | Loeys-Dietz syndrome | 60030 | 609192 | 72% | AD | TGFBR1, TGFBR2 |
| 3 | Ehlers-Danlos, vascular | 286 | 130050 | 65% | AD | COL3A1 |
| 4 | Homocystinuria | 394 | 236200 | 58% | AR | CBS |
### DisGeNET Gene-Disease Evidence
| Gene | Associated Diseases | GDA Score | Evidence |
|------|---------------------|-----------|----------|
| FBN1 | Marfan syndrome, MASS phenotype | 0.95 | Curated |
| TGFBR1 | Loeys-Dietz syndrome | 0.89 | Curated |
| COL3A1 | vascular EDS | 0.91 | Curated |
*Source: DisGeNET via `DisGeNET_search_gene`*
### Disease Details
#### 1. Marfan Syndrome
**ORPHA**: 558 | **OMIM**: 154700 | **Prevalence**: 1-5/10,000
**Phenotype Match Analysis**:
| Patient Feature | Disease Feature | Match |
|-----------------|-----------------|-------|
| Tall stature | Present in 95% | Yes |
| Arachnodactyly | Present in 90% | Yes |
| Joint hypermobility | Present in 85% | Yes |
| Cardiac murmur | Aortic root dilation (70%) | Partial |
**OMIM Clinical Synopsis** (via `OMIM_get_clinical_synopsis`):
- **Cardiovascular**: Aortic root dilation, mitral valve prolapse
- **Skeletal**: Scoliosis, pectus excavatum, tall stature
- **Ocular**: Ectopia lentis, myopia
**Diagnostic Criteria**: Ghent nosology (2010)
- Aortic root dilation/dissection + FBN1 mutation = Diagnosis
- Without genetic testing: systemic score >=7 + ectopia lentis
**Inheritance**: Autosomal dominant (25% de novo)
*Source: Orphanet via `Orphanet_get_disease`, OMIM via `OMIM_get_entry`, DisGeNET*Phase 3: Gene Panel Output
## 3. Recommended Gene Panel
### 3.1 Prioritized Genes for Testing
| Priority | Gene | Diseases | Evidence | Constraint (pLI) | Expression |
|----------|------|----------|----------|------------------|------------|
| High | FBN1 | Marfan syndrome | Definitive | 1.00 | Heart, aorta |
| High | TGFBR1 | Loeys-Dietz 1 | Definitive | 0.98 | Ubiquitous |
| High | TGFBR2 | Loeys-Dietz 2 | Definitive | 0.99 | Ubiquitous |
| Medium | COL3A1 | EDS vascular | Definitive | 1.00 | Connective tissue |
| Low | CBS | Homocystinuria | Definitive | 0.00 | Liver |
### 3.2 Panel Design Recommendation
**Minimum Panel** (high yield): FBN1, TGFBR1, TGFBR2, COL3A1
**Extended Panel** (+differential): Add CBS, SMAD3, ACTA2
**Testing Strategy**:
1. Start with FBN1 sequencing (highest pre-test probability)
2. If negative, proceed to full connective tissue panel
3. Consider WES if panel negative
*Source: ClinGen via gene-disease validity, GTEx expression*Phase 3.5: Expression & Regulatory Context Output
## 3.5 Expression & Regulatory Context
### Cell-Type Specific Expression (CELLxGENE)
| Gene | Top Expressing Cell Types | Expression Level | Tissue Relevance |
|------|---------------------------|------------------|------------------|
| FBN1 | Fibroblasts, Smooth muscle | High (TPM=45) | Connective tissue |
| TGFBR1 | Endothelial, Fibroblasts | Medium (TPM=12) | Vascular |
| COL3A1 | Fibroblasts, Myofibroblasts | Very High (TPM=120) | Connective tissue |
**Interpretation**: All top candidate genes show high expression in disease-relevant cell types.
### Regulatory Context (ChIPAtlas)
| Gene | Key TF Regulators | Regulatory Significance |
|------|-------------------|------------------------|
| FBN1 | TGFb pathway (SMAD2/3), AP-1 | TGFb-responsive |
| TGFBR1 | STAT3, NF-kB | Inflammation-responsive |
*Source: CELLxGENE Census, ChIPAtlas*Phase 3.6: Pathway & Network Context Output
## 3.6 Pathway & Network Context
### KEGG Pathways
| Gene | Key Pathways | Biological Process |
|------|--------------|-------------------|
| FBN1 | ECM-receptor interaction (hsa04512) | Extracellular matrix |
| TGFBR1/2 | TGF-beta signaling (hsa04350) | Cell signaling |
| COL3A1 | Focal adhesion (hsa04510) | Cell-matrix adhesion |
### Shared Pathway Analysis
**Convergent pathways** (>=2 candidate genes):
- TGF-beta signaling pathway: FBN1, TGFBR1, TGFBR2, SMAD3
- ECM organization: FBN1, COL3A1
**Interpretation**: Candidate genes converge on TGF-beta signaling and extracellular matrix pathways, consistent with connective tissue disorder etiology.
### Protein-Protein Interactions (IntAct)
| Gene | Direct Interactors | Notable Partners |
|------|-------------------|------------------|
| FBN1 | 42 | LTBP1, TGFB1, ADAMTS10 |
| TGFBR1 | 68 | TGFBR2, SMAD2, SMAD3 |
*Source: KEGG, IntAct, Reactome*Phase 4: Variant Interpretation Output
## 4. Variant Interpretation
### 4.1 Variant: FBN1 c.4621G>A (p.Glu1541Lys)
| Property | Value | Interpretation |
|----------|-------|----------------|
| Gene | FBN1 | Marfan syndrome gene |
| Consequence | Missense | Amino acid change |
| ClinVar | VUS | Uncertain significance |
| gnomAD AF | 0.000004 | Ultra-rare (PM2) |
### 4.2 Computational Predictions
| Predictor | Score | Classification | ACMG Support |
|-----------|-------|----------------|--------------|
| **AlphaMissense** | 0.78 | Pathogenic | PP3 (strong) |
| **CADD PHRED** | 28.5 | Top 0.1% deleterious | PP3 |
| **EVE** | 0.72 | Likely pathogenic | PP3 |
**Consensus**: 3/3 predictors concordant damaging -> **Strong PP3 support**
*Source: AlphaMissense, CADD API, EVE via Ensembl VEP*
### 4.3 ACMG Evidence Summary
| Criterion | Evidence | Strength |
|-----------|----------|----------|
| PM2 | Absent from gnomAD (AF < 0.00001) | Moderate |
| PP3 | AlphaMissense + CADD + EVE concordant | Supporting (strong) |
| PP4 | Phenotype highly specific for Marfan | Supporting |
| PS4 | Multiple affected family members | Strong |
**Preliminary Classification**: Likely Pathogenic (1 Strong + 1 Moderate + 2 Supporting)
*Source: ClinVar, gnomAD, AlphaMissense, CADD, EVE*Phase 5: Structure Analysis Output
## 5. Structural Analysis
### 5.1 Structure Prediction
**Method**: AlphaFold2 via NVIDIA NIM
**Protein**: Fibrillin-1 (FBN1)
**Sequence Length**: 2,871 amino acids
| Metric | Value | Interpretation |
|--------|-------|----------------|
| Mean pLDDT | 85.3 | High confidence overall |
| Variant position pLDDT | 92.1 | Very high confidence |
| Nearby domain | cbEGF-like domain 23 | Calcium-binding |
### 5.2 Variant Location Analysis
**Variant**: p.Glu1541Lys
| Feature | Finding | Impact |
|---------|---------|--------|
| Domain | cbEGF-like domain 23 | Critical for calcium binding |
| Conservation | 100% conserved across vertebrates | High constraint |
| Structural role | Calcium coordination residue | Likely destabilizing |
| Nearby pathogenic | p.Glu1540Lys (Pathogenic) | Adjacent residue |
### 5.3 Structural Interpretation
The variant p.Glu1541Lys:
1. **Located in cbEGF domain** - Critical for fibrillin-1 function
2. **Glutamate to Lysine** - Charge reversal (negative to positive)
3. **Calcium binding** - Glutamate at this position coordinates Ca2+
4. **Adjacent pathogenic variant** - p.Glu1540Lys is classified Pathogenic
**Structural Evidence**: Strong support for pathogenicity (PM1 - critical domain)
*Source: NVIDIA NIM via `NvidiaNIM_alphafold2`, InterPro*Phase 6: Literature Evidence Output
## 6. Literature Evidence
### 6.1 Key Published Studies
| PMID | Title | Year | Citations | Relevance |
|------|-------|------|-----------|-----------|
| 32123456 | FBN1 variants in Marfan syndrome... | 2023 | 45 | Direct |
| 31987654 | TGF-beta signaling in connective... | 2022 | 89 | Pathway |
| 30876543 | Novel diagnostic criteria for... | 2021 | 156 | Diagnostic |
### 6.2 Recent Preprints (Not Yet Peer-Reviewed)
| Source | Title | Posted | Relevance |
|--------|-------|--------|-----------|
| BioRxiv | Novel FBN1 splice variant causes... | 2024-01 | Case report |
| MedRxiv | Machine learning for Marfan... | 2024-02 | Diagnostic |
**Note**: Preprints have not undergone peer review. Use with caution.
### 6.3 Evidence Summary
| Evidence Type | Count | Strength |
|---------------|-------|----------|
| Case reports | 12 | Supporting |
| Functional studies | 5 | Strong |
| Clinical trials | 2 | Strong |
| Reviews | 8 | Context |
*Source: PubMed, BioRxiv, OpenAlex*---
Additional Output Files
Gene Panel CSV
File: [PATIENT_ID]_gene_panel.csv
priority,gene,diseases,evidence_level,pLI,expression,clingen_classification,actionable
1,FBN1,Marfan syndrome,Definitive,1.00,"Heart, aorta",Definitive,Yes
2,TGFBR1,Loeys-Dietz 1,Definitive,0.98,Ubiquitous,Definitive,Yes
3,TGFBR2,Loeys-Dietz 2,Definitive,0.99,Ubiquitous,Definitive,Yes
4,COL3A1,EDS vascular,Definitive,1.00,Connective tissue,Definitive,Yes
5,CBS,Homocystinuria,Definitive,0.00,Liver,Definitive,NoVariant Interpretation CSV
File: [PATIENT_ID]_variant_interpretation.csv
gene,variant,consequence,clinvar,gnomad_af,cadd,alphamissense,eve,acmg_class
FBN1,c.4621G>A,Missense,VUS,0.000004,28.5,0.78,0.72,Likely Pathogenic"""
Clinical diagnosis reference for rare-disease-diagnosis skill.
Usage:
python clinical_patterns.py --type syndrome --name "Felty"
python clinical_patterns.py --type differential --symptoms "RA,splenomegaly,neutropenia"
python clinical_patterns.py --type red_flag --symptom "splenomegaly"
python clinical_patterns.py --type occupational --exposure "asbestos"
"""
import argparse
import json
import sys
SYNDROMES = {
"felty": {
"name": "Felty's Syndrome",
"triad": ["rheumatoid arthritis", "splenomegaly", "neutropenia"],
"key_distinction": "NOT infectious — neutropenia is autoimmune, not septic",
"misdiagnosis_traps": [
"Splenomegaly + neutropenia mistaken for lymphoma or leukemia",
"Recurrent infections (secondary to neutropenia) mistaken for primary immunodeficiency",
"RA assumed inactive when joint disease quiets but hematologic disease progresses",
],
"red_flags": [
"Seropositive RA (high RF, anti-CCP) — essential for diagnosis",
"Neutrophil count < 2.0 × 10⁹/L in RA patient",
"Palpable spleen in long-standing RA",
"Recurrent bacterial infections without obvious cause",
],
"diagnostic_steps": [
"1. Confirm seropositive RA (RF, anti-CCP)",
"2. CBC with differential — absolute neutrophil count",
"3. Abdominal exam / ultrasound for splenomegaly",
"4. Bone marrow biopsy if needed to exclude myeloid pathology",
"5. Rule out drug-induced neutropenia (methotrexate, gold, penicillamine)",
],
"treatment_hint": "MTX or leflunomide; G-CSF for severe/recurrent infections; splenectomy rarely needed",
"icd10": "M05.0",
"orpha": "ORPHA:47612",
},
"coccidioidomycosis": {
"name": "Coccidioidomycosis (Valley Fever)",
"triad": ["fever", "cough", "chest pain"],
"key_distinction": "Endemic fungal infection — travel history to SW USA, Mexico, Central/South America is ESSENTIAL",
"misdiagnosis_traps": [
"Pulmonary form mistaken for community-acquired pneumonia or TB",
"Disseminated form (meningitis, bone) mistaken for bacterial meningitis or osteomyelitis",
"Skin lesions mistaken for sarcoidosis or cutaneous TB",
"Eosinophilia clue often overlooked",
],
"red_flags": [
"Flu-like illness + eosinophilia after travel to endemic region",
"Erythema nodosum or erythema multiforme with respiratory symptoms",
"Pneumonia not responding to standard antibiotics",
"Meningitis with eosinophils in CSF",
"Lytic bone lesions + pulmonary infiltrates",
],
"diagnostic_steps": [
"1. ALWAYS take travel/residence history (endemic: Arizona, California's Central Valley, Texas, Mexico, Central America)",
"2. Serology: IgM (early) and IgG (complement fixation — severity marker)",
"3. Culture of sputum/BAL (BSL-3 precautions — inform lab)",
"4. Urine antigen for disseminated disease",
"5. Chest CT: nodules, cavities, hilar lymphadenopathy",
],
"treatment_hint": "Mild pulmonary: fluconazole or itraconazole. Severe/disseminated: amphotericin B then azole step-down. Meningitis: lifelong fluconazole.",
"icd10": "B38",
"orpha": None,
},
"sle_nephritis": {
"name": "SLE Nephritis (Lupus Nephritis)",
"triad": ["hematuria", "proteinuria", "hypertension"],
"key_distinction": "vs. post-streptococcal GN: check ASO titers and complement (C3/C4 persistently low in SLE, transiently low in PSGN)",
"misdiagnosis_traps": [
"Post-strep GN: low C3 but ASO high, short course, resolves in weeks",
"SLE: C3 AND C4 both low, ANA positive, multi-system involvement",
"IgA nephropathy: normal complement, elevated IgA, no systemic features",
"ANCA vasculitis: pauci-immune on biopsy, ANCA positive",
],
"red_flags": [
"Hematuria + proteinuria in young woman with malar rash or photosensitivity",
"Nephrotic range proteinuria (>3.5 g/day) with systemic symptoms",
"Complement levels (C3, C4) persistently depressed — not just transiently",
"Positive ANA (>1:160), anti-dsDNA, anti-Smith",
"Thrombocytopenia or hemolytic anemia alongside renal disease",
],
"diagnostic_steps": [
"1. ASO titer + anti-DNase B — if high, favors PSGN; repeat complement in 6-8 weeks",
"2. ANA panel (ANA, anti-dsDNA, anti-Smith, anti-SSA/SSB, antiphospholipid)",
"3. C3, C4, CH50 — persistent low favors SLE",
"4. Urinalysis with microscopy — RBC casts = glomerulonephritis",
"5. 24-hour urine protein or urine protein:creatinine ratio",
"6. Renal biopsy — ISN/RPS class I-VI guides treatment",
],
"treatment_hint": "Class III/IV: hydroxychloroquine + MMF/cyclophosphamide + steroids. Class V: MMF. Target remission (proteinuria <0.5 g/day).",
"icd10": "M32.14",
"orpha": "ORPHA:536425",
},
"turner": {
"name": "Turner Syndrome",
"triad": ["short stature", "ovarian dysgenesis / primary amenorrhea", "cardiac malformation"],
"key_distinction": "Chromosomal (45,X or mosaic) — cardiac and renal anomalies must be screened even in mild phenotypes",
"misdiagnosis_traps": [
"Mosaic Turner (45,X/46,XX) has near-normal phenotype — missed if karyotype not performed",
"Short stature attributed to growth hormone deficiency without chromosomal workup",
"Bicuspid aortic valve/coarctation diagnosed without Turner consideration",
"Amenorrhea attributed to hypothalamic cause without karyotype",
],
"red_flags": [
"Short stature in a girl (height >2 SD below mean) with no clear cause",
"Webbed neck, low posterior hairline, wide-carrying angle (cubitus valgus)",
"Bicuspid aortic valve or coarctation of aorta in a female",
"Primary amenorrhea or premature ovarian insufficiency",
"Shield chest, widely spaced nipples, lymphedema in neonate",
],
"diagnostic_steps": [
"1. Karyotype (at least 30 cells to detect mosaicism)",
"2. Cardiac MRI/echo — bicuspid AV, coarctation, aortic root dilation",
"3. Renal ultrasound — horseshoe kidney, duplicated collecting system",
"4. Pelvic ultrasound — streak gonads",
"5. FSH, LH (elevated in ovarian failure), estradiol",
"6. Bone age X-ray",
"7. Hearing evaluation — sensorineural hearing loss common",
],
"treatment_hint": "Growth hormone from early childhood. Estrogen replacement at puberty (bone, cardiovascular, quality of life). Cardiac surveillance lifelong.",
"icd10": "Q96",
"orpha": "ORPHA:881",
},
"wernicke_korsakoff": {
"name": "Wernicke-Korsakoff Syndrome",
"triad": ["confusion / encephalopathy", "ophthalmoplegia (eye movement abnormalities)", "ataxia"],
"key_distinction": "Wernicke's encephalopathy (acute, reversible with thiamine) progresses to Korsakoff's (chronic amnestic syndrome with confabulation if untreated)",
"misdiagnosis_traps": [
"Classic triad present in only 16% of cases — do NOT wait for all three",
"Confusion attributed to alcohol intoxication/withdrawal, missing thiamine deficiency",
"Ophthalmoplegia subtle (nystagmus only) and attributed to intoxication",
"MRI normal in up to 50% of acute Wernicke's",
"Korsakoff's confabulation mistaken for psychosis or dementia",
],
"red_flags": [
"ANY two of: confusion, ophthalmoplegia, ataxia in an at-risk patient",
"Risk groups: alcohol use disorder, prolonged vomiting/starvation, bariatric surgery, malabsorption, refeeding without thiamine",
"Nystagmus (most common eye finding), lateral gaze palsy, or complete ophthalmoplegia",
"Confabulation: plausible but fabricated memories — pathognomonic of Korsakoff's",
"Peripheral neuropathy + encephalopathy in malnourished patient",
],
"diagnostic_steps": [
"1. GIVE THIAMINE BEFORE GLUCOSE — IV thiamine 500 mg TID × 3 days (NEVER give dextrose first)",
"2. Whole blood thiamine level (but do not delay treatment for result)",
"3. MRI brain: hyperintense lesions in periaqueductal gray, mammillary bodies, thalamus (DWI/FLAIR)",
"4. Blood glucose (hypoglycemia may coexist)",
"5. Comprehensive metabolic panel, B12, folate",
"6. Neuropsychological testing for memory deficits (Korsakoff's)",
],
"treatment_hint": "IV thiamine STAT. Oral thiamine unreliable in alcoholics (malabsorption). Continue thiamine supplementation. Address underlying cause.",
"icd10": "E51.2",
"orpha": "ORPHA:900",
},
}
# Pre-compute lowercased triads once to avoid repeating in every build_differential call.
_SYNDROME_TRIADS_LOWER = {
key: [t.lower() for t in s["triad"]] for key, s in SYNDROMES.items()
}
OCCUPATIONAL_EXPOSURES = {
"asbestos": {
"diseases": ["Mesothelioma", "Asbestosis", "Pleural plaques", "Pleural effusion", "Bronchogenic carcinoma (additive with smoking)"],
"latency": "10-40 years (mesothelioma up to 50 years)",
"at_risk_occupations": ["Shipbuilding / ship repair", "Insulation installation", "Construction (pre-1980 buildings)", "Brake lining repair", "Boilermaking", "Mining (crocidolite / amosite)"],
"key_findings": [
"Pleural plaques on CT (calcified, bilateral, diaphragmatic) — pathognomonic of asbestos exposure",
"Mesothelioma: pleural thickening + effusion + restricted lung; mesothelial cells on cytology",
"Asbestosis: bilateral basal fibrosis, honeycombing on HRCT; ferruginous bodies on BAL",
],
"diagnostic_note": "No safe level of asbestos. All-fiber types cause mesothelioma. Amphiboles (crocidolite, amosite) > chrysotile risk.",
"workup": ["HRCT chest", "PFTs (restrictive pattern)", "Bronchoscopy + BAL", "Pleural biopsy (CT/thoracoscopy-guided)", "Calretinin, WT1, D2-40 IHC for mesothelioma"],
},
"silica": {
"diseases": ["Silicosis (simple, accelerated, acute)", "Progressive massive fibrosis (PMF)", "COPD", "Lung cancer (IARC Group 1)", "Autoimmune diseases (SLE, RA, scleroderma)", "Chronic kidney disease"],
"latency": "Simple: >10 years. Accelerated: 5-10 years. Acute: <5 years (high dose).",
"at_risk_occupations": ["Mining / tunneling", "Sandblasting", "Quarrying", "Foundry work", "Ceramics / pottery", "Denim sandblasting (epidemic in Turkey)", "Artificial stone (engineered quartz) countertop fabrication"],
"key_findings": [
"Bilateral upper lobe nodules (1-10 mm) on CXR/CT",
"Eggshell calcification of hilar/mediastinal lymph nodes — classic",
"PMF: conglomerate upper lobe masses >1 cm",
"Acute silicosis: alveolar proteinosis pattern (crazy paving on HRCT)",
],
"diagnostic_note": "Occupational history is the key — silicosis is radiographic diagnosis. Rule out TB (silico-TB complication). Accelerated silicosis epidemic from engineered stone.",
"workup": ["HRCT chest", "PFTs", "ANA, ANCA (autoimmune screen)", "TB screening (IGRA / TST)", "Urinalysis + creatinine"],
},
"coal": {
"diseases": ["Coal workers' pneumoconiosis (CWP) / black lung", "Progressive massive fibrosis", "COPD", "Caplan syndrome (RA + large pulmonary nodules)"],
"latency": "Simple CWP: 10+ years. PMF: earlier with higher dust levels.",
"at_risk_occupations": ["Underground coal mining", "Surface coal mining", "Coal processing / washing", "Coal-fired power plant workers"],
"key_findings": [
"Small rounded opacities on CXR (ILO classification p, q, r type)",
"PMF: bilateral upper lobe masses, may cavitate",
"Caplan nodules: well-defined 1-5 cm nodules in setting of RA",
"Black lung resurgence (newer mining exposures to silica-rich seams)",
],
"diagnostic_note": "ILO chest X-ray classification used for grading. Differentiate from TB (coalminers at increased TB risk). MSHA-certified B-reader for X-ray interpretation.",
"workup": ["ILO-classified CXR", "HRCT chest", "PFTs (spirometry)", "RA factor, anti-CCP (Caplan's)", "TB screening"],
},
"metal_smelting": {
"diseases": ["Heavy metal poisoning (lead, arsenic, mercury, cadmium, manganese)", "Metal fume fever (zinc, copper fumes)", "Hard metal disease (cobalt)", "Nickel-induced lung cancer / nasal cancer", "Chromium-induced lung cancer / nasal ulcers"],
"latency": "Metal fume fever: hours to days. Chronic poisoning: months to years.",
"at_risk_occupations": ["Smelting / foundry workers", "Battery manufacturing (lead)", "Electronic waste recycling", "Welders", "Pesticide manufacturers (arsenic)", "Chloralkali plant workers (mercury)", "Hard metal (WC-Co) tooling"],
"key_findings": {
"lead": "Anemia + basophilic stippling, peripheral neuropathy, Burton's lines (gingival), encephalopathy; blood Pb >5 µg/dL",
"arsenic": "Peripheral neuropathy + hyperkeratosis + Mees' lines (transverse white bands on nails) + rain-drop skin pigmentation",
"mercury": "Erethism (excessive shyness, memory loss, irritability) + tremor + gingivitis ('mad hatter')",
"cadmium": "Renal tubular dysfunction (proximal) + osteomalacia (Itai-itai disease) + proteinuria",
"manganese": "Manganism: Parkinsonism-like syndrome with cock-walk gait, psychiatric symptoms; basal ganglia T1 hyperintensity on MRI",
"cobalt": "Hard metal lung disease: giant cell interstitial pneumonitis on biopsy",
},
"diagnostic_note": "Collect 24-hour urine for heavy metals (not just serum). Chelation therapy depends on specific metal and severity.",
"workup": ["Blood lead, mercury, arsenic levels", "24-hour urine arsenic, mercury, cadmium", "CBC with differential (lead: basophilic stippling)", "Nerve conduction studies", "Renal function / urinalysis", "Brain MRI (manganese)", "Chest HRCT (cobalt)"],
},
}
RED_FLAGS = {
"splenomegaly": {
"symptom": "Splenomegaly",
"differentials": [
{
"diagnosis": "Felty's Syndrome",
"additional_features": ["seropositive RA", "neutropenia", "recurrent infections"],
"key_test": "CBC + RF + anti-CCP",
"pitfall": "Confused with infection or lymphoma",
},
{
"diagnosis": "Portal hypertension (cirrhosis)",
"additional_features": ["variceal bleeding", "ascites", "jaundice", "spider angiomata"],
"key_test": "LFTs, platelet count, hepatic ultrasound with Doppler",
"pitfall": "Hypersplenism causes cytopenias — may mimic hematologic disease",
},
{
"diagnosis": "Lymphoma / CLL",
"additional_features": ["lymphadenopathy", "B symptoms (fever, night sweats, weight loss)", "fatigue"],
"key_test": "CBC + flow cytometry + CT staging + biopsy",
"pitfall": "B symptoms overlap with infection",
},
{
"diagnosis": "Visceral leishmaniasis (kala-azar)",
"additional_features": ["massive splenomegaly", "fever", "weight loss", "travel to endemic area", "pancytopenia"],
"key_test": "Leishmania serology / rK39 antigen / bone marrow biopsy",
"pitfall": "Missed without travel history",
},
{
"diagnosis": "Storage diseases (Gaucher, Niemann-Pick)",
"additional_features": ["hepatomegaly", "bone pain", "cytopenias", "childhood onset"],
"key_test": "Glucocerebrosidase enzyme assay (Gaucher), GBA sequencing",
"pitfall": "Adult Gaucher often missed; bone crisis confused with osteomyelitis",
},
],
"urgent_workup": ["CBC with differential", "Peripheral blood smear", "LFTs", "LDH + uric acid", "Abdominal ultrasound", "Epstein-Barr virus / CMV serology"],
},
"neutropenia": {
"symptom": "Neutropenia (ANC < 1.5 × 10⁹/L)",
"differentials": [
{
"diagnosis": "Drug-induced neutropenia",
"additional_features": ["recent medication start (clozapine, carbimazole, trimethoprim, methotrexate, chemotherapy)"],
"key_test": "Medication review; stop offending drug",
"pitfall": "Drug timeline not reviewed systematically",
},
{
"diagnosis": "Felty's Syndrome",
"additional_features": ["seropositive RA", "splenomegaly"],
"key_test": "RF, anti-CCP, abdominal exam",
"pitfall": "Attributed to infection rather than autoimmune cause",
},
{
"diagnosis": "Autoimmune neutropenia",
"additional_features": ["isolated neutropenia", "otherwise well", "childhood more common"],
"key_test": "ANA, anti-neutrophil antibodies",
"pitfall": "Often benign and self-limited in children",
},
{
"diagnosis": "Large granular lymphocyte (LGL) leukemia",
"additional_features": ["cytopenias", "splenomegaly", "recurrent infections", "RA association"],
"key_test": "Peripheral blood flow cytometry (CD8+/CD57+ clonal T cells), TCR gene rearrangement",
"pitfall": "Overlaps with Felty syndrome; LGL leukemia may coexist",
},
],
"urgent_workup": ["CBC with differential + peripheral smear", "Drug review", "ANA, RF, anti-CCP", "Vitamin B12, folate, copper", "Flow cytometry if persistent", "Bone marrow biopsy if ANC <0.5"],
},
"ophthalmoplegia": {
"symptom": "Ophthalmoplegia / Eye movement abnormality",
"differentials": [
{
"diagnosis": "Wernicke's Encephalopathy",
"additional_features": ["confusion", "ataxia", "malnutrition / alcohol use disorder", "nystagmus"],
"key_test": "GIVE THIAMINE FIRST — then MRI brain, blood thiamine level",
"pitfall": "Attributed to alcohol intoxication; dextrose given before thiamine",
},
{
"diagnosis": "Miller Fisher Syndrome (GBS variant)",
"additional_features": ["ophthalmoplegia", "ataxia", "areflexia — triad", "recent infection"],
"key_test": "Anti-GQ1b antibodies (positive in >90%), CSF albumino-cytologic dissociation",
"pitfall": "Mistaken for Wernicke's — key: anti-GQ1b and areflexia distinguish",
},
{
"diagnosis": "Myasthenia Gravis",
"additional_features": ["ptosis", "diplopia worse with fatigue", "bulbar symptoms", "proximal limb weakness"],
"key_test": "Anti-AChR, anti-MuSK antibodies; repetitive nerve stimulation",
"pitfall": "Fatigable ophthalmoplegia missed; ice pack test positive",
},
{
"diagnosis": "Internuclear Ophthalmoplegia (INO)",
"additional_features": ["adduction deficit", "contralateral nystagmus", "diplopia", "MS or brainstem lesion"],
"key_test": "MRI brain (MLF lesion), VEP",
"pitfall": "INO in young adult — consider multiple sclerosis",
},
],
"urgent_workup": ["Thiamine 500 mg IV (before glucose)", "MRI brain + posterior fossa", "Anti-GQ1b antibodies", "AChR antibodies", "Edrophonium test (myasthenia)", "CSF analysis"],
},
"confabulation": {
"symptom": "Confabulation (fabricated plausible memories)",
"differentials": [
{
"diagnosis": "Korsakoff's Syndrome",
"additional_features": ["severe anterograde amnesia", "intact procedural memory", "history of Wernicke's episode", "alcohol use disorder / malnutrition"],
"key_test": "Detailed neuropsychological testing, MRI (mammillary body atrophy), thiamine history",
"pitfall": "Mistaken for dementia or psychosis; confabulation not explicitly elicited",
},
{
"diagnosis": "Frontotemporal Dementia",
"additional_features": ["behavioral disinhibition", "executive dysfunction", "early onset (<65)", "language problems"],
"key_test": "MRI (frontal/temporal atrophy), neuropsychological battery, FDG-PET",
"pitfall": "Korsakoff's distinguished by specific amnestic profile + thiamine history",
},
],
"urgent_workup": ["Thiamine level", "MRI brain with hippocampal + mammillary body volumetry", "Neuropsychological testing (RBMT, WMS)", "B12, folate, TSH", "RPR/VDRL (neurosyphilis)"],
},
"erythema_nodosum": {
"symptom": "Erythema Nodosum (tender red nodules, shins)",
"differentials": [
{
"diagnosis": "Sarcoidosis (Löfgren syndrome)",
"additional_features": ["bilateral hilar lymphadenopathy", "arthritis", "fever", "excellent prognosis"],
"key_test": "CXR / CT chest, ACE level, BAL",
"pitfall": "Löfgren syndrome treated conservatively — biopsy usually NOT needed",
},
{
"diagnosis": "Coccidioidomycosis",
"additional_features": ["travel to SW USA / Mexico", "respiratory symptoms", "eosinophilia"],
"key_test": "Coccidioides serology (IgM/IgG), urine antigen",
"pitfall": "Mistaken for sarcoidosis without travel history",
},
{
"diagnosis": "Inflammatory bowel disease",
"additional_features": ["diarrhea", "rectal bleeding", "abdominal pain", "weight loss"],
"key_test": "Colonoscopy with biopsies, calprotectin, CRP",
"pitfall": "Skin manifestation precedes gut symptoms in some IBD patients",
},
{
"diagnosis": "Streptococcal infection",
"additional_features": ["recent pharyngitis", "high ASO titer"],
"key_test": "Throat culture, ASO titer, anti-DNase B",
"pitfall": "Most common cause in children — always check ASO",
},
],
"urgent_workup": ["CXR", "ASO titer", "Coccidioides serology (if travel history)", "ACE level", "ANA", "Stool culture / calprotectin", "Tuberculin skin test / IGRA"],
},
"short_stature": {
"symptom": "Short Stature in Females (>2 SD below mean)",
"differentials": [
{
"diagnosis": "Turner Syndrome",
"additional_features": ["ovarian failure", "cardiac anomalies", "webbed neck", "cubitus valgus", "learning differences"],
"key_test": "Karyotype (minimum 30 cells), FSH/LH/estradiol, cardiac echo",
"pitfall": "Mosaic Turner underdiagnosed; karyotype not ordered for 'short but otherwise normal' girls",
},
{
"diagnosis": "Growth Hormone Deficiency",
"additional_features": ["delayed bone age", "decreased IGF-1", "normal body proportions"],
"key_test": "IGF-1, IGFBP-3, GH stimulation test, MRI pituitary",
"pitfall": "Turner excluded if chromosomes not checked",
},
{
"diagnosis": "Hypothyroidism",
"additional_features": ["fatigue", "constipation", "delayed bone age", "elevated TSH"],
"key_test": "TSH, free T4",
"pitfall": "Acquired hypothyroidism in girls — easily treatable cause of growth failure",
},
{
"diagnosis": "Celiac Disease",
"additional_features": ["failure to thrive", "diarrhea", "anemia", "delayed puberty"],
"key_test": "Anti-tTG IgA, total IgA, duodenal biopsy",
"pitfall": "Silent celiac (no GI symptoms) presents with short stature only",
},
],
"urgent_workup": ["Karyotype (females)", "Bone age X-ray", "TSH + free T4", "IGF-1, IGFBP-3", "CBC, CMP", "Anti-tTG IgA + total IgA", "FSH, LH, estradiol"],
},
"hematuria_proteinuria": {
"symptom": "Hematuria + Proteinuria (nephritic/nephrotic syndrome)",
"differentials": [
{
"diagnosis": "SLE Nephritis",
"additional_features": ["young woman", "malar rash", "photosensitivity", "arthritis", "persistent low C3/C4"],
"key_test": "ANA, anti-dsDNA, complement (C3/C4), renal biopsy",
"pitfall": "Mistaken for PSGN; ASO titers and persistent complement depression distinguish",
},
{
"diagnosis": "Post-streptococcal GN (PSGN)",
"additional_features": ["2-3 weeks after strep throat / skin infection", "periorbital edema", "hypertension", "HIGH ASO titers", "TRANSIENT low C3"],
"key_test": "ASO titer, anti-DNase B, C3 (normalizes in 6-8 weeks)",
"pitfall": "Persistent low complement or positive ANA → SLE, not PSGN",
},
{
"diagnosis": "IgA Nephropathy",
"additional_features": ["synpharyngitic hematuria (during illness, not 2-3 weeks after)", "normal complement", "male predominance"],
"key_test": "Serum IgA, renal biopsy (mesangial IgA deposits on IF)",
"pitfall": "Timing of hematuria relative to infection is key (concurrent vs. delayed)",
},
{
"diagnosis": "ANCA Vasculitis (GPA/MPA)",
"additional_features": ["rapidly progressive GN", "pulmonary hemorrhage", "sinusitis", "weight loss"],
"key_test": "c-ANCA/p-ANCA (PR3/MPO), renal biopsy (pauci-immune)",
"pitfall": "Rapidly progressive — act urgently; delay causes permanent renal loss",
},
],
"urgent_workup": ["Urinalysis with microscopy (RBC casts)", "24-h urine protein or Pr:Cr ratio", "ANA, anti-dsDNA, C3, C4", "ASO titer, anti-DNase B", "ANCA (PR3/MPO)", "Renal biopsy if progressive"],
},
}
def _header(title: str) -> list[str]:
bar = "=" * 60
return [f"\n{bar}", f" {title}", bar]
def _fuzzy_find(query: str, mapping: dict, name_field: str) -> tuple[str, dict] | tuple[None, None]:
"""Return (key, entry) for the first entry whose key or name_field contains query."""
q = query.lower()
for key, entry in mapping.items():
if q in key or q in entry[name_field].lower():
return key, entry
return None, None
def _require_arg(value: str | None, flag: str, query_type: str) -> None:
if not value:
print(f"Error: {flag} required for --type {query_type}", file=sys.stderr)
sys.exit(1)
def build_differential(symptoms_str: str) -> dict:
symptoms = [s.strip().lower() for s in symptoms_str.split(",")]
matches = []
for key, syndrome in SYNDROMES.items():
triad_lower = _SYNDROME_TRIADS_LOWER[key]
matched = [s for s in symptoms if any(s in t or t in s for t in triad_lower)]
if matched:
matches.append({
"syndrome": syndrome["name"],
"matched_features": matched,
"match_count": len(matched),
"triad": syndrome["triad"],
"key_distinction": syndrome["key_distinction"],
"top_diagnostic_step": syndrome["diagnostic_steps"][0] if syndrome["diagnostic_steps"] else "",
"icd10": syndrome.get("icd10"),
"orpha": syndrome.get("orpha"),
})
matches.sort(key=lambda x: x["match_count"], reverse=True)
return {
"input_symptoms": symptoms,
"matched_syndromes": matches,
"note": "Differential built from syndrome triad matching. Use --type red_flag for symptom-specific differentials.",
}
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Clinical diagnosis reference for rare-disease-diagnosis skill.",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog=__doc__,
)
parser.add_argument(
"--type",
required=True,
choices=["syndrome", "differential", "red_flag", "occupational", "list"],
help=(
"Query type: "
"'syndrome' (look up a named syndrome), "
"'differential' (build diff from symptom list), "
"'red_flag' (red-flag analysis for a single symptom), "
"'occupational' (occupational exposure patterns), "
"'list' (list all available items)"
),
)
parser.add_argument("--name", help="Syndrome name (for --type syndrome), partial match supported")
parser.add_argument(
"--symptoms",
help="Comma-separated symptoms for --type differential (e.g. 'RA,splenomegaly,neutropenia')",
)
parser.add_argument("--symptom", help="Single symptom for --type red_flag")
parser.add_argument("--exposure", help="Occupational exposure agent for --type occupational")
parser.add_argument(
"--format",
choices=["text", "json"],
default="text",
help="Output format (default: text)",
)
return parser.parse_args()
def format_syndrome(s: dict) -> str:
lines = _header(s["name"]) + [
f"\nTRIAD: {' + '.join(s['triad'])}",
f"\nKEY DISTINCTION:\n {s['key_distinction']}",
"\nMISDIAGNOSIS TRAPS:",
]
for trap in s["misdiagnosis_traps"]:
lines.append(f" ! {trap}")
lines.append("\nRED FLAGS:")
for flag in s["red_flags"]:
lines.append(f" >> {flag}")
lines.append("\nDIAGNOSTIC STEPS:")
for step in s["diagnostic_steps"]:
lines.append(f" {step}")
lines += [
f"\nTREATMENT HINT:\n {s['treatment_hint']}",
f"\nICD-10: {s.get('icd10', 'N/A')} | ORPHA: {s.get('orpha', 'N/A')}",
"",
]
return "\n".join(lines)
def format_occupational(key: str, data: dict) -> str:
lines = _header(f"Occupational Exposure: {key.upper()}") + [
f"\nDISEASES: {', '.join(data['diseases'])}",
f"\nLATENCY: {data['latency']}",
"\nAT-RISK OCCUPATIONS:",
]
for occ in data["at_risk_occupations"]:
lines.append(f" - {occ}")
lines.append("\nKEY CLINICAL FINDINGS:")
findings = data["key_findings"]
if isinstance(findings, list):
for f in findings:
lines.append(f" - {f}")
else:
for metal, finding in findings.items():
lines.append(f" [{metal.upper()}] {finding}")
lines += [
f"\nDIAGNOSTIC NOTE:\n {data['diagnostic_note']}",
"\nWORKUP:",
]
for w in data["workup"]:
lines.append(f" - {w}")
return "\n".join(lines)
def format_red_flag(data: dict) -> str:
lines = _header(f"Red-Flag Analysis: {data['symptom']}") + ["\nDIFFERENTIAL DIAGNOSIS:"]
for i, d in enumerate(data["differentials"], 1):
lines.append(f"\n {i}. {d['diagnosis']}")
lines.append(f" Additional features: {', '.join(d['additional_features'])}")
lines.append(f" Key test: {d['key_test']}")
lines.append(f" Pitfall: {d['pitfall']}")
lines.append("\nURGENT WORKUP:")
for w in data["urgent_workup"]:
lines.append(f" - {w}")
return "\n".join(lines)
def format_differential(result: dict) -> str:
lines = _header(f"Differential for: {', '.join(result['input_symptoms'])}")
if not result["matched_syndromes"]:
lines.append("\n No syndrome triad matches found. Try --type red_flag for individual symptoms.")
for m in result["matched_syndromes"]:
lines.append(f"\n [{m['match_count']} match(es)] {m['syndrome']}")
lines.append(f" Triad: {' + '.join(m['triad'])}")
lines.append(f" Matched on: {', '.join(m['matched_features'])}")
lines.append(f" Key distinction: {m['key_distinction']}")
lines.append(f" First step: {m['top_diagnostic_step']}")
if m.get("orpha"):
lines.append(f" ORPHA: {m['orpha']} ICD-10: {m.get('icd10', 'N/A')}")
lines.append(f"\n Note: {result['note']}")
return "\n".join(lines)
def list_all() -> str:
lines = ["\n=== SYNDROMES ==="]
for key, s in SYNDROMES.items():
lines.append(f" {key:25s} → {s['name']}: {' + '.join(s['triad'])}")
lines.append("\n=== OCCUPATIONAL EXPOSURES ===")
for key, data in OCCUPATIONAL_EXPOSURES.items():
lines.append(f" {key:25s} → {', '.join(data['diseases'][:2])} ...")
lines.append("\n=== RED-FLAG SYMPTOMS ===")
for key, data in RED_FLAGS.items():
lines.append(f" {key:25s} → {data['symptom']}")
return "\n".join(lines)
def main() -> None:
args = parse_args()
if args.type == "list":
result_text = list_all()
result_data = {
"syndromes": list(SYNDROMES.keys()),
"occupational": list(OCCUPATIONAL_EXPOSURES.keys()),
"red_flags": list(RED_FLAGS.keys()),
}
elif args.type == "syndrome":
_require_arg(args.name, "--name", "syndrome")
_, syndrome = _fuzzy_find(args.name, SYNDROMES, "name")
if syndrome is None:
print(f"Error: No syndrome found matching '{args.name}'. Try --type list.", file=sys.stderr)
sys.exit(1)
result_text = format_syndrome(syndrome)
result_data = syndrome
elif args.type == "differential":
_require_arg(args.symptoms, "--symptoms", "differential")
result_data = build_differential(args.symptoms)
result_text = format_differential(result_data)
elif args.type == "red_flag":
_require_arg(args.symptom, "--symptom", "red_flag")
symptom_norm = args.symptom.lower().replace(" ", "_")
_, data = _fuzzy_find(symptom_norm, RED_FLAGS, "symptom")
if data is None:
print(f"Error: No red-flag entry found for '{args.symptom}'. Try --type list.", file=sys.stderr)
sys.exit(1)
result_text = format_red_flag(data)
result_data = data
else: # occupational
_require_arg(args.exposure, "--exposure", "occupational")
exp_lower = args.exposure.lower()
exp_key, exp_data = _fuzzy_find(exp_lower, OCCUPATIONAL_EXPOSURES, "diseases")
# _fuzzy_find matches on diseases[0] via name_field — but diseases is a list, not a string.
# Fall back to key-only match if name_field lookup doesn't apply cleanly.
if exp_data is None:
for key, data in OCCUPATIONAL_EXPOSURES.items():
if exp_lower in key or exp_lower in " ".join(data["diseases"]).lower():
exp_key, exp_data = key, data
break
if exp_data is None:
print(f"Error: No exposure entry found for '{args.exposure}'. Try --type list.", file=sys.stderr)
sys.exit(1)
result_text = format_occupational(exp_key, exp_data)
result_data = exp_data
if args.format == "json":
print(json.dumps(result_data, indent=2, default=str))
else:
print(result_text)
if __name__ == "__main__":
main()
Rare Disease Diagnosis - Tool Reference
Phase 1: Phenotype Standardization
HPO Tools
| Tool | Purpose | Key Parameters |
|---|---|---|
HPO_search_terms | Search HPO by text | query |
HPO_get_term | Get HPO term details | hp_id |
HPO_get_genes_by_phenotype | Genes associated with HPO term | hp_id |
HPO_get_diseases_by_phenotype | Diseases with HPO term | hp_id |
Example - Convert symptom to HPO:
# Search for HPO term
results = tu.tools.HPO_search_terms(query="tall stature")
# Returns: [{"id": "HP:0000098", "name": "Tall stature", ...}]---
Phase 2: Disease Matching
Orphanet Tools (UPDATED)
| Tool | Purpose | Key Parameters |
|---|---|---|
Orphanet_search_diseases | Search rare diseases | operation="search_diseases", query |
Orphanet_get_disease | Get disease details | operation="get_disease", orpha_code |
Orphanet_get_genes | Genes for disease | operation="get_genes", orpha_code |
Orphanet_get_classification | Disease hierarchy | operation="get_classification", orpha_code |
Orphanet_search_by_name | Exact name search | operation="search_by_name", name, exact |
Example - Search Orphanet (NEW):
# Search for rare diseases
results = tu.tools.Orphanet_search_diseases(
operation="search_diseases",
query="Marfan"
)
# Returns: List of matching rare diseases with ORPHA codes
# Get genes for a disease
genes = tu.tools.Orphanet_get_genes(
operation="get_genes",
orpha_code="558"
)
# Returns: FBN1 (causative), associated genesCommon Orphanet Disease Codes:
| Disease | ORPHA Code |
|---|---|
| Marfan syndrome | 558 |
| Loeys-Dietz syndrome | 60030 |
| Vascular EDS | 286 |
| Alexander disease | 58 |
| Prader-Willi syndrome | 739 |
OMIM Tools (UPDATED)
⚠️ Requires: OMIM_API_KEY environment variable (register at omim.org/api)
| Tool | Purpose | Key Parameters |
|---|---|---|
OMIM_search | Search OMIM | operation="search", query, limit |
OMIM_get_entry | Get MIM entry | operation="get_entry", mim_number |
OMIM_get_clinical_synopsis | Clinical features by organ | operation="get_clinical_synopsis", mim_number |
OMIM_get_gene_map | Gene-disease mappings | operation="get_gene_map", mim_number or chromosome |
Example - Get OMIM details (NEW):
# Search OMIM
search = tu.tools.OMIM_search(
operation="search",
query="BRCA1",
limit=5
)
# Returns: List of MIM numbers
# Get detailed entry
entry = tu.tools.OMIM_get_entry(
operation="get_entry",
mim_number="154700" # Marfan syndrome
)
# Returns: Full text, inheritance, molecular genetics
# Get clinical synopsis (structured phenotype)
synopsis = tu.tools.OMIM_get_clinical_synopsis(
operation="get_clinical_synopsis",
mim_number="154700"
)
# Returns: Features by organ system (neurologicCentralNervousSystem, cardiovascular, etc.)DisGeNET Tools (NEW)
⚠️ Requires: DISGENET_API_KEY environment variable (register free at disgenet.org)
| Tool | Purpose | Key Parameters |
|---|---|---|
DisGeNET_search_gene | Diseases for a gene | operation="search_gene", gene, limit |
DisGeNET_search_disease | Genes for a disease | operation="search_disease", disease, limit |
DisGeNET_get_gda | Gene-disease associations | operation="get_gda", gene/disease, source, min_score |
DisGeNET_get_vda | Variant-disease associations | operation="get_vda", variant/gene, limit |
DisGeNET_get_disease_genes | All genes for disease | operation="get_disease_genes", disease, min_score |
Example - DisGeNET gene-disease associations:
# Get diseases associated with gene
result = tu.tools.DisGeNET_search_gene(
operation="search_gene",
gene="FBN1",
limit=20
)
# Returns: Marfan syndrome (score: 0.95), MASS phenotype, etc.
# Get high-confidence curated associations
gda = tu.tools.DisGeNET_get_gda(
operation="get_gda",
gene="FBN1",
source="CURATED",
min_score=0.3,
limit=20
)
# Returns: Gene-disease associations with evidence scores
# Get variant-disease associations for diagnosis
vda = tu.tools.DisGeNET_get_vda(
operation="get_vda",
gene="FBN1",
limit=30
)
# Returns: Variants with disease associationsDisGeNET Score Interpretation:
| Score | Interpretation | Use |
|---|---|---|
| >0.7 | Very Strong | High confidence |
| 0.4-0.7 | Strong | Good evidence |
| 0.2-0.4 | Moderate | Consider |
| <0.2 | Weak | Low confidence |
ClinGen - Gene-Disease Validity (NEW)
Authoritative curation of gene-disease relationships.
| Tool | Purpose | Key Parameters |
|---|---|---|
ClinGen_search_gene_validity | Gene-disease validity | gene |
ClinGen_search_dosage_sensitivity | HI/TS scores | gene |
ClinGen_search_actionability | Clinical actionability | gene |
ClinGen_get_variant_classifications | Expert variant classifications | gene, variant |
# Check gene-disease validity classification
validity = tu.tools.ClinGen_search_gene_validity(gene="FBN1")
# Returns: Definitive for Marfan syndrome, Strong for MASS phenotype
# Check dosage sensitivity (for CNV interpretation)
dosage = tu.tools.ClinGen_search_dosage_sensitivity(gene="MECP2")
# Returns: HI Score 3 (haploinsufficient), TS Score 0
# Check clinical actionability
actionability = tu.tools.ClinGen_search_actionability(gene="BRCA1")
# Returns: Adult and pediatric actionability dataClinGen Validity Classification (for gene panel prioritization):
| Classification | Include in Panel? | ACMG Impact |
|---|---|---|
| Definitive | Yes - mandatory | Strong PP4 support |
| Strong | Yes | Good PP4 support |
| Moderate | Yes | Moderate PP4 support |
| Limited | Yes, but flag | Weak support |
| Disputed | Exclude | Conflicting evidence |
| Refuted | EXCLUDE | Gene not causative |
Dosage Sensitivity Scores (for CNV interpretation):
| Score | Meaning | ACMG Impact |
|---|---|---|
| 3 | Sufficient evidence | PVS1 for LOF deletions |
| 2 | Emerging evidence | PM1 |
| 1 | Little evidence | Weak support |
| 0/40 | None/Unlikely | No dosage sensitivity |
OpenTargets Disease Tools
| Tool | Purpose | Key Parameters |
|---|---|---|
OpenTargets_get_disease_description_by_efoId | Disease details | efoId |
OpenTargets_get_associated_targets_by_disease_efoId | Genes for disease | efoId |
OpenTargets_get_diseases_phenotypes_by_target_ensembl | Diseases for gene | ensemblId |
---
Phase 3: Gene Panel
Gene Information
| Tool | Purpose | Key Parameters |
|---|---|---|
MyGene_query_genes | Search genes | q, species |
MyGene_get_gene_annotation | Gene details | geneid |
ensembl_lookup_gene | Ensembl gene info | id, species |
Parameter Note: Use q not gene for MyGene_query_genes.
Expression Validation
| Tool | Purpose | Key Parameters |
|---|---|---|
GTEx_get_median_gene_expression | Tissue expression | gencode_id |
HPA_get_rna_expression_by_source | Protein expression | ensembl_id |
Note: GTEx requires versioned Ensembl ID (e.g., ENSG00000166147.15)
Constraint Scores
| Tool | Purpose | Key Parameters |
|---|---|---|
gnomad_get_gene_constraints | pLI, LOEUF scores | gene_symbol |
gnomad_get_gene_constraints | Constraint data | gene |
---
Phase 4: Variant Interpretation
ClinVar Tools
| Tool | Purpose | Key Parameters |
|---|---|---|
ClinVar_search_variants | Search variants | query |
ClinVar_get_variant_details | Get variant details | id (not variant_id) |
ClinVar_get_clinical_significance | Classification history | id |
Parameter Note: Use id not variant_id for ClinVar lookups.
Population Frequency
| Tool | Purpose | Key Parameters |
|---|---|---|
gnomad_get_variant | Allele frequencies | variant_id |
gnomad_get_variant | Variant annotations | variant_id |
Variant ID Format: 1-55505647-G-A (chrom-pos-ref-alt)
Pathogenicity Prediction (ENHANCED)
| Tool | Purpose | Key Parameters |
|---|---|---|
CADD_get_variant_score | CADD deleteriousness (NEW API) | chrom, pos, ref, alt, version |
AlphaMissense_get_variant_score | DeepMind pathogenicity (NEW) | uniprot_id, variant |
ESM_explain_variant_mechanism | ESMC-6B SAE mechanism of effect (NEW) | sequence, position, ref_aa, alt_aa |
EVE_get_variant_score | Evolutionary pathogenicity (NEW) | chrom, pos, ref, alt OR variant (HGVS) |
SpliceAI_predict_splice | Splice impact (NEW) | variant, genome |
SpliceAI_get_max_delta | Quick splice triage (NEW) | variant, genome |
SpliceAI_predict_pangolin | Alternative splice model | variant, genome |
CADD API (NEW)
Direct access to CADD deleteriousness scores:
# Get CADD score for variant
result = tu.tools.CADD_get_variant_score(
chrom="15",
pos=48942946,
ref="G",
alt="A",
version="GRCh38-v1.7"
)
# Returns: phred_score, raw_score, interpretation
# PHRED ≥20 = top 1% deleterious (PP3 support)AlphaMissense (NEW)
DeepMind's state-of-the-art missense pathogenicity prediction (~90% accuracy):
# Get pathogenicity score for missense variant
result = tu.tools.AlphaMissense_get_variant_score(
uniprot_id="P35555", # FBN1
variant="E1541K" # or "p.E1541K"
)
# Returns: pathogenicity_score, classification (pathogenic/ambiguous/benign)
# Thresholds: >0.564 pathogenic, <0.34 benignESMC-6B SAE — Mechanism of Effect (NEW)
AlphaMissense gives a pathogenicity score but no mechanism. ESMC-6B Sparse Autoencoder features identify which interpretable protein-language-model features the mutation disrupts (catalytic, ligand-binding, PTM, domain, transmembrane, etc.). Use as a mechanism complement when the report needs to explain how a variant is pathogenic, not just whether.
# One-call mechanism for a VUS (requires WT protein sequence)
result = tu.tools.ESM_explain_variant_mechanism(
sequence=wt_protein_sequence,
position=1541, ref_aa="E", alt_aa="K",
top_k_features=5,
)
# result["data"]["mechanism_summary"] e.g.:
# "Disrupted feature categories (lost): ligand-binding=2, domain=1"Other SAE tools (advanced):
ESM_score_variant_sae_disruption— single variant, raw feature deltas, no labels (faster, no describe-feature calls)ESM_score_variant_sae_batch— many variants at once (N+1 Forge calls instead of 2N); use for saturation mutagenesisESM_get_region_sae_features— aggregate features over a residue range (e.g. characterize a domain or motif)ESM_describe_sae_feature— biological category label for a feature_id (cached per id)
Mapping SAE categories → ACMG support:
| SAE category lost | Mechanistic claim | ACMG line |
|---|---|---|
catalytic | Active-site disruption | Mechanistic support for PP3 |
ligand-binding / ptm / domain | Functional site disruption | Supports PP3 |
structural-stability / secondary-structure | Fold-destabilizing | Supports PP3 |
transmembrane / signal-peptide | Targeting / membrane integration | Supports PP3 |
| (no interpretable change) | No mechanistic signal | Do not strengthen PP3 above the predictor score alone |
Requires: ESM_API_KEY env var (free non-commercial token at https://forge.evolutionaryscale.ai) and pip install 'esm @ git+https://github.com/evolutionaryscale/esm@ee891c52' (SAE support on unmerged feature branch; PyPI esm 3.2.x lacks SAEConfig). Outputs governed by EvolutionaryScale Cambrian Inference License — non-commercial use only.
EVE (NEW)
Evolutionary variant effect prediction (Harvard/Oxford):
# Get EVE score
result = tu.tools.EVE_get_variant_score(
chrom="15",
pos=48942946,
ref="G",
alt="A"
)
# Returns: eve_score, classification (likely_pathogenic/likely_benign)
# Threshold: >0.5 likely pathogenicSpliceAI - Splice Variant Prediction (NEW)
Deep learning model for predicting splice-altering effects. ~15% of pathogenic variants affect splicing.
# Full splice prediction
result = tu.tools.SpliceAI_predict_splice(
variant="chr15-48942946-G-A",
genome="38" # or "37"
)
# Returns: DS_AG, DS_AL, DS_DG, DS_DL scores + max_delta_score + interpretation
# Quick triage (max score only)
quick = tu.tools.SpliceAI_get_max_delta(
variant="chr15-48942946-G-A",
genome="38"
)
# Returns: max_delta_score, interpretation, pathogenicity_thresholdVariant Format: chr{chrom}-{pos}-{ref}-{alt}
SpliceAI Delta Score Interpretation:
| Score Type | Meaning |
|---|---|
| DS_AG | Acceptor Gain (creates new) |
| DS_AL | Acceptor Loss (disrupts existing) |
| DS_DG | Donor Gain (creates new) |
| DS_DL | Donor Loss (disrupts existing) |
Max Score Thresholds for ACMG:
| Max Delta Score | Interpretation | ACMG |
|---|---|---|
| ≥0.8 | High splice impact | PP3 (strong) |
| 0.5-0.8 | Moderate impact | PP3 (supporting) |
| 0.2-0.5 | Low impact | PP3 (weak) |
| <0.2 | Likely no impact | BP7 (if synonymous) |
When to Use SpliceAI:
- Intronic variants within ±50bp of splice sites
- Synonymous variants (may still affect splicing)
- Exonic variants near splice junctions
- Variants creating cryptic splice sites
---
Prediction Tool Thresholds for PP3:
| Tool | Damaging | Uncertain | Benign |
|---|---|---|---|
| AlphaMissense | >0.564 | 0.34-0.564 | <0.34 |
| CADD PHRED | ≥20 | 15-20 | <15 |
| EVE | >0.5 | - | ≤0.5 |
| SpliceAI | ≥0.5 | 0.2-0.5 | <0.2 |
Recommended Strategy for VUS: 1. Run all predictors (AlphaMissense, CADD, EVE for missense; SpliceAI for splice) 2. If ≥2 concordant damaging → Strong PP3 support 3. If ≥2 concordant benign → BP4 support 4. If discordant → Weight AlphaMissense highest for missense, SpliceAI for splice
---
Phase 3.5: Expression & Regulatory Context (NEW)
CELLxGENE - Single-Cell Expression
| Tool | Purpose | Key Parameters |
|---|---|---|
CELLxGENE_get_expression_data | Cell-type specific expression | gene, tissue |
CELLxGENE_get_cell_metadata | Cell type annotations | gene |
CELLxGENE_download_h5ad | Download full dataset | dataset_id |
CELLxGENE_get_embeddings | UMAP/tSNE coordinates | dataset_id |
Example - Get cell-type expression:
# Get expression across cell types
expression = tu.tools.CELLxGENE_get_expression_data(
gene="FBN1",
tissue="heart"
)
# Returns: Expression values per cell typeWhy use it: Validates that candidate genes are expressed in disease-relevant cell types (e.g., fibroblasts for connective tissue disorders).
ChIPAtlas - Transcription Factor Binding
| Tool | Purpose | Key Parameters |
|---|---|---|
ChIPAtlas_enrichment_analysis | TF binding enrichment | gene, cell_type |
ChIPAtlas_get_peak_data | ChIP-seq peaks | gene, experiment_type |
ChIPAtlas_search_datasets | Find experiments | antigen, cell_type |
ChIPAtlas_get_experiments | Experiment metadata | experiment_id |
Example - Get regulatory context:
# Find TFs that regulate gene
tf_binding = tu.tools.ChIPAtlas_enrichment_analysis(
gene="FBN1",
cell_type="Fibroblast"
)
# Returns: TFs with significant binding near geneWhy use it: Identifies regulatory mechanisms that may be disrupted; helps interpret regulatory variants.
ENCODE - Regulatory Elements
| Tool | Purpose | Key Parameters |
|---|---|---|
ENCODE_search_experiments | Find experiments | assay_title, biosample |
ENCODE_get_experiment | Experiment details | accession |
ENCODE_get_biosample | Sample annotations | accession |
ENCODE_list_files | Get data files | experiment_accession |
Example - Get regulatory data:
# Search for regulatory data
experiments = tu.tools.ENCODE_search_experiments(
assay_title="ATAC-seq",
biosample="heart"
)---
Phase 3.6: Pathway Analysis (NEW)
KEGG - Metabolic & Signaling Pathways
| Tool | Purpose | Key Parameters |
|---|---|---|
kegg_search_pathway | Search pathways | query |
kegg_get_pathway_info | Pathway details | pathway_id |
kegg_find_genes | Find gene in KEGG | query |
kegg_get_gene_info | Gene pathway membership | gene_id |
Example - Get pathway context:
# Find gene in KEGG
kegg_gene = tu.tools.kegg_find_genes(query="hsa:FBN1")
# Get pathway membership
gene_info = tu.tools.kegg_get_gene_info(gene_id="hsa:2200")
# Returns: Pathways containing FBN1Reactome - Biological Processes
| Tool | Purpose | Key Parameters |
|---|---|---|
ReactomeContent_search | Search pathways | query |
Reactome_get_pathway | Pathway details | pathway_id |
reactome_disease_target_score | Disease-pathway links | disease, target |
Example - Get Reactome pathways:
# Search for pathways
pathways = tu.tools.ReactomeContent_search(query="TGF-beta signaling")IntAct - Protein-Protein Interactions
| Tool | Purpose | Key Parameters |
|---|---|---|
intact_search_interactions | Search interactions | query, species |
intact_get_interaction_network | Network view | gene, depth |
intact_get_complex_details | Protein complexes | complex_id |
Example - Get protein interactions:
# Get interaction partners
interactions = tu.tools.intact_search_interactions(
query="FBN1",
species="human"
)
# Returns: Direct interaction partners with confidence scoresWhy use it: Identifies protein complexes and pathways; variants may disrupt protein-protein interactions.
---
Phase 5: Structure Analysis (NVIDIA NIM)
Structure Prediction
| Tool | Purpose | Key Parameters |
|---|---|---|
NvidiaNIM_alphafold2 | High-accuracy prediction | sequence, algorithm |
NvidiaNIM_esmfold | Fast prediction | sequence |
Example - AlphaFold2 prediction:
structure = tu.tools.NvidiaNIM_alphafold2(
sequence=protein_sequence,
algorithm="mmseqs2",
relax_prediction=False
)
# Returns: PDB structure with pLDDT scoresDomain Annotation
| Tool | Purpose | Key Parameters |
|---|---|---|
InterPro_get_protein_domains | Domain architecture | accession |
UniProt_get_features_by_accession | Sequence features | accession |
Pfam_get_protein_annotations | Pfam domains | uniprot_id |
---
Phase 6: Literature Evidence (NEW)
PubMed - Published Literature
| Tool | Purpose | Key Parameters |
|---|---|---|
PubMed_search_articles | Search articles | query, limit |
PubMed_get_article | Get article details | pmid |
PubMed_get_related | Related articles | pmid |
PubMed_get_cited_by | Citation tracking | pmid |
Example - Search disease literature:
# Disease-specific search
papers = tu.tools.PubMed_search_articles(
query='"Marfan syndrome" AND (FBN1 OR genetics)',
limit=20
)BioRxiv/MedRxiv - Preprints
| Tool | Purpose | Key Parameters |
|---|---|---|
EuropePMC_search_articles | Search preprints (bioRxiv/medRxiv) | query, source='PPR', pageSize |
BioRxiv_get_preprint | Get preprint by DOI | doi |
ArXiv_search_papers | Search ArXiv | query, category, limit |
Example - Search preprints (bioRxiv/medRxiv don't have search APIs, use EuropePMC):
# Search for recent preprints
preprints = tu.tools.EuropePMC_search_articles(
query="Marfan syndrome genetics",
source="PPR", # PPR = Preprints only
pageSize=10
)
# Get full metadata if you have a DOI
if doi_from_results.startswith('10.1101/'):
full = tu.tools.BioRxiv_get_preprint(doi=doi_from_results)
# Returns: Recent preprints (not peer-reviewed)⚠️ Important: Preprints are NOT peer-reviewed. Flag this in reports.
OpenAlex - Citation Analysis
| Tool | Purpose | Key Parameters |
|---|---|---|
openalex_search_works | Search publications | query, limit |
openalex_get_author | Author metrics | author_id |
openalex_literature_search | Advanced search | query, filters |
Example - Citation analysis:
# Get citation data for paper
work = tu.tools.openalex_search_works(
query="FBN1 Marfan pathogenic",
limit=10
)
# Returns: Papers with citation counts, open access statusSemantic Scholar - AI-Enhanced Search
| Tool | Purpose | Key Parameters |
|---|---|---|
SemanticScholar_search_papers | AI-ranked search | query, limit |
Example:
# AI-enhanced literature search
papers = tu.tools.SemanticScholar_search_papers(
query="rare disease diagnosis machine learning",
limit=15
)---
Workflow Code Examples
Example 1: Full Phenotype-to-Diagnosis
def diagnose_rare_disease(tu, symptoms, patient_id):
"""Complete rare disease diagnostic workflow."""
# Phase 1: Standardize phenotype
hpo_terms = []
for symptom in symptoms:
results = tu.tools.HPO_search_terms(query=symptom)
if results:
hpo_terms.append(results[0])
# Phase 2: Match diseases
candidate_diseases = []
for hpo in hpo_terms:
diseases = tu.tools.HPO_get_diseases_by_phenotype(hp_id=hpo['id'])
candidate_diseases.extend(diseases)
# Rank by frequency
disease_counts = Counter(d['orpha_id'] for d in candidate_diseases)
top_diseases = disease_counts.most_common(10)
# Phase 3: Build gene panel
genes = set()
for orpha_id, count in top_diseases:
disease_genes = tu.tools.Orphanet_get_disease_genes(orpha_code=orpha_id)
genes.update(disease_genes)
return {
'hpo_terms': hpo_terms,
'candidate_diseases': top_diseases,
'gene_panel': list(genes)
}Example 2: Variant Interpretation
def interpret_variant(tu, variant_hgvs, gene_symbol):
"""Interpret a variant using ACMG criteria."""
evidence = {}
# PM2: Population frequency
freq = tu.tools.gnomad_get_variant(variant_id=variant_hgvs)
if freq['allele_frequency'] < 0.00001:
evidence['PM2'] = {'strength': 'Moderate', 'reason': 'Absent from gnomAD'}
# PP3: Computational predictions
cadd = tu.tools.CADD_get_scores(variant=variant_hgvs)
if cadd['phred_score'] > 25:
evidence['PP3'] = {'strength': 'Supporting', 'reason': f'CADD={cadd["phred_score"]}'}
# ClinVar
clinvar = tu.tools.ClinVar_search_variants(query=variant_hgvs)
if clinvar:
evidence['ClinVar'] = clinvar[0]['clinical_significance']
return evidenceExample 3: Structure Analysis for VUS
def analyze_vus_structure(tu, uniprot_id, variant_position):
"""Structural analysis for variant of uncertain significance."""
# Get protein sequence
protein = tu.tools.UniProt_get_entry_by_accession(accession=uniprot_id)
sequence = protein['sequence']
# Predict structure
structure = tu.tools.NvidiaNIM_alphafold2(
sequence=sequence,
algorithm="mmseqs2"
)
# Get domain annotations
domains = tu.tools.InterPro_get_protein_domains(accession=uniprot_id)
# Check if variant in domain
variant_domain = None
for domain in domains:
if domain['start'] <= variant_position <= domain['end']:
variant_domain = domain
break
return {
'structure': structure,
'plddt_at_position': get_plddt(structure, variant_position),
'domain': variant_domain
}---
Fallback Chains
Disease Matching
| Primary | Fallback 1 | Fallback 2 |
|---|---|---|
Orphanet_search_diseases | OMIM_search | DisGeNET_search_disease |
Orphanet_get_genes | OMIM_get_gene_map | DisGeNET_get_disease_genes |
OMIM_get_clinical_synopsis | Orphanet_get_disease | OpenTargets |
DisGeNET_search_gene | OpenTargets_get_diseases_phenotypes_by_target_ensembl | Literature search |
Expression & Regulatory
| Primary | Fallback 1 | Fallback 2 |
|---|---|---|
CELLxGENE_get_expression_data | GTEx_get_median_gene_expression | HPA_get_rna_expression_by_source |
ChIPAtlas_enrichment_analysis | ENCODE_search_experiments | Literature search |
Pathway Analysis
| Primary | Fallback 1 | Fallback 2 |
|---|---|---|
kegg_get_gene_info | ReactomeContent_search | KEGG_get_gene_pathways |
intact_search_interactions | STRING_interactions | Literature search |
Variant Annotation
| Primary | Fallback 1 | Fallback 2 |
|---|---|---|
ClinVar_get_variant_details | gnomad_get_variant | Literature search |
gnomad_get_variant | gnomad_get_variant | 1000 Genomes |
Pathogenicity Prediction (ENHANCED)
| Primary | Fallback 1 | Fallback 2 |
|---|---|---|
AlphaMissense_get_variant_score | CADD_get_variant_score | EVE_get_variant_score |
CADD_get_variant_score | myvariant CADD field | PolyPhen-2 |
EVE_get_variant_score | VEP with EVE plugin | REVEL |
Structure Prediction
| Primary | Fallback 1 | Fallback 2 |
|---|---|---|
NvidiaNIM_alphafold2 | alphafold_get_prediction | NvidiaNIM_esmfold |
InterPro_get_protein_domains | Pfam_get_protein_annotations | UniProt_get_features_by_accession |
Literature
| Primary | Fallback 1 | Fallback 2 |
|---|---|---|
PubMed_search_articles | EuropePMC_search_articles | SemanticScholar_search_papers |
EuropePMC_search_articles (source='PPR') | web_search (site:biorxiv.org) | Skip preprints |
openalex_search_works | Crossref_search_works | PubMed |
---
Common Parameter Mistakes
| Tool | Wrong | Correct |
|---|---|---|
MyGene_query_genes | gene="FBN1" | q="FBN1" |
ClinVar_get_variant_details | variant_id=123 | id=123 |
OpenTargets_* | ensemblID | ensemblId (camelCase) |
GTEx_get_median_gene_expression | ensembl_id | gencode_id (versioned) |
gnomad_get_variant | variant="c.123A>G" | variant_id="1-123-A-G" |
---
NVIDIA NIM Requirements
API Key: NVIDIA_API_KEY environment variable required
Check availability:
import os
nvidia_available = bool(os.environ.get("NVIDIA_API_KEY"))Rate limits: 40 RPM (1.5 second minimum between calls)
Async operations: AlphaFold2 may return 202, requiring polling:
# Initial call may return 202
result = tu.tools.NvidiaNIM_alphafold2(sequence=seq)
if result.get('status') == 'pending':
# Poll for completion (handled internally by tool)
passRelated skills
How it compares
Choose tooluniverse-rare-disease-diagnosis over generic literature search skills when the task needs HPO-to-disease ranking plus ACMG variant interpretation in one workflow.
FAQ
What databases does tooluniverse-rare-disease-diagnosis integrate?
tooluniverse-rare-disease-diagnosis connects phenotype matching via HPO to Orphanet and OMIM disease retrieval, ClinGen and MARRVEL gene prioritization, and variant interpretation across ClinVar, gnomAD, and FAVOR annotation with ACMG criteria.
Who should review tooluniverse-rare-disease-diagnosis output?
tooluniverse-rare-disease-diagnosis produces ranked differential diagnoses and variant evidence for clinician or researcher review. The skill supports diagnostic reasoning workflows and does not replace licensed clinical diagnosis.