-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0b2fe0
commit 2dc726b
Showing
6 changed files
with
1,399 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# TBK1\n", | ||
"[Autoinflammation with arthritis and vasculitis (AIARV)](https://omim.org/entry/620880) is caused by homozygous mutation in the TBK1 gene." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Using pyphetools version 0.9.115\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"from pyphetools.creation import TemplateImporter, Moi\n", | ||
"from pyphetools.visualization import IndividualTable, QcVisualizer\n", | ||
"from IPython.display import display, HTML\n", | ||
"import pyphetools\n", | ||
"print(f\"Using pyphetools version {pyphetools.__version__}\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"HPO version 2024-12-12\n", | ||
"Created encoders for 57 fields\n", | ||
"Importing OMIM:620880, Autoinflammation with arthritis and vasculitis, HGNC:11584, TBK1, NM_013254.4\n", | ||
"[INFO] encoding variant \"c.1318C>T\"\n", | ||
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_013254.4%3Ac.1318C>T/NM_013254.4?content-type=application%2Fjson\n", | ||
"[INFO] encoding variant \"c.634T>G\"\n", | ||
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_013254.4%3Ac.634T>G/NM_013254.4?content-type=application%2Fjson\n", | ||
"[INFO] encoding variant \"c.1857G>A\"\n", | ||
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_013254.4%3Ac.1857G>A/NM_013254.4?content-type=application%2Fjson\n", | ||
"We output 4 GA4GH phenopackets to the directory phenopackets\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"template = \"input/TBK1_AIARV_individuals.xlsx\"\n", | ||
"created_by = \"0000-0002-0736-9199\"\n", | ||
"timporter = TemplateImporter(template=template, created_by=created_by)\n", | ||
"individual_list, cvalidator = timporter.import_phenopackets_from_template()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<h2>Cohort validation</h2>\n", | ||
"<p>Errors found with 3 of 4 phenopackets.</p>\n", | ||
"<table style=\"border: 2px solid black; align: \"left\">\n", | ||
"<caption>Error counts</caption>\n", | ||
"<tr><th style=\"text-align: left;font-weight: bold;\">Level</th><th style=\"text-align: left;font-weight: bold;\">Error category</th><th style=\"text-align: left;font-weight: bold;\">Count</th></tr>\n", | ||
"<tr><td style=\"text-align: left;\">WARNING</td><td style=\"text-align: left;\">REDUNDANT</td><td style=\"text-align: left;\">4</td></tr>\n", | ||
"</table>\n", | ||
"<p>A total of 4 issues were fixed and no individual was removed from the cohort.</p>" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.HTML object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"qc = QcVisualizer(cohort_validator=cvalidator)\n", | ||
"display(HTML(qc.to_summary_html()))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<table style=\"border: 2px solid black; align: \"left\">\n", | ||
"<caption>4 phenopackets - PMID:34363755 (n=4)</caption>\n", | ||
"<tr><th style=\"text-align: left;font-weight: bold;\">Individual</th><th style=\"text-align: left;font-weight: bold;\">Disease</th><th style=\"text-align: left;font-weight: bold;\">Genotype</th><th style=\"text-align: left;font-weight: bold;\">Phenotypic features</th></tr>\n", | ||
"<tr><td style=\"text-align: left;\">Family 1 individual P1 (FEMALE; P32Y)</td><td style=\"text-align: left;\">Autoinflammation with arthritis and vasculitis (OMIM:620880)</td><td style=\"text-align: left;\">NM_013254.4:c.1857G>A (homozygous)</td><td style=\"text-align: left;\">Motor delay (HP:0001270): onset ; Global developmental delay (HP:0001263): onset ; Intellectual disability, mild (HP:0001256): onset ; Seizure (HP:0001250): onset ; Vasculitis (HP:0002633): onset ; Microcytic anemia (HP:0001935): onset ; Recurrent fever (HP:0001954): onset ; Celiac disease (HP:0002608): onset ; Disproportionate short-limb short stature (HP:0008873): onset ; Autoimmunity (HP:0002960): onset ; Recurrent sinusitis (HP:0011108): onset ; excluded: Delayed speech and language development (HP:0000750): onset ; excluded: Status epilepticus (HP:0002133): onset ; excluded: Thrombocytosis (HP:0001894): onset ; excluded: Conjunctivitis (HP:0000509): onset ; excluded: Immunodeficiency (HP:0002721): onset ; excluded: Visceromegaly (HP:0003271): onset ; excluded: Recurrent tonsillitis (HP:0011110): onset ; excluded: Abdominal pain (HP:0002027): onset ; excluded: Herpes simplex encephalitis (HP:0012302): onset <br/><b>TimeElement(element=OntologyClass(id=HP:0003593, label=Infantile onset))</b>: Arthritis (HP:0001369): onset ontology_class {\n", | ||
" id: \"HP:0003593\"\n", | ||
" label: \"Infantile onset\"\n", | ||
"}\n", | ||
"; Feeding difficulties (HP:0011968): onset ontology_class {\n", | ||
" id: \"HP:0003593\"\n", | ||
" label: \"Infantile onset\"\n", | ||
"}\n", | ||
"; Exanthem (HP:4000054): onset ontology_class {\n", | ||
" id: \"HP:0003593\"\n", | ||
" label: \"Infantile onset\"\n", | ||
"}\n", | ||
"<br/><b>TimeElement(element=Age(iso8601duration=P5Y))</b>: Villous atrophy (HP:0011473): onset age {\n", | ||
" iso8601duration: \"P5Y\"\n", | ||
"}\n", | ||
"<br/><b>TimeElement(element=OntologyClass(id=HP:0011462, label=Young adult onset))</b>: Recurrent urinary tract infections (HP:0000010): onset ontology_class {\n", | ||
" id: \"HP:0011462\"\n", | ||
" label: \"Young adult onset\"\n", | ||
"}\n", | ||
"<br/><b>TimeElement(element=Age(iso8601duration=P22Y))</b>: Osteomyelitis (HP:0002754): onset age {\n", | ||
" iso8601duration: \"P22Y\"\n", | ||
"}\n", | ||
"<br/><b>TimeElement(element=Age(iso8601duration=P28Y))</b>: Cerebral infarct (HP:0025722): onset age {\n", | ||
" iso8601duration: \"P28Y\"\n", | ||
"}\n", | ||
"</td></tr>\n", | ||
"<tr><td style=\"text-align: left;\">Family 1 individual P2 (MALE; P26Y)</td><td style=\"text-align: left;\">Autoinflammation with arthritis and vasculitis (OMIM:620880)</td><td style=\"text-align: left;\">NM_013254.4:c.1857G>A (homozygous)</td><td style=\"text-align: left;\">Global developmental delay (HP:0001263): onset ; Intellectual disability, mild (HP:0001256): onset ; Microcytic anemia (HP:0001935): onset ; Recurrent fever (HP:0001954): onset ; Disproportionate short-limb short stature (HP:0008873): onset ; Recurrent tonsillitis (HP:0011110): onset ; Autoimmunity (HP:0002960): onset ; Abdominal pain (HP:0002027): onset ; excluded: Status epilepticus (HP:0002133): onset ; excluded: Thrombocytosis (HP:0001894): onset ; excluded: Celiac disease (HP:0002608): onset ; excluded: Conjunctivitis (HP:0000509): onset ; excluded: Immunodeficiency (HP:0002721): onset ; excluded: Visceromegaly (HP:0003271): onset ; excluded: Villous atrophy (HP:0011473): onset <br/><b>TimeElement(element=OntologyClass(id=HP:0003593, label=Infantile onset))</b>: Arthritis (HP:0001369): onset ontology_class {\n", | ||
" id: \"HP:0003593\"\n", | ||
" label: \"Infantile onset\"\n", | ||
"}\n", | ||
"; Feeding difficulties (HP:0011968): onset ontology_class {\n", | ||
" id: \"HP:0003593\"\n", | ||
" label: \"Infantile onset\"\n", | ||
"}\n", | ||
"<br/><b>TimeElement(element=Age(iso8601duration=P1Y))</b>: Seizure (HP:0001250): onset age {\n", | ||
" iso8601duration: \"P1Y\"\n", | ||
"}\n", | ||
"<br/><b>TimeElement(element=Age(iso8601duration=P1Y6M))</b>: Vasculitis in the skin (HP:0200029): onset age {\n", | ||
" iso8601duration: \"P1Y6M\"\n", | ||
"}\n", | ||
"; Leukocytoclastic vasculitis (HP:0034786): onset age {\n", | ||
" iso8601duration: \"P1Y6M\"\n", | ||
"}\n", | ||
"</td></tr>\n", | ||
"<tr><td style=\"text-align: left;\">Family 2 individual P3 (MALE; P7Y)</td><td style=\"text-align: left;\">Autoinflammation with arthritis and vasculitis (OMIM:620880)</td><td style=\"text-align: left;\">NM_013254.4:c.634T>G (homozygous)</td><td style=\"text-align: left;\">Status epilepticus (HP:0002133): onset ; Thrombocytosis (HP:0001894): onset ; Microcytic anemia (HP:0001935): onset ; Conjunctivitis (HP:0000509): onset ; Short stature (HP:0004322): onset ; Inflammatory abnormality of the skin (HP:0011123): onset ; Autoimmunity (HP:0002960): onset ; excluded: Lymphadenopathy (HP:0002716): onset ; excluded: Brain atrophy (HP:0012444): onset ; excluded: Global developmental delay (HP:0001263): onset ; excluded: Intellectual disability, mild (HP:0001256): onset ; excluded: Vasculitis (HP:0002633): onset ; excluded: Feeding difficulties (HP:0011968): onset ; excluded: Recurrent fever (HP:0001954): onset ; excluded: Celiac disease (HP:0002608): onset ; excluded: Immunodeficiency (HP:0002721): onset ; excluded: Visceromegaly (HP:0003271): onset ; excluded: Recurrent tonsillitis (HP:0011110): onset ; excluded: Abdominal pain (HP:0002027): onset <br/><b>TimeElement(element=OntologyClass(id=HP:0003593, label=Infantile onset))</b>: Arthritis (HP:0001369): onset ontology_class {\n", | ||
" id: \"HP:0003593\"\n", | ||
" label: \"Infantile onset\"\n", | ||
"}\n", | ||
"<br/><b>TimeElement(element=Age(iso8601duration=P7Y9M))</b>: Nephrotic syndrome (HP:0000100): onset age {\n", | ||
" iso8601duration: \"P7Y9M\"\n", | ||
"}\n", | ||
"</td></tr>\n", | ||
"<tr><td style=\"text-align: left;\">Family 3 individual P4 (FEMALE; P8Y)</td><td style=\"text-align: left;\">Autoinflammation with arthritis and vasculitis (OMIM:620880)</td><td style=\"text-align: left;\">NM_013254.4:c.1318C>T (homozygous)</td><td style=\"text-align: left;\">Lymphadenopathy (HP:0002716): onset ; Recurrent fever (HP:0001954): onset ; Ventriculomegaly (HP:0002119): onset ; Recurrent tonsillitis (HP:0011110): onset ; Autoimmunity (HP:0002960): onset ; excluded: Global developmental delay (HP:0001263): onset ; excluded: Intellectual disability, mild (HP:0001256): onset ; excluded: Status epilepticus (HP:0002133): onset ; excluded: Vasculitis (HP:0002633): onset ; excluded: Thrombocytosis (HP:0001894): onset ; excluded: Microcytic anemia (HP:0001935): onset ; excluded: Feeding difficulties (HP:0011968): onset ; excluded: Celiac disease (HP:0002608): onset ; excluded: Conjunctivitis (HP:0000509): onset ; excluded: Short stature (HP:0004322): onset ; excluded: Immunodeficiency (HP:0002721): onset ; excluded: Visceromegaly (HP:0003271): onset ; excluded: Abdominal pain (HP:0002027): onset <br/><b>TimeElement(element=Age(iso8601duration=P3Y))</b>: Seizure (HP:0001250): onset age {\n", | ||
" iso8601duration: \"P3Y\"\n", | ||
"}\n", | ||
"</td></tr>\n", | ||
"</table>" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.HTML object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"table = IndividualTable(cvalidator.get_error_free_individual_list())\n", | ||
"display(HTML(table.to_html()))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 7, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"[pyphetools] Ingested 4 GA4GH phenopackets.\n", | ||
"[INFO] Extracted 4 from 4 phenopackets with OMIM:620880\n", | ||
"\n", | ||
"\tAutoinflammation with arthritis and vasculitis (OMIM:620880): n=4\n", | ||
"We found a total of 35 unique HPO terms\n", | ||
"Extracted disease: Autoinflammation with arthritis and vasculitis (OMIM:620880)\n", | ||
"Wrote HPOA disease file to OMIM-620880.tab\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"pmid = \"PMID:34363755\"\n", | ||
"df = timporter.create_hpoa_from_phenopackets(pmid=pmid, mode_of_inheritance=Moi.AR, target=\"OMIM:620880\")" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "ps24venv", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.12.4" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Binary file not shown.
Oops, something went wrong.