From 2725bb828a48eaf032d62a1ced2e869dc13f1515 Mon Sep 17 00:00:00 2001 From: Cannon Date: Wed, 2 Oct 2024 08:55:33 -0400 Subject: [PATCH] in progress, therapeutic distributions with and without braf continued --- notebooks/therapeutics.ipynb | 4933 +++++++++++++++++++++++++++++++--- 1 file changed, 4558 insertions(+), 375 deletions(-) diff --git a/notebooks/therapeutics.ipynb b/notebooks/therapeutics.ipynb index d0d16933..7f013646 100644 --- a/notebooks/therapeutics.ipynb +++ b/notebooks/therapeutics.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 144, "metadata": {}, "outputs": [], "source": [ @@ -77,7 +77,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 147, "metadata": {}, "outputs": [ { @@ -417,7 +417,7 @@ "[1042 rows x 15 columns]" ] }, - "execution_count": 11, + "execution_count": 147, "metadata": {}, "output_type": "execute_result" } @@ -555,7 +555,7 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 149, "metadata": {}, "outputs": [ { @@ -3595,7 +3595,7 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 148, "metadata": {}, "outputs": [ { @@ -3935,7 +3935,7 @@ "[160 rows x 15 columns]" ] }, - "execution_count": 71, + "execution_count": 148, "metadata": {}, "output_type": "execute_result" } @@ -3984,359 +3984,6 @@ "braf_df['therapeutic_label'].value_counts()" ] }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
study_allele_originstudy_idstudy_directionstudy_predicatestudy_typevariant_mp_scorevariant_idvariant_labelvariant_typetherapeutic_typetherapeutic_civic_typetherapeutic_idtherapeutic_labelnumber_of_componentscombination_therapy_components
0somaticcivic.eid:9851supportspredictsSensitivityToVariantTherapeuticResponseStudy1378.5civic.mpid:12BRAF V600E[{\"label\": \"missense_variant\", \"system\": \"http...CombinationTherapyCOMBINATIONcivic.ctid:P1PY89shAjemg7jquQ0V9pg1VnYnkPeKNone2[{'id': 'civic.tid:16', 'regulatory_approval':...
1somaticcivic.eid:3017supportspredictsSensitivityToVariantTherapeuticResponseStudy1378.5civic.mpid:12BRAF V600E[{\"label\": \"missense_variant\", \"system\": \"http...CombinationTherapyCOMBINATIONcivic.ctid:oBrlcO23adoVXv51xh-5Wigy0QyDWtfrNone2[{'id': 'civic.tid:19', 'regulatory_approval':...
2somaticcivic.eid:95supportspredictsSensitivityToVariantTherapeuticResponseStudy1378.5civic.mpid:12BRAF V600E[{\"label\": \"missense_variant\", \"system\": \"http...CombinationTherapyCOMBINATIONcivic.ctid:oBrlcO23adoVXv51xh-5Wigy0QyDWtfrNone2[{'id': 'civic.tid:19', 'regulatory_approval':...
3somaticcivic.eid:6178supportspredictsSensitivityToVariantTherapeuticResponseStudy1378.5civic.mpid:12BRAF V600E[{\"label\": \"missense_variant\", \"system\": \"http...CombinationTherapyCOMBINATIONcivic.ctid:oBrlcO23adoVXv51xh-5Wigy0QyDWtfrNone2[{'id': 'civic.tid:19', 'regulatory_approval':...
4somaticcivic.eid:6938supportspredictsSensitivityToVariantTherapeuticResponseStudy1378.5civic.mpid:12BRAF V600E[{\"label\": \"missense_variant\", \"system\": \"http...CombinationTherapyCOMBINATIONcivic.ctid:oBrlcO23adoVXv51xh-5Wigy0QyDWtfrNone2[{'id': 'civic.tid:19', 'regulatory_approval':...
................................................
57somaticmoa.assertion:175nonepredictsSensitivityToVariantTherapeuticResponseStudyNaNmoa.variant:144BRAF p.V600E (Missense)NoneCombinationTherapyNonemoa.ctid:J6xxQq1WklikTAih34aBaq6sFBL6qadnNone2[{'id': 'moa.normalize.therapy.ncit:C2220', 'l...
58somaticmoa.assertion:181nonepredictsSensitivityToVariantTherapeuticResponseStudyNaNmoa.variant:144BRAF p.V600E (Missense)NoneCombinationTherapyNonemoa.ctid:GwC0qAqMmwEYv60lDakdpPM6IVMIhAy_None2[{'id': 'moa.normalize.therapy.rxcui:1147220',...
59somaticmoa.assertion:184nonepredictsSensitivityToVariantTherapeuticResponseStudyNaNmoa.variant:144BRAF p.V600E (Missense)NoneCombinationTherapyNonemoa.ctid:fDe-2sEQxMUyi876GGxkoeGnzFayuyFoNone2[{'id': 'moa.normalize.therapy.rxcui:1147220',...
60somaticmoa.assertion:865nonepredictsSensitivityToVariantTherapeuticResponseStudyNaNmoa.variant:144BRAF p.V600E (Missense)NoneCombinationTherapyNonemoa.ctid:IAMn2xc8QDzi0_zvPzrGlronyv01CoqsNone2[{'id': 'moa.normalize.therapy.rxcui:1424911',...
61somaticmoa.assertion:911nonepredictsSensitivityToVariantTherapeuticResponseStudyNaNmoa.variant:144BRAF p.V600E (Missense)NoneCombinationTherapyNonemoa.ctid:PGEv4QIKz-vDJF0eyrAfZYTl1fFtDNokNone2[{'id': 'moa.normalize.therapy.rxcui:2049122',...
\n", - "

62 rows × 15 columns

\n", - "
" - ], - "text/plain": [ - " study_allele_origin study_id study_direction \\\n", - "0 somatic civic.eid:9851 supports \n", - "1 somatic civic.eid:3017 supports \n", - "2 somatic civic.eid:95 supports \n", - "3 somatic civic.eid:6178 supports \n", - "4 somatic civic.eid:6938 supports \n", - ".. ... ... ... \n", - "57 somatic moa.assertion:175 none \n", - "58 somatic moa.assertion:181 none \n", - "59 somatic moa.assertion:184 none \n", - "60 somatic moa.assertion:865 none \n", - "61 somatic moa.assertion:911 none \n", - "\n", - " study_predicate study_type variant_mp_score \\\n", - "0 predictsSensitivityTo VariantTherapeuticResponseStudy 1378.5 \n", - "1 predictsSensitivityTo VariantTherapeuticResponseStudy 1378.5 \n", - "2 predictsSensitivityTo VariantTherapeuticResponseStudy 1378.5 \n", - "3 predictsSensitivityTo VariantTherapeuticResponseStudy 1378.5 \n", - "4 predictsSensitivityTo VariantTherapeuticResponseStudy 1378.5 \n", - ".. ... ... ... \n", - "57 predictsSensitivityTo VariantTherapeuticResponseStudy NaN \n", - "58 predictsSensitivityTo VariantTherapeuticResponseStudy NaN \n", - "59 predictsSensitivityTo VariantTherapeuticResponseStudy NaN \n", - "60 predictsSensitivityTo VariantTherapeuticResponseStudy NaN \n", - "61 predictsSensitivityTo VariantTherapeuticResponseStudy NaN \n", - "\n", - " variant_id variant_label \\\n", - "0 civic.mpid:12 BRAF V600E \n", - "1 civic.mpid:12 BRAF V600E \n", - "2 civic.mpid:12 BRAF V600E \n", - "3 civic.mpid:12 BRAF V600E \n", - "4 civic.mpid:12 BRAF V600E \n", - ".. ... ... \n", - "57 moa.variant:144 BRAF p.V600E (Missense) \n", - "58 moa.variant:144 BRAF p.V600E (Missense) \n", - "59 moa.variant:144 BRAF p.V600E (Missense) \n", - "60 moa.variant:144 BRAF p.V600E (Missense) \n", - "61 moa.variant:144 BRAF p.V600E (Missense) \n", - "\n", - " variant_type therapeutic_type \\\n", - "0 [{\"label\": \"missense_variant\", \"system\": \"http... CombinationTherapy \n", - "1 [{\"label\": \"missense_variant\", \"system\": \"http... CombinationTherapy \n", - "2 [{\"label\": \"missense_variant\", \"system\": \"http... CombinationTherapy \n", - "3 [{\"label\": \"missense_variant\", \"system\": \"http... CombinationTherapy \n", - "4 [{\"label\": \"missense_variant\", \"system\": \"http... CombinationTherapy \n", - ".. ... ... \n", - "57 None CombinationTherapy \n", - "58 None CombinationTherapy \n", - "59 None CombinationTherapy \n", - "60 None CombinationTherapy \n", - "61 None CombinationTherapy \n", - "\n", - " therapeutic_civic_type therapeutic_id \\\n", - "0 COMBINATION civic.ctid:P1PY89shAjemg7jquQ0V9pg1VnYnkPeK \n", - "1 COMBINATION civic.ctid:oBrlcO23adoVXv51xh-5Wigy0QyDWtfr \n", - "2 COMBINATION civic.ctid:oBrlcO23adoVXv51xh-5Wigy0QyDWtfr \n", - "3 COMBINATION civic.ctid:oBrlcO23adoVXv51xh-5Wigy0QyDWtfr \n", - "4 COMBINATION civic.ctid:oBrlcO23adoVXv51xh-5Wigy0QyDWtfr \n", - ".. ... ... \n", - "57 None moa.ctid:J6xxQq1WklikTAih34aBaq6sFBL6qadn \n", - "58 None moa.ctid:GwC0qAqMmwEYv60lDakdpPM6IVMIhAy_ \n", - "59 None moa.ctid:fDe-2sEQxMUyi876GGxkoeGnzFayuyFo \n", - "60 None moa.ctid:IAMn2xc8QDzi0_zvPzrGlronyv01Coqs \n", - "61 None moa.ctid:PGEv4QIKz-vDJF0eyrAfZYTl1fFtDNok \n", - "\n", - " therapeutic_label number_of_components \\\n", - "0 None 2 \n", - "1 None 2 \n", - "2 None 2 \n", - "3 None 2 \n", - "4 None 2 \n", - ".. ... ... \n", - "57 None 2 \n", - "58 None 2 \n", - "59 None 2 \n", - "60 None 2 \n", - "61 None 2 \n", - "\n", - " combination_therapy_components \n", - "0 [{'id': 'civic.tid:16', 'regulatory_approval':... \n", - "1 [{'id': 'civic.tid:19', 'regulatory_approval':... \n", - "2 [{'id': 'civic.tid:19', 'regulatory_approval':... \n", - "3 [{'id': 'civic.tid:19', 'regulatory_approval':... \n", - "4 [{'id': 'civic.tid:19', 'regulatory_approval':... \n", - ".. ... \n", - "57 [{'id': 'moa.normalize.therapy.ncit:C2220', 'l... \n", - "58 [{'id': 'moa.normalize.therapy.rxcui:1147220',... \n", - "59 [{'id': 'moa.normalize.therapy.rxcui:1147220',... \n", - "60 [{'id': 'moa.normalize.therapy.rxcui:1424911',... \n", - "61 [{'id': 'moa.normalize.therapy.rxcui:2049122',... \n", - "\n", - "[62 rows x 15 columns]" - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Filter for Combination Therapies\n", - "braf_df = braf_df[braf_df['number_of_components'] > 0].reset_index(drop=True)\n", - "braf_df" - ] - }, { "cell_type": "code", "execution_count": 66, @@ -4376,7 +4023,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 150, "metadata": {}, "outputs": [], "source": [ @@ -4400,7 +4047,7 @@ }, { "cell_type": "code", - "execution_count": 89, + "execution_count": 151, "metadata": {}, "outputs": [ { @@ -4418,15 +4065,31 @@ "/var/folders/5t/sfw5tjx56m10xb861_pd3wfm0000gq/T/ipykernel_11898/1451180034.py:10: DeprecationWarning:\n", "\n", "Using a driver after it has been closed is deprecated. Future versions of the driver will raise an error.\n", - "\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
combination_componentsbraf_countgeneral_countnot_braf_counttotal_countLabels
29(Dabrafenib, Trametinib)2424048None
19(Cetuximab, Irinotecan)2141228None
32(Dactolisib, Selumetinib)19818None
45(Lapatinib, Neratinib, Trastuzumab)0448None
20(Cetuximab, Irinotecan, Vemurafenib)2428('Dabrafenib', 'Trametinib')
16(Cetuximab, Encorafenib)2204None
55(Panitumumab, Vemurafenib)2204('Dabrafenib', 'Trametinib')
46(Lapatinib, Trastuzumab)0224None
42(Ipilimumab, Vemurafenib)2204None
35(Docetaxel, Selumetinib)0224None
25(Cobimetinib, Vemurafenib)2204None
17(Cetuximab, Fluorouracil, Oxaliplatin)0224('Dabrafenib', 'Trametinib')
0(Adagrasib, Cetuximab)0224None
8(Binimetinib, Cetuximab, Encorafenib)2204('Cetuximab', 'Encorafenib')
2(Alpelisib, Fulvestrant)0224None
4(BRAF Inhibitor, Mitogen-Activated Protein Kin...2204None
3(Azacitidine, Ivosidenib)0224None
13(Capivasertib, Trastuzumab)0112None
38(Erlotinib, Vemurafenib)1102None
39(Everolimus, Fulvestrant)0112None
40(Fluorouracil, Leucovorin, Trastuzumab)0112None
41(Interferon-alpha, Ixazomib)1102None
5(Bevacizumab, Capecitabine, Oxaliplatin)1102None
43(Irinotecan, Panitumumab)1102('Cobimetinib', 'Vemurafenib')
44(Irinotecan, Panitumumab, Vemurafenib)1102None
47(Letrozole, Palbociclib)0112None
36(Durvalumab, Osimertinib)0112None
48(Lometrexol, Mercaptopurine)0112None
49(Neratinib, Vemurafenib)1102('Cetuximab', 'Irinotecan', 'Vemurafenib')
50(Nutlin-3, PLX4720)1102None
51(Olaparib, Temozolomide)0112None
52(PLX4720, Pictilisib Bismesylate)1102('Cisplatin', 'Fluorouracil')
53(Panitumumab, Sorafenib)1102None
54(Panitumumab, Trametinib)1102None
56(Pertuzumab, Vemurafenib)1102None
37(Erlotinib, Pemetrexed)0112None
6(Bevacizumab, Capecitabine, Vemurafenib)1102('Alpelisib', 'Fulvestrant')
14(Carboplatin, Paclitaxel)0112None
23(Cisplatin, Fluorouracil)0112None
15(Cetuximab, Dactolisib)0112None
12(Capivasertib, PI3K/BET Inhibitor LY294002)0112None
11(Capivasertib, Lapatinib)0112('Alpelisib', 'Fulvestrant')
18(Cetuximab, Gefitinib, Vemurafenib)1102None
10(Binimetinib, Everolimus)0112('Adagrasib', 'Cetuximab')
9(Binimetinib, Encorafenib)1102('Dabrafenib', 'Trametinib')
21(Cetuximab, Vemurafenib)1102('Dabrafenib', 'Trametinib')
22(Checkpoint Kinase Inhibitor AZD7762, Irinotecan)0112('Binimetinib', 'Cetuximab', 'Encorafenib')
24(Cisplatin, Pictilisib)0112None
34(Daunorubicin, Sunitinib)0112None
26(Cytarabine, Sunitinib)0112None
27(Dabrafenib, Omipalisib)1102None
28(Dabrafenib, Panitumumab, Trametinib)1102None
1(Akt Inhibitor MK2206, Vemurafenib)0112None
30(Dabrafenib, Trametinib, Vemurafenib)1102None
31(Dactolisib, GDC-0879)1102None
7(Bevacizumab, Dabrafenib)1102None
33(Dasatinib, Erlotinib)0112None
57(Trametinib, Vemurafenib)1102('Dabrafenib', 'Panitumumab', 'Trametinib')
\n", + "
" + ], + "text/plain": [ + " combination_components braf_count \\\n", + "29 (Dabrafenib, Trametinib) 24 \n", + "19 (Cetuximab, Irinotecan) 2 \n", + "32 (Dactolisib, Selumetinib) 1 \n", + "45 (Lapatinib, Neratinib, Trastuzumab) 0 \n", + "20 (Cetuximab, Irinotecan, Vemurafenib) 2 \n", + "16 (Cetuximab, Encorafenib) 2 \n", + "55 (Panitumumab, Vemurafenib) 2 \n", + "46 (Lapatinib, Trastuzumab) 0 \n", + "42 (Ipilimumab, Vemurafenib) 2 \n", + "35 (Docetaxel, Selumetinib) 0 \n", + "25 (Cobimetinib, Vemurafenib) 2 \n", + "17 (Cetuximab, Fluorouracil, Oxaliplatin) 0 \n", + "0 (Adagrasib, Cetuximab) 0 \n", + "8 (Binimetinib, Cetuximab, Encorafenib) 2 \n", + "2 (Alpelisib, Fulvestrant) 0 \n", + "4 (BRAF Inhibitor, Mitogen-Activated Protein Kin... 2 \n", + "3 (Azacitidine, Ivosidenib) 0 \n", + "13 (Capivasertib, Trastuzumab) 0 \n", + "38 (Erlotinib, Vemurafenib) 1 \n", + "39 (Everolimus, Fulvestrant) 0 \n", + "40 (Fluorouracil, Leucovorin, Trastuzumab) 0 \n", + "41 (Interferon-alpha, Ixazomib) 1 \n", + "5 (Bevacizumab, Capecitabine, Oxaliplatin) 1 \n", + "43 (Irinotecan, Panitumumab) 1 \n", + "44 (Irinotecan, Panitumumab, Vemurafenib) 1 \n", + "47 (Letrozole, Palbociclib) 0 \n", + "36 (Durvalumab, Osimertinib) 0 \n", + "48 (Lometrexol, Mercaptopurine) 0 \n", + "49 (Neratinib, Vemurafenib) 1 \n", + "50 (Nutlin-3, PLX4720) 1 \n", + "51 (Olaparib, Temozolomide) 0 \n", + "52 (PLX4720, Pictilisib Bismesylate) 1 \n", + "53 (Panitumumab, Sorafenib) 1 \n", + "54 (Panitumumab, Trametinib) 1 \n", + "56 (Pertuzumab, Vemurafenib) 1 \n", + "37 (Erlotinib, Pemetrexed) 0 \n", + "6 (Bevacizumab, Capecitabine, Vemurafenib) 1 \n", + "14 (Carboplatin, Paclitaxel) 0 \n", + "23 (Cisplatin, Fluorouracil) 0 \n", + "15 (Cetuximab, Dactolisib) 0 \n", + "12 (Capivasertib, PI3K/BET Inhibitor LY294002) 0 \n", + "11 (Capivasertib, Lapatinib) 0 \n", + "18 (Cetuximab, Gefitinib, Vemurafenib) 1 \n", + "10 (Binimetinib, Everolimus) 0 \n", + "9 (Binimetinib, Encorafenib) 1 \n", + "21 (Cetuximab, Vemurafenib) 1 \n", + "22 (Checkpoint Kinase Inhibitor AZD7762, Irinotecan) 0 \n", + "24 (Cisplatin, Pictilisib) 0 \n", + "34 (Daunorubicin, Sunitinib) 0 \n", + "26 (Cytarabine, Sunitinib) 0 \n", + "27 (Dabrafenib, Omipalisib) 1 \n", + "28 (Dabrafenib, Panitumumab, Trametinib) 1 \n", + "1 (Akt Inhibitor MK2206, Vemurafenib) 0 \n", + "30 (Dabrafenib, Trametinib, Vemurafenib) 1 \n", + "31 (Dactolisib, GDC-0879) 1 \n", + "7 (Bevacizumab, Dabrafenib) 1 \n", + "33 (Dasatinib, Erlotinib) 0 \n", + "57 (Trametinib, Vemurafenib) 1 \n", + "\n", + " general_count not_braf_count total_count \\\n", + "29 24 0 48 \n", + "19 14 12 28 \n", + "32 9 8 18 \n", + "45 4 4 8 \n", + "20 4 2 8 \n", + "16 2 0 4 \n", + "55 2 0 4 \n", + "46 2 2 4 \n", + "42 2 0 4 \n", + "35 2 2 4 \n", + "25 2 0 4 \n", + "17 2 2 4 \n", + "0 2 2 4 \n", + "8 2 0 4 \n", + "2 2 2 4 \n", + "4 2 0 4 \n", + "3 2 2 4 \n", + "13 1 1 2 \n", + "38 1 0 2 \n", + "39 1 1 2 \n", + "40 1 1 2 \n", + "41 1 0 2 \n", + "5 1 0 2 \n", + "43 1 0 2 \n", + "44 1 0 2 \n", + "47 1 1 2 \n", + "36 1 1 2 \n", + "48 1 1 2 \n", + "49 1 0 2 \n", + "50 1 0 2 \n", + "51 1 1 2 \n", + "52 1 0 2 \n", + "53 1 0 2 \n", + "54 1 0 2 \n", + "56 1 0 2 \n", + "37 1 1 2 \n", + "6 1 0 2 \n", + "14 1 1 2 \n", + "23 1 1 2 \n", + "15 1 1 2 \n", + "12 1 1 2 \n", + "11 1 1 2 \n", + "18 1 0 2 \n", + "10 1 1 2 \n", + "9 1 0 2 \n", + "21 1 0 2 \n", + "22 1 1 2 \n", + "24 1 1 2 \n", + "34 1 1 2 \n", + "26 1 1 2 \n", + "27 1 0 2 \n", + "28 1 0 2 \n", + "1 1 1 2 \n", + "30 1 0 2 \n", + "31 1 0 2 \n", + "7 1 0 2 \n", + "33 1 1 2 \n", + "57 1 0 2 \n", + "\n", + " Labels \n", + "29 None \n", + "19 None \n", + "32 None \n", + "45 None \n", + "20 ('Dabrafenib', 'Trametinib') \n", + "16 None \n", + "55 ('Dabrafenib', 'Trametinib') \n", + "46 None \n", + "42 None \n", + "35 None \n", + "25 None \n", + "17 ('Dabrafenib', 'Trametinib') \n", + "0 None \n", + "8 ('Cetuximab', 'Encorafenib') \n", + "2 None \n", + "4 None \n", + "3 None \n", + "13 None \n", + "38 None \n", + "39 None \n", + "40 None \n", + "41 None \n", + "5 None \n", + "43 ('Cobimetinib', 'Vemurafenib') \n", + "44 None \n", + "47 None \n", + "36 None \n", + "48 None \n", + "49 ('Cetuximab', 'Irinotecan', 'Vemurafenib') \n", + "50 None \n", + "51 None \n", + "52 ('Cisplatin', 'Fluorouracil') \n", + "53 None \n", + "54 None \n", + "56 None \n", + "37 None \n", + "6 ('Alpelisib', 'Fulvestrant') \n", + "14 None \n", + "23 None \n", + "15 None \n", + "12 None \n", + "11 ('Alpelisib', 'Fulvestrant') \n", + "18 None \n", + "10 ('Adagrasib', 'Cetuximab') \n", + "9 ('Dabrafenib', 'Trametinib') \n", + "21 ('Dabrafenib', 'Trametinib') \n", + "22 ('Binimetinib', 'Cetuximab', 'Encorafenib') \n", + "24 None \n", + "34 None \n", + "26 None \n", + "27 None \n", + "28 None \n", + "1 None \n", + "30 None \n", + "31 None \n", + "7 None \n", + "33 None \n", + "57 ('Dabrafenib', 'Panitumumab', 'Trametinib') " + ] + }, + "execution_count": 160, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sorted_df" + ] + }, + { + "cell_type": "code", + "execution_count": 163, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "alignmentgroup": "True", + "hovertemplate": "Dataset=braf_count
Labels=%{x}
Count=%{y}", + "legendgroup": "braf_count", + "marker": { + "color": "#636efa", + "pattern": { + "shape": "" + } + }, + "name": "braf_count", + "offsetgroup": "braf_count", + "orientation": "v", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + "('Dabrafenib', 'Trametinib')", + "('Cetuximab', 'Irinotecan')", + "('Dactolisib', 'Selumetinib')", + "('Lapatinib', 'Neratinib', 'Trastuzumab')", + "('Cetuximab', 'Irinotecan', 'Vemurafenib')", + "('Cetuximab', 'Encorafenib')", + "('Panitumumab', 'Vemurafenib')", + "('Lapatinib', 'Trastuzumab')", + "('Ipilimumab', 'Vemurafenib')", + "('Docetaxel', 'Selumetinib')", + "('Cobimetinib', 'Vemurafenib')", + "('Cetuximab', 'Fluorouracil', 'Oxaliplatin')", + "('Adagrasib', 'Cetuximab')", + "('Binimetinib', 'Cetuximab', 'Encorafenib')", + "('Alpelisib', 'Fulvestrant')", + "('BRAF Inhibitor', 'Mitogen-Activated Protein Kinase Kinase Inhibitor')", + "('Azacitidine', 'Ivosidenib')", + "('Capivasertib', 'Trastuzumab')", + "('Erlotinib', 'Vemurafenib')", + "('Everolimus', 'Fulvestrant')", + "('Fluorouracil', 'Leucovorin', 'Trastuzumab')", + "('Interferon-alpha', 'Ixazomib')", + "('Bevacizumab', 'Capecitabine', 'Oxaliplatin')", + "('Irinotecan', 'Panitumumab')", + "('Irinotecan', 'Panitumumab', 'Vemurafenib')", + "('Letrozole', 'Palbociclib')", + "('Durvalumab', 'Osimertinib')", + "('Lometrexol', 'Mercaptopurine')", + "('Neratinib', 'Vemurafenib')", + "('Nutlin-3', 'PLX4720')", + "('Olaparib', 'Temozolomide')", + "('PLX4720', 'Pictilisib Bismesylate')", + "('Panitumumab', 'Sorafenib')", + "('Panitumumab', 'Trametinib')", + "('Pertuzumab', 'Vemurafenib')", + "('Erlotinib', 'Pemetrexed')", + "('Bevacizumab', 'Capecitabine', 'Vemurafenib')", + "('Carboplatin', 'Paclitaxel')", + "('Cisplatin', 'Fluorouracil')", + "('Cetuximab', 'Dactolisib')", + "('Capivasertib', 'PI3K/BET Inhibitor LY294002')", + "('Capivasertib', 'Lapatinib')", + "('Cetuximab', 'Gefitinib', 'Vemurafenib')", + "('Binimetinib', 'Everolimus')", + "('Binimetinib', 'Encorafenib')", + "('Cetuximab', 'Vemurafenib')", + "('Checkpoint Kinase Inhibitor AZD7762', 'Irinotecan')", + "('Cisplatin', 'Pictilisib')", + "('Daunorubicin', 'Sunitinib')", + "('Cytarabine', 'Sunitinib')", + "('Dabrafenib', 'Omipalisib')", + "('Dabrafenib', 'Panitumumab', 'Trametinib')", + "('Akt Inhibitor MK2206', 'Vemurafenib')", + "('Dabrafenib', 'Trametinib', 'Vemurafenib')", + "('Dactolisib', 'GDC-0879')", + "('Bevacizumab', 'Dabrafenib')", + "('Dasatinib', 'Erlotinib')", + "('Trametinib', 'Vemurafenib')" + ], + "xaxis": "x", + "y": [ + 24, + 2, + 1, + 0, + 2, + 2, + 2, + 0, + 2, + 0, + 2, + 0, + 0, + 2, + 0, + 2, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 1 + ], + "yaxis": "y" + }, + { + "alignmentgroup": "True", + "hovertemplate": "Dataset=not_braf_count
Labels=%{x}
Count=%{y}", + "legendgroup": "not_braf_count", + "marker": { + "color": "#EF553B", + "pattern": { + "shape": "" + } + }, + "name": "not_braf_count", + "offsetgroup": "not_braf_count", + "orientation": "v", + "showlegend": true, + "textposition": "auto", + "type": "bar", + "x": [ + "('Dabrafenib', 'Trametinib')", + "('Cetuximab', 'Irinotecan')", + "('Dactolisib', 'Selumetinib')", + "('Lapatinib', 'Neratinib', 'Trastuzumab')", + "('Cetuximab', 'Irinotecan', 'Vemurafenib')", + "('Cetuximab', 'Encorafenib')", + "('Panitumumab', 'Vemurafenib')", + "('Lapatinib', 'Trastuzumab')", + "('Ipilimumab', 'Vemurafenib')", + "('Docetaxel', 'Selumetinib')", + "('Cobimetinib', 'Vemurafenib')", + "('Cetuximab', 'Fluorouracil', 'Oxaliplatin')", + "('Adagrasib', 'Cetuximab')", + "('Binimetinib', 'Cetuximab', 'Encorafenib')", + "('Alpelisib', 'Fulvestrant')", + "('BRAF Inhibitor', 'Mitogen-Activated Protein Kinase Kinase Inhibitor')", + "('Azacitidine', 'Ivosidenib')", + "('Capivasertib', 'Trastuzumab')", + "('Erlotinib', 'Vemurafenib')", + "('Everolimus', 'Fulvestrant')", + "('Fluorouracil', 'Leucovorin', 'Trastuzumab')", + "('Interferon-alpha', 'Ixazomib')", + "('Bevacizumab', 'Capecitabine', 'Oxaliplatin')", + "('Irinotecan', 'Panitumumab')", + "('Irinotecan', 'Panitumumab', 'Vemurafenib')", + "('Letrozole', 'Palbociclib')", + "('Durvalumab', 'Osimertinib')", + "('Lometrexol', 'Mercaptopurine')", + "('Neratinib', 'Vemurafenib')", + "('Nutlin-3', 'PLX4720')", + "('Olaparib', 'Temozolomide')", + "('PLX4720', 'Pictilisib Bismesylate')", + "('Panitumumab', 'Sorafenib')", + "('Panitumumab', 'Trametinib')", + "('Pertuzumab', 'Vemurafenib')", + "('Erlotinib', 'Pemetrexed')", + "('Bevacizumab', 'Capecitabine', 'Vemurafenib')", + "('Carboplatin', 'Paclitaxel')", + "('Cisplatin', 'Fluorouracil')", + "('Cetuximab', 'Dactolisib')", + "('Capivasertib', 'PI3K/BET Inhibitor LY294002')", + "('Capivasertib', 'Lapatinib')", + "('Cetuximab', 'Gefitinib', 'Vemurafenib')", + "('Binimetinib', 'Everolimus')", + "('Binimetinib', 'Encorafenib')", + "('Cetuximab', 'Vemurafenib')", + "('Checkpoint Kinase Inhibitor AZD7762', 'Irinotecan')", + "('Cisplatin', 'Pictilisib')", + "('Daunorubicin', 'Sunitinib')", + "('Cytarabine', 'Sunitinib')", + "('Dabrafenib', 'Omipalisib')", + "('Dabrafenib', 'Panitumumab', 'Trametinib')", + "('Akt Inhibitor MK2206', 'Vemurafenib')", + "('Dabrafenib', 'Trametinib', 'Vemurafenib')", + "('Dactolisib', 'GDC-0879')", + "('Bevacizumab', 'Dabrafenib')", + "('Dasatinib', 'Erlotinib')", + "('Trametinib', 'Vemurafenib')" + ], + "xaxis": "x", + "y": [ + 0, + 12, + 8, + 4, + 2, + 0, + 0, + 2, + 0, + 2, + 0, + 2, + 2, + 0, + 2, + 0, + 2, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0 + ], + "yaxis": "y" + } + ], + "layout": { + "barmode": "stack", + "legend": { + "title": { + "text": "Dataset" + }, + "tracegroupgap": 0 + }, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Therapeutic Label Counts Sorted by Total Count" + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 1 + ], + "title": { + "text": "Labels" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "title": { + "text": "Count" + } + } + } + } + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import pandas as pd\n", + "import plotly.express as px\n", + "\n", + "# Assuming 'combined_df' is already created as before\n", + "\n", + "# Add a new column for the total counts\n", + "combined_df['total_count'] = combined_df[['braf_count', 'general_count', 'not_braf_count']].sum(axis=1)\n", + "\n", + "# Sort the DataFrame by the total counts in ascending order\n", + "sorted_df = combined_df.sort_values('total_count', ascending=False)\n", + "sorted_df['Labels'] = sorted_df['combination_components'].apply(lambda x: str(x))\n", + "\n", + "# Create a bar plot for each therapeutic label count\n", + "fig = px.bar(sorted_df, x='Labels', y=['braf_count', 'not_braf_count'], \n", + " title='Therapeutic Label Counts Sorted by Total Count',\n", + " labels={'value': 'Count', 'variable': 'Dataset'},\n", + " barmode='stack')\n", + "\n", + "# Show the figure\n", + "fig.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 167, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'count': [62, 58], 'category': ['BRAF', 'Not BRAF']}" + ] + }, + "execution_count": 167, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "\n", + "data = {\n", + " 'count': [sorted_df['braf_count'].sum(), sorted_df['not_braf_count'].sum()],\n", + " 'category': ['BRAF','Not BRAF'],\n", + "}\n", + "data" + ] + }, + { + "cell_type": "code", + "execution_count": 173, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "domain": { + "x": [ + 0, + 1 + ], + "y": [ + 0, + 1 + ] + }, + "hoverinfo": "label+percent+value", + "hovertemplate": "category=%{label}
count=%{value}", + "labels": [ + "BRAF", + "Not BRAF" + ], + "legendgroup": "", + "name": "", + "showlegend": true, + "textinfo": "label+percent", + "textposition": "inside", + "type": "pie", + "values": [ + 62, + 58 + ] + } + ], + "layout": { + "legend": { + "tracegroupgap": 0 + }, + "margin": { + "t": 60 + }, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + } + } + } + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "fig = px.pie(pd.DataFrame(data), values='count', names='category')\n", + "\n", + "fig.update_traces(textinfo='label+percent', \n", + " hoverinfo='label+percent+value',\n", + " textposition='inside')\n", + "\n", + "fig.show()" + ] } ], "metadata": {