Skip to content

Commit

Permalink
Merge pull request #9 from gwaygenomics/remove-col-hotfix
Browse files Browse the repository at this point in the history
Hotfix - Remove Columns
  • Loading branch information
jharenza authored Oct 22, 2018
2 parents df932f3 + aba8144 commit 2f35453
Show file tree
Hide file tree
Showing 17 changed files with 333 additions and 38 deletions.
188 changes: 169 additions & 19 deletions 2.evaluate-classifier-pdx.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@
"ALK 18\n",
"KRAS 16\n",
"NF1 12\n",
"DMD 10\n",
"NRAS 10\n",
"DMD 10\n",
"CIC 8\n",
"SOS1 7\n",
"HRAS 4\n",
Expand Down Expand Up @@ -281,13 +281,13 @@
"text/plain": [
"Missense_Mutation 112\n",
"Shallow_Del 17\n",
"Fusion 13\n",
"Nonsense_Mutation 13\n",
"Fusion 13\n",
"Frame_Shift_Del 5\n",
"Frame_Shift_Ins 3\n",
"Splice_Site 3\n",
"Deep_Del 1\n",
"Frame_Shift_Ins 3\n",
"In_Frame_Del 1\n",
"Deep_Del 1\n",
"Name: Variant_Classification, dtype: int64"
]
},
Expand All @@ -309,24 +309,24 @@
"data": {
"text/plain": [
"Osteosarcoma 45\n",
"BCP-ALL 26\n",
"Neuroblastoma 26\n",
"BCP-ALL 26\n",
"Glioblastoma 13\n",
"Ewing Sarcoma 12\n",
"Ph-likeALL 7\n",
"Embryonal Rhabdomyosarcoma 6\n",
"MLL-ALL 4\n",
"Medulloblastoma 4\n",
"Alveolar Rhabdomyosarcoma 4\n",
"Wilms 4\n",
"T-ALL 4\n",
"Astrocytoma 3\n",
"Wilms 4\n",
"ATRT 3\n",
"ETP-ALL 2\n",
"Astrocytoma 3\n",
"Other Sarcoma 2\n",
"ETP-ALL 2\n",
"Colon Carcinoma 1\n",
"Small Cell Carcinoma 1\n",
"Rhabdoid 1\n",
"Small Cell Carcinoma 1\n",
"Name: Histology.Detailed, dtype: int64"
]
},
Expand Down Expand Up @@ -902,7 +902,155 @@
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"outputs": [
{
"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>Model</th>\n",
" <th>ALK</th>\n",
" <th>BRAF</th>\n",
" <th>CIC</th>\n",
" <th>DMD</th>\n",
" <th>HRAS</th>\n",
" <th>KRAS</th>\n",
" <th>NF1</th>\n",
" <th>NRAS</th>\n",
" <th>PTPN11</th>\n",
" <th>SOS1</th>\n",
" <th>TP53</th>\n",
" <th>Histology_Full</th>\n",
" <th>ras_status</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ALL-03</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>MLL-ALL</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>ALL-07</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>BCP-ALL</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>ALL-08</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>T-ALL</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>ALL-108</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>Ph-likeALL</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>ALL-115</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>BCP-ALL</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Model ALK BRAF CIC DMD HRAS KRAS NF1 NRAS PTPN11 SOS1 TP53 \\\n",
"0 ALL-03 1 0 0 0 0 0 0 0 0 0 0 \n",
"1 ALL-07 0 0 0 0 0 1 0 0 0 0 0 \n",
"2 ALL-08 0 0 0 1 0 0 0 0 0 0 0 \n",
"3 ALL-108 0 0 0 0 0 1 0 0 0 0 0 \n",
"4 ALL-115 0 0 0 0 0 0 0 0 0 0 1 \n",
"\n",
" Histology_Full ras_status \n",
"0 MLL-ALL 1 \n",
"1 BCP-ALL 1 \n",
"2 T-ALL 1 \n",
"3 Ph-likeALL 1 \n",
"4 BCP-ALL 0 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Ras Pathway Alterations\n",
"ras_genes = ['ALK', 'NF1', 'PTPN11', 'BRAF', 'CIC', 'KRAS', 'HRAS', 'NRAS', 'DMD', 'SOS1']\n",
Expand All @@ -911,7 +1059,9 @@
" full_status_df\n",
" .assign(ras_status = full_status_df.loc[:, ras_genes]\n",
" .max(axis='columns'))\n",
")"
")\n",
"\n",
"full_status_df.head()"
]
},
{
Expand Down Expand Up @@ -1103,22 +1253,22 @@
"T-ALL 19\n",
"Ph-likeALL 15\n",
"Wilms 13\n",
"Ewing Sarcoma 10\n",
"MLL-ALL 10\n",
"Ewing Sarcoma 10\n",
"ATRT 8\n",
"Alveolar Rhabdomyosarcoma 7\n",
"Embryonal Rhabdomyosarcoma 7\n",
"PNET 7\n",
"Alveolar Rhabdomyosarcoma 7\n",
"ETP-ALL 6\n",
"Glioblastoma 6\n",
"Ependymoma 6\n",
"Glioblastoma 6\n",
"Rhabdoid 5\n",
"Other Sarcoma 3\n",
"Ph+-ALL 3\n",
"Other Sarcoma 3\n",
"DIPG 2\n",
"Astrocytoma 2\n",
"Small Cell Carcinoma 2\n",
"Other Renal 2\n",
"Astrocytoma 2\n",
"CNS germinoma 1\n",
"Colon Carcinoma 1\n",
"Name: Histology-Detailed, dtype: int64"
Expand Down Expand Up @@ -1992,7 +2142,7 @@
"scores_file = os.path.join(\"results\", \"classifier_scores_with_clinical_and_alterations.tsv\")\n",
"genes = ras_genes + ['TP53']\n",
"\n",
"scores_df.drop(['Model_x', 'Model_y', 'Histology_Full'], axis='columns')\n",
"scores_df = scores_df.drop(['Model_x', 'Model_y', 'Histology_Full'], axis='columns')\n",
"scores_df[genes] = scores_df[genes].fillna(value=0)\n",
"\n",
"scores_df.sort_values(by='sample_id').to_csv(scores_file, sep='\\t', index=False)"
Expand Down Expand Up @@ -2020,9 +2170,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:target-classification]",
"display_name": "Python [conda env:expression-classification]",
"language": "python",
"name": "conda-env-target-classification-py"
"name": "conda-env-expression-classification-py"
},
"language_info": {
"codemirror_mode": {
Expand Down
Binary file modified figures/NF1_confidence_scores.pdf
Binary file not shown.
Binary file modified figures/NF1_predictions.pdf
Binary file not shown.
Binary file modified figures/Ras_confidence_scores.pdf
Binary file not shown.
Binary file modified figures/Ras_predictions.pdf
Binary file not shown.
Binary file modified figures/TP53_confidence_scores.pdf
Binary file not shown.
Binary file modified figures/TP53_osteosarcoma_variant_classification.pdf
Binary file not shown.
Binary file modified figures/TP53_predictions.pdf
Binary file not shown.
Binary file modified figures/TP53_variant_classification.pdf
Binary file not shown.
Binary file modified figures/classifier_precision_recall_curve.pdf
Binary file not shown.
Binary file modified figures/classifier_roc_curve.pdf
Binary file not shown.
Binary file modified figures/histology_NF1_predictions.pdf
Binary file not shown.
Binary file modified figures/histology_Ras_predictions.pdf
Binary file not shown.
Binary file modified figures/histology_TP53_predictions.pdf
Binary file not shown.
Loading

0 comments on commit 2f35453

Please sign in to comment.