-
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
6b3899e
commit 7335935
Showing
5 changed files
with
911 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,336 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# HROB\n", | ||
"[ovarian dysgenesis-11 (ODG11)](https://omim.org/entry/620897) is caused by homozygous or compound heterozygous mutation in the HROB 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": 2, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"template = \"input/HROB_ODG11_individuals.xlsx\"\n", | ||
"created_by = \"0000-0002-0736-9199\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"HPO version 2024-12-12\n", | ||
"Created encoders for 25 fields\n", | ||
"Importing OMIM:620897, Ovarian dysgenesis 11, HGNC:28460, HROB, NM_001171251.3\n", | ||
"[INFO] encoding variant \"c.421del\"\n", | ||
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_001171251.3%3Ac.421del/NM_001171251.3?content-type=application%2Fjson\n", | ||
"[INFO] encoding variant \"c.1351C>T\"\n", | ||
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_001171251.3%3Ac.1351C>T/NM_001171251.3?content-type=application%2Fjson\n", | ||
"[INFO] encoding variant \"c.718C>T\"\n", | ||
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_001171251.3%3Ac.718C>T/NM_001171251.3?content-type=application%2Fjson\n", | ||
"We output 3 GA4GH phenopackets to the directory phenopackets\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"timporter = TemplateImporter(template=template, created_by=created_by)\n", | ||
"individual_list, cvalidator = timporter.import_phenopackets_from_template()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<h2>Cohort validation</h2>\n", | ||
"<p>Errors found with 2 of 3 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;\">2</td></tr>\n", | ||
"</table>\n", | ||
"<p>A total of 2 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": 5, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<table style=\"border: 2px solid black; align: \"left\">\n", | ||
"<caption>3 phenopackets - PMID:34707299 (n=1); PMID:38105698 (n=2)</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;\">nan (FEMALE; P33Y)</td><td style=\"text-align: left;\">Ovarian dysgenesis 11 (OMIM:620897)</td><td style=\"text-align: left;\">NM_001171251.3:c.421del (homozygous)</td><td style=\"text-align: left;\">Delayed puberty (HP:0000823): onset ; Primary amenorrhea (HP:0000786): onset ; Elevated circulating follicle stimulating hormone level (HP:0008232): onset ; Decreased serum estradiol (HP:0008214): onset ; excluded: Delayed menarche (HP:0012569): onset </td></tr>\n", | ||
"<tr><td style=\"text-align: left;\">proband (FEMALE; P13Y6M)</td><td style=\"text-align: left;\">Ovarian dysgenesis 11 (OMIM:620897)</td><td style=\"text-align: left;\"><ul> <li>NM_001171251.3:c.718C>T (heterozygous)</li> <li>NM_001171251.3:c.1351C>T (heterozygous)</li> </ul></td><td style=\"text-align: left;\">Delayed menarche (HP:0012569): onset ; Elevated circulating luteinizing hormone level (HP:0011969): onset ; Elevated circulating follicle stimulating hormone level (HP:0008232): onset ; Decreased circulating antimullerian hormone circulation (HP:0031103): onset ; Aplasia of the ovary (HP:0010463): onset ; excluded: Primary amenorrhea (HP:0000786): onset </td></tr>\n", | ||
"<tr><td style=\"text-align: left;\">nan (FEMALE; P11Y6M)</td><td style=\"text-align: left;\">Ovarian dysgenesis 11 (OMIM:620897)</td><td style=\"text-align: left;\"><ul> <li>NM_001171251.3:c.718C>T (heterozygous)</li> <li>NM_001171251.3:c.1351C>T (heterozygous)</li> </ul></td><td style=\"text-align: left;\">Delayed menarche (HP:0012569): onset ; Elevated circulating luteinizing hormone level (HP:0011969): onset ; Elevated circulating follicle stimulating hormone level (HP:0008232): onset ; Decreased circulating antimullerian hormone circulation (HP:0031103): onset ; Aplasia of the ovary (HP:0010463): onset ; excluded: Primary amenorrhea (HP:0000786): onset </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": 6, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"[pyphetools] Ingested 3 GA4GH phenopackets.\n", | ||
"[INFO] Extracted 3 from 3 phenopackets with OMIM:620897\n", | ||
"\n", | ||
"\tOvarian dysgenesis 11 (OMIM:620897): n=3\n", | ||
"We found a total of 8 unique HPO terms\n", | ||
"Extracted disease: Ovarian dysgenesis 11 (OMIM:620897)\n", | ||
"Wrote HPOA disease file to OMIM-620897.tab\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div>\n", | ||
"<style scoped>\n", | ||
" .dataframe tbody tr th:only-of-type {\n", | ||
" vertical-align: middle;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe tbody tr th {\n", | ||
" vertical-align: top;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe thead th {\n", | ||
" text-align: right;\n", | ||
" }\n", | ||
"</style>\n", | ||
"<table border=\"1\" class=\"dataframe\">\n", | ||
" <thead>\n", | ||
" <tr style=\"text-align: right;\">\n", | ||
" <th></th>\n", | ||
" <th>#diseaseID</th>\n", | ||
" <th>diseaseName</th>\n", | ||
" <th>phenotypeID</th>\n", | ||
" <th>phenotypeName</th>\n", | ||
" <th>onsetID</th>\n", | ||
" <th>onsetName</th>\n", | ||
" <th>frequency</th>\n", | ||
" <th>sex</th>\n", | ||
" <th>negation</th>\n", | ||
" <th>modifier</th>\n", | ||
" <th>description</th>\n", | ||
" <th>publication</th>\n", | ||
" <th>evidence</th>\n", | ||
" <th>biocuration</th>\n", | ||
" </tr>\n", | ||
" </thead>\n", | ||
" <tbody>\n", | ||
" <tr>\n", | ||
" <th>0</th>\n", | ||
" <td>OMIM:620897</td>\n", | ||
" <td>Ovarian dysgenesis 11</td>\n", | ||
" <td>HP:0000823</td>\n", | ||
" <td>Delayed puberty</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>1/1</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>PMID:34707299</td>\n", | ||
" <td>PCS</td>\n", | ||
" <td>ORCID:0000-0002-0736-9199[2025-01-06]</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>1</th>\n", | ||
" <td>OMIM:620897</td>\n", | ||
" <td>Ovarian dysgenesis 11</td>\n", | ||
" <td>HP:0000786</td>\n", | ||
" <td>Primary amenorrhea</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>1/1</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>PMID:34707299</td>\n", | ||
" <td>PCS</td>\n", | ||
" <td>ORCID:0000-0002-0736-9199[2025-01-06]</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>2</th>\n", | ||
" <td>OMIM:620897</td>\n", | ||
" <td>Ovarian dysgenesis 11</td>\n", | ||
" <td>HP:0008232</td>\n", | ||
" <td>Elevated circulating follicle stimulating horm...</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>1/1</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>PMID:34707299</td>\n", | ||
" <td>PCS</td>\n", | ||
" <td>ORCID:0000-0002-0736-9199[2025-01-06]</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>3</th>\n", | ||
" <td>OMIM:620897</td>\n", | ||
" <td>Ovarian dysgenesis 11</td>\n", | ||
" <td>HP:0008214</td>\n", | ||
" <td>Decreased serum estradiol</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>1/1</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>PMID:34707299</td>\n", | ||
" <td>PCS</td>\n", | ||
" <td>ORCID:0000-0002-0736-9199[2025-01-06]</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>4</th>\n", | ||
" <td>OMIM:620897</td>\n", | ||
" <td>Ovarian dysgenesis 11</td>\n", | ||
" <td>HP:0012569</td>\n", | ||
" <td>Delayed menarche</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>0/1</td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td></td>\n", | ||
" <td>PMID:34707299</td>\n", | ||
" <td>PCS</td>\n", | ||
" <td>ORCID:0000-0002-0736-9199[2025-01-06]</td>\n", | ||
" </tr>\n", | ||
" </tbody>\n", | ||
"</table>\n", | ||
"</div>" | ||
], | ||
"text/plain": [ | ||
" #diseaseID diseaseName phenotypeID \\\n", | ||
"0 OMIM:620897 Ovarian dysgenesis 11 HP:0000823 \n", | ||
"1 OMIM:620897 Ovarian dysgenesis 11 HP:0000786 \n", | ||
"2 OMIM:620897 Ovarian dysgenesis 11 HP:0008232 \n", | ||
"3 OMIM:620897 Ovarian dysgenesis 11 HP:0008214 \n", | ||
"4 OMIM:620897 Ovarian dysgenesis 11 HP:0012569 \n", | ||
"\n", | ||
" phenotypeName onsetID onsetName \\\n", | ||
"0 Delayed puberty \n", | ||
"1 Primary amenorrhea \n", | ||
"2 Elevated circulating follicle stimulating horm... \n", | ||
"3 Decreased serum estradiol \n", | ||
"4 Delayed menarche \n", | ||
"\n", | ||
" frequency sex negation modifier description publication evidence \\\n", | ||
"0 1/1 PMID:34707299 PCS \n", | ||
"1 1/1 PMID:34707299 PCS \n", | ||
"2 1/1 PMID:34707299 PCS \n", | ||
"3 1/1 PMID:34707299 PCS \n", | ||
"4 0/1 PMID:34707299 PCS \n", | ||
"\n", | ||
" biocuration \n", | ||
"0 ORCID:0000-0002-0736-9199[2025-01-06] \n", | ||
"1 ORCID:0000-0002-0736-9199[2025-01-06] \n", | ||
"2 ORCID:0000-0002-0736-9199[2025-01-06] \n", | ||
"3 ORCID:0000-0002-0736-9199[2025-01-06] \n", | ||
"4 ORCID:0000-0002-0736-9199[2025-01-06] " | ||
] | ||
}, | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"pmid = \"PMID:34707299\"\n", | ||
"df = timporter.create_hpoa_from_phenopackets(pmid=pmid, mode_of_inheritance=Moi.AR, target=\"OMIM:620897\")\n", | ||
"df.head()" | ||
] | ||
} | ||
], | ||
"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.8" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Binary file not shown.
Oops, something went wrong.