Skip to content

Commit

Permalink
RFXAP
Browse files Browse the repository at this point in the history
  • Loading branch information
pnrobinson committed Oct 25, 2024
1 parent df25059 commit fe31c24
Show file tree
Hide file tree
Showing 6 changed files with 1,215 additions and 0 deletions.
325 changes: 325 additions & 0 deletions notebooks/RFXAP/RFXAP_MHC2D4_individuals.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,325 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# RFXAP\n",
"[MHC class II deficiency-4 (MHC2D4)](https://omim.org/entry/620817) is caused by homozygous or compound heterozygous mutation in the RFXAP gene.\n",
"\n",
"RFXAP_MHC2D4_individuals.ipynb"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using pyphetools version 0.9.110\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": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HPO version 2024-08-13\n",
"Created encoders for 46 fields\n",
"Importing OMIM:620817, MHC class II deficiency 4, HGNC:9988, RFXAP, NM_000538.4\n",
"[INFO] encoding variant \"c.350del\"\n",
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_000538.4%3Ac.350del/NM_000538.4?content-type=application%2Fjson\n",
"[INFO] encoding variant \"c.163C>T\"\n",
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_000538.4%3Ac.163C>T/NM_000538.4?content-type=application%2Fjson\n",
"[INFO] encoding variant \"c.219C>G\"\n",
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_000538.4%3Ac.219C>G/NM_000538.4?content-type=application%2Fjson\n",
"[INFO] encoding variant \"c.467del\"\n",
"https://rest.variantvalidator.org/VariantValidator/variantvalidator/hg38/NM_000538.4%3Ac.467del/NM_000538.4?content-type=application%2Fjson\n",
"We output 4 GA4GH phenopackets to the directory phenopackets\n"
]
}
],
"source": [
"template = \"input/RFXAP_MHC2D4_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": 6,
"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;\">ERROR</td><td style=\"text-align: left;\">CONFLICT</td><td style=\"text-align: left;\">1</td></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 3 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": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table style=\"border: 2px solid black; align: \"left\">\n",
"<caption>4 phenopackets - PMID:37584719 (n=3); PMID:22390233 (n=1)</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;\">P14 (MALE; P10Y)</td><td style=\"text-align: left;\">MHC class II deficiency 4 (OMIM:620817)</td><td style=\"text-align: left;\">NM_000538.4:c.163C>T (homozygous)</td><td style=\"text-align: left;\">Decreased CD4:CD8 ratio (HP:0033222): onset ; Neutropenia (HP:0001875): onset ; Recurrent pneumonia (HP:0006532): onset ; Protracted diarrhea (HP:0004385): onset ; Failure to thrive (HP:0001508): onset ; Ataxia (HP:0001251): onset ; Lower limb muscle weakness (HP:0007340): onset ; Decreased proportion of CD4-positive helper T cells (HP:0005407): onset ; Decreased circulating IgG concentration (HP:0004315): onset ; Decreased circulating total IgM (HP:0002850): onset ; Decreased circulating IgA concentration (HP:0002720): onset ; excluded: Recurrent otitis media (HP:0000403): onset ; excluded: Hepatomegaly (HP:0002240): onset ; excluded: Hypotonia (HP:0001252): onset ; excluded: Global developmental delay (HP:0001263): onset </td></tr>\n",
"<tr><td style=\"text-align: left;\">P15 (MALE; P1Y6M)</td><td style=\"text-align: left;\">MHC class II deficiency 4 (OMIM:620817)</td><td style=\"text-align: left;\">NM_000538.4:c.350del (homozygous)</td><td style=\"text-align: left;\">Decreased CD4:CD8 ratio (HP:0033222): onset ; Recurrent pneumonia (HP:0006532): onset ; Protracted diarrhea (HP:0004385): onset ; Hypotonia (HP:0001252): onset ; Brain atrophy (HP:0012444): onset ; Decreased proportion of CD4-positive helper T cells (HP:0005407): onset ; Decreased circulating IgG concentration (HP:0004315): onset ; Decreased circulating IgA concentration (HP:0002720): onset ; excluded: Recurrent otitis media (HP:0000403): onset ; excluded: Hepatomegaly (HP:0002240): onset ; excluded: Neutropenia (HP:0001875): onset ; excluded: Failure to thrive (HP:0001508): onset ; excluded: Ataxia (HP:0001251): onset ; excluded: Lower limb muscle weakness (HP:0007340): onset ; excluded: Global developmental delay (HP:0001263): onset ; excluded: Decreased circulating total IgM (HP:0002850): onset </td></tr>\n",
"<tr><td style=\"text-align: left;\">P16 (FEMALE; P11M)</td><td style=\"text-align: left;\">MHC class II deficiency 4 (OMIM:620817)</td><td style=\"text-align: left;\">NM_000538.4:c.467del (homozygous)</td><td style=\"text-align: left;\">Decreased CD4:CD8 ratio (HP:0033222): onset ; Recurrent pneumonia (HP:0006532): onset ; Protracted diarrhea (HP:0004385): onset ; Failure to thrive (HP:0001508): onset ; Hypotonia (HP:0001252): onset ; Global developmental delay (HP:0001263): onset ; Decreased proportion of CD4-positive helper T cells (HP:0005407): onset ; Decreased circulating IgG concentration (HP:0004315): onset ; Decreased circulating total IgM (HP:0002850): onset ; Decreased circulating IgA concentration (HP:0002720): onset ; excluded: Recurrent otitis media (HP:0000403): onset ; excluded: Hepatomegaly (HP:0002240): onset ; excluded: Neutropenia (HP:0001875): onset ; excluded: Ataxia (HP:0001251): onset ; excluded: Lower limb muscle weakness (HP:0007340): onset </td></tr>\n",
"<tr><td style=\"text-align: left;\">Case report (FEMALE; P6M)</td><td style=\"text-align: left;\">MHC class II deficiency 4 (OMIM:620817)</td><td style=\"text-align: left;\">NM_000538.4:c.219C>G (homozygous)</td><td style=\"text-align: left;\">Splenomegaly (HP:0001744): onset ; Hepatomegaly (HP:0002240): onset ; Decreased proportion of CD4-positive helper T cells (HP:0005407): onset ; Decreased circulating IgG concentration (HP:0004315): onset ; Decreased circulating IgA concentration (HP:0002720): onset ; Impaired lymphocyte transformation with phytohemagglutinin (HP:0003347): onset ; Postnatal growth retardation (HP:0008897): onset ; excluded: Decreased circulating total IgM (HP:0002850): onset <br/><b>TimeElement(element=Age(iso8601duration=P4M))</b>: Recurrent candida infections (HP:0005401): onset age {\n",
" iso8601duration: \"P4M\"\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": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[pyphetools] Ingested 4 GA4GH phenopackets.\n",
"[INFO] Extracted 4 from 4 phenopackets with OMIM:620817\n",
"\n",
"\tMHC class II deficiency 4 (OMIM:620817): n=4\n",
"We found a total of 20 unique HPO terms\n",
"Extracted disease: MHC class II deficiency 4 (OMIM:620817)\n",
"Wrote HPOA disease file to OMIM-620817.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:620817</td>\n",
" <td>MHC class II deficiency 4</td>\n",
" <td>HP:0033222</td>\n",
" <td>Decreased CD4:CD8 ratio</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>3/3</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>PMID:37584719</td>\n",
" <td>PCS</td>\n",
" <td>ORCID:0000-0002-0736-9199[2024-10-25]</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>OMIM:620817</td>\n",
" <td>MHC class II deficiency 4</td>\n",
" <td>HP:0006532</td>\n",
" <td>Recurrent pneumonia</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>3/3</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>PMID:37584719</td>\n",
" <td>PCS</td>\n",
" <td>ORCID:0000-0002-0736-9199[2024-10-25]</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>OMIM:620817</td>\n",
" <td>MHC class II deficiency 4</td>\n",
" <td>HP:0004385</td>\n",
" <td>Protracted diarrhea</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>3/3</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>PMID:37584719</td>\n",
" <td>PCS</td>\n",
" <td>ORCID:0000-0002-0736-9199[2024-10-25]</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>OMIM:620817</td>\n",
" <td>MHC class II deficiency 4</td>\n",
" <td>HP:0001252</td>\n",
" <td>Hypotonia</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>2/3</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>PMID:37584719</td>\n",
" <td>PCS</td>\n",
" <td>ORCID:0000-0002-0736-9199[2024-10-25]</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>OMIM:620817</td>\n",
" <td>MHC class II deficiency 4</td>\n",
" <td>HP:0012444</td>\n",
" <td>Brain atrophy</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:37584719</td>\n",
" <td>PCS</td>\n",
" <td>ORCID:0000-0002-0736-9199[2024-10-25]</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" #diseaseID ... biocuration\n",
"0 OMIM:620817 ... ORCID:0000-0002-0736-9199[2024-10-25]\n",
"1 OMIM:620817 ... ORCID:0000-0002-0736-9199[2024-10-25]\n",
"2 OMIM:620817 ... ORCID:0000-0002-0736-9199[2024-10-25]\n",
"3 OMIM:620817 ... ORCID:0000-0002-0736-9199[2024-10-25]\n",
"4 OMIM:620817 ... ORCID:0000-0002-0736-9199[2024-10-25]\n",
"\n",
"[5 rows x 14 columns]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pmid = \"PMID:37584719\"\n",
"df = timporter.create_hpoa_from_phenopackets(pmid=pmid, mode_of_inheritance=Moi.AR, target=\"OMIM:620817\")\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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.
Loading

0 comments on commit fe31c24

Please sign in to comment.