### Database information 
[https://www.start.umd.edu/gtd/downloads/Codebook.pdf](https://www.start.umd.edu/gtd/downloads/Codebook.pdf)
### Analysis on data set 
[https://www.kaggle.com/START-UMD/gtd#globalterrorismdb_0718dist.csv] (https://www.kaggle.com/START-UMD/gtd#globalterrorismdb_0718dist.csv)
### Adapted from 
[https://wormlabcaltech.github.io/Angeles_Leighton_2016/RNASeqAnalysis.html] (https://wormlabcaltech.github.io/Angeles_Leighton_2016/RNASeqAnalysis.html)
In [1]:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# import tissue_enrichment_analysis as tea
# import pyrnaseq_graphics as rsq
import scipy.stats as stats
import matplotlib as mpl

from IPython.core.display import HTML


# bokeh
import bokeh
# import bokeh.charts
# import bokeh.charts.utils
import bokeh.io
import bokeh.models
import bokeh.palettes
import bokeh.plotting
from bokeh.plotting import figure
from bokeh.resources import CDN
from bokeh.embed import file_html

# Display graphics in this notebook
bokeh.io.output_notebook()
Loading BokehJS ...

In [2]:
def make_expression_axes(tooltips, title,
                          xlabel, ylabel):
    """A function to plot the bokeh single mutant comparisons."""
    # Make the hover tool
    hover = bokeh.models.HoverTool(tooltips=tooltips,
                                   names=['circles'])

    # Create figure
    p = bokeh.plotting.figure(title=title, plot_width=650, 
                              plot_height=450)

    p.xgrid.grid_line_color = 'white'
    p.ygrid.grid_line_color = 'white'
    p.xaxis.axis_label = xlabel
    p.yaxis.axis_label = ylabel

    # Add the hover tool
    p.add_tools(hover)
    return p


def add_points(p, df1, x, y, se_x, color='blue', alpha=0.2, outline=False):
    # Define colors in a dictionary to access them with
    # the key from the pandas groupby funciton.
    df = df1.copy()
    transformed_q = -df[y].apply(np.log10)
    df['transformed_q'] = transformed_q
    #    FEATURE_delta_MEAN_IC50
    df['transform_e'] = list(np.sign(df[se_x])*df[x])
    source1 = bokeh.models.ColumnDataSource(df)

    # Specify data source
    p.circle(x='transform_e', y='transformed_q', size=7,
             alpha=alpha, source=source1,
             color=color, name='circles')
    if outline:
        p.circle(x='transform_e', y='transformed_q', size=7,
                 alpha=1,
                 source=source1, color='black',
                 fill_color=None, name='outlines')

    # prettify
    p.background_fill_color = "#DFDFE5"
    p.background_fill_alpha = 0.5
    
    return p

def selector(df,psig,fdrsig):
    """A function to separate tfs from everything else"""
    sig_p = (df['ANOVA_FEATURE_pval'] < psig)
    sig_fdr = (df['ANOVA_FEATURE_FDR'] < fdrsig)
    to_plot_yes = df[sig_p & sig_fdr]
    to_plot_not = df[~sig_p & ~sig_fdr]
    return to_plot_not, to_plot_yes

def replace_drugname(df):
    df = df.replace({'nkill':'Number People Killed',
                'nkillus':'Number US People Killed',
                'success':'Success',
                'propvalue':'Damaged Property Value',
                'nwound':'Number Wounded',
                'nwoundus':'Number US Wounded',
                'nhostkid':'Number Kidnapped Hostage',
                'nhostkidus':'Number Kidnapped US Hostage',
                'ndays':'Days Kidnapped Hostage',
                'nreleased':'Number Hostage Released',
                'ransomamt':'Ransom Amount',
                'ransomamtus':'Ransom Amount from US sources',
                'ransompaid':'Amount Ransom Paid',
                'ransompaidus':'Amount Ransom Paid by US sources'},inplace=True)

Middle East & North Africa

In [3]:
menadf = pd.read_csv('mideastnorthaf/html_gdsc_anova/OUTPUT/results.csv')
replace_drugname(menadf)
menadf
Out[3]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 Assassination 3 Success Hijacking 46222 4252 65.263405 89.879278 -24.615873 ... 0.816159 0.516935 3.016062e+01 47.618922 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
1 2 Eastern Province 6 Number US Wounded Hijacking 41793 7 16.142857 0.016677 16.126180 ... 25.766891 0.393695 6.258489e-01 40.961073 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
2 3 United States 6 Number US Wounded Hijacking 41447 353 1.849858 0.003788 1.846070 ... 13.057744 0.213835 1.413774e-01 8.633155 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
3 4 Target type Unknown 3 Success Hijacking 48316 2158 23.725672 90.667688 -66.942016 ... 2.301301 1.573257 2.908877e+01 42.549955 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
4 5 BombingExplosion 5 Number Wounded Hijacking 17466 29452 6.412026 1.457746 4.954280 ... 0.649003 0.243724 7.633681e+00 20.327378 4.031056e-208 4.031056e-208 NaN NaN NaN 3.773874e-203
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
4676 4677 Basra 6 Number US Wounded Hijacking 41543 257 0.019455 0.019378 0.000078 ... 0.000094 0.000303 8.244874e-01 0.256956 9.987943e-01 9.987943e-01 NaN NaN NaN 9.996485e+01
4677 4678 Soviet Union 4 Damaged Property Value Hijacking 10544 4 28250.000000 27747.652821 502.347179 ... 0.000400 0.014995 1.256292e+06 33500.000000 9.993620e-01 9.993620e-01 NaN NaN NaN 9.997900e+01
4678 4679 Northern 4 Damaged Property Value Hijacking 10490 58 27879.194655 27747.117069 132.077587 ... 0.000105 0.000759 1.259456e+06 174081.784882 9.993628e-01 9.993628e-01 NaN NaN NaN 9.997900e+01
4679 4680 Istanbul 4 Damaged Property Value Hijacking 10419 129 27794.038760 27747.271364 46.767396 ... 0.000037 0.000315 1.263699e+06 148496.716283 9.996647e-01 9.996647e-01 NaN NaN NaN 9.998783e+01
4680 4681 Firearms 14 Amount Ransom Paid by US sources Hijacking 47 47 -2.106383 -2.106383 0.000000 ... 0.000000 0.000000 1.444063e+01 14.440634 1.000000e+00 1.000000e+00 NaN NaN NaN 1.000000e+02

4681 rows × 21 columns

In [4]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'Middle East North Africa ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(menadf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[4]:
my plot

North America

In [5]:
noramdf = pd.read_csv('northam/html_gdsc_anova/OUTPUT/results.csv')
replace_drugname(noramdf)
noramdf
Out[5]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 Al-Qaida 1 Number People Killed Hijacking 3359 4 7.502500e+02 0.570110 749.679890 ... 110.759923 1.021864 6.768512e+00 7.336395e+02 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
1 2 Al-Qaida 2 Number US People Killed Hijacking 2088 4 7.267500e+02 0.297893 726.452107 ... 183.494572 1.016428 3.958984e+00 7.147108e+02 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
2 3 Al-Qaida 5 Number Wounded Hijacking 3331 4 4.123250e+03 1.512459 4121.737541 ... 175.765864 0.877594 2.345016e+01 4.696633e+03 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
3 4 Hijacking 1 Number People Killed Hijacking 3345 18 1.669444e+02 0.571300 166.373144 ... 24.529645 0.373978 6.782534e+00 4.448740e+02 2.611681e-98 2.611681e-98 NaN NaN NaN 1.068830e-93
4 5 Vehicle (not to include vehicle-borne explosiv... 1 Number People Killed Hijacking 3344 19 1.591053e+02 0.566089 158.539175 ... 23.376284 0.365573 6.782052e+00 4.336729e+02 5.130536e-94 5.130536e-94 NaN NaN NaN 1.679737e-89
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1632 1633 Incel extremists 5 Number Wounded Hijacking 3332 3 6.666667e+00 6.455882 0.210784 ... 0.001044 0.032396 2.019714e+02 6.506407e+00 9.985580e-01 9.985580e-01 NaN NaN NaN 9.991596e+01
1633 1634 Anti-Police extremists 2 Number US People Killed Hijacking 2085 7 1.714286e+00 1.686811 0.027475 ... 0.000655 0.021918 4.197631e+01 1.253566e+00 9.986188e-01 9.986188e-01 NaN NaN NaN 9.991596e+01
1634 1635 Other.1 4 Damaged Property Value Hijacking 1064 5 1.005960e+06 995146.942763 10813.457237 ... 0.000533 0.007928 2.029801e+07 1.363921e+06 9.990502e-01 9.990502e-01 NaN NaN NaN 9.991596e+01
1635 1636 Anti-White extremists 2 Number US People Killed Hijacking 2086 6 1.666667e+00 1.686961 -0.020294 ... 0.000484 0.008379 4.196613e+01 2.422120e+00 9.990552e-01 9.990552e-01 NaN NaN NaN 9.991596e+01
1636 1637 Argentina 5 Number Wounded Hijacking 3332 3 6.333333e+00 6.456182 -0.122849 ... 0.000608 0.018881 2.019714e+02 6.506407e+00 9.991596e-01 9.991596e-01 NaN NaN NaN 9.991596e+01

1637 rows × 21 columns

In [6]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'North America ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(noramdf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[6]:
my plot

South America

In [7]:
souamdf = pd.read_csv('southam/html_gdsc_anova/OUTPUT/results.csv')
replace_drugname(souamdf)
souamdf
Out[7]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 Armed Assault 1 Number People Killed Hijacking 13601 3705 4.663158 0.850820 3.812338 ... 0.971431 0.452198 3.924455e+00 8.430692 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
1 2 Firearms 1 Number People Killed Hijacking 10784 6522 3.378718 0.631769 2.746949 ... 0.663718 0.405211 4.138728e+00 6.779057 5.368998e-233 5.368998e-233 NaN NaN NaN 6.131396e-228
2 3 Montoneros (Argentina) 2 Number US People Killed Hijacking 3215 3 4.000000 0.011198 3.988802 ... 26.359413 0.655755 1.513236e-01 6.082763 8.670018e-198 8.670018e-198 NaN NaN NaN 6.600774e-193
3 4 Military 1 Number People Killed Hijacking 15615 1691 4.941455 1.312392 3.629063 ... 0.748630 0.416943 4.847608e+00 8.703981 8.925036e-152 8.925036e-152 NaN NaN NaN 5.096196e-147
4 5 BombingExplosion 1 Number People Killed Hijacking 9235 8071 0.579606 2.617325 -2.037719 ... 0.336748 0.459010 6.051165e+00 4.439384 5.281257e-135 5.281257e-135 NaN NaN NaN 2.412478e-130
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2279 2280 Bogota 6 Number US Wounded Hijacking 3050 152 0.013158 0.013115 0.000043 ... 0.000137 0.000377 3.144468e-01 0.114327 9.986551e-01 9.986551e-01 NaN NaN NaN 9.999171e+01
2280 2281 Lambayeque 4 Damaged Property Value Hijacking 3305 5 388980.200000 382920.414977 6059.785023 ... 0.000611 0.011797 9.920562e+06 513686.925530 9.989105e-01 9.989105e-01 NaN NaN NaN 9.999171e+01
2281 2282 Cesar 4 Damaged Property Value Hijacking 3284 26 384050.076923 382920.697473 1129.379450 ... 0.000113 0.001525 9.952047e+06 740736.964608 9.995384e-01 9.995384e-01 NaN NaN NaN 9.999171e+01
2282 2283 Lara 1 Number People Killed Hijacking 17294 12 1.666667 1.666994 -0.000328 ... 0.000060 0.000068 5.456055e+00 4.849242 9.998341e-01 9.998341e-01 NaN NaN NaN 9.999171e+01
2283 2284 Beni 1 Number People Killed Hijacking 17303 3 1.666667 1.666994 -0.000327 ... 0.000060 0.000157 5.455960e+00 2.081666 9.999171e-01 9.999171e-01 NaN NaN NaN 9.999171e+01

2284 rows × 21 columns

In [9]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'South America ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(souamdf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[9]:
my plot

Central America & Caribbean

In [11]:
cenamdf = pd.read_csv('cenam-carib/html_gdsc_anova/OUTPUT/results.csv')
replace_drugname(cenamdf)
cenamdf
Out[11]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 Military 1 Number People Killed Hijacking 5731 2291 8.341336 1.674751 6.666584 ... 0.991209 0.367655 6.725712 18.132736 4.660402e-123 4.660402e-123 NaN NaN NaN 6.585148e-118
1 2 Armed Assault 1 Number People Killed Hijacking 4801 3221 7.212977 1.140387 6.072590 ... 1.216957 0.364390 4.989977 16.665096 3.294575e-120 3.294575e-120 NaN NaN NaN 2.327617e-115
2 3 Firearms 1 Number People Killed Hijacking 3454 4568 5.732706 0.729878 5.002827 ... 1.117010 0.343918 4.478768 14.546578 5.627013e-83 5.627013e-83 NaN NaN NaN 2.650323e-78
3 4 Nicaraguan Democratic Force (FDN) 1 Number People Killed Hijacking 7512 510 13.062745 2.934771 10.127974 ... 1.048000 0.395134 9.664096 25.631743 1.419705e-82 1.419705e-82 NaN NaN NaN 5.015108e-78
4 5 Assassination 3 Success Hijacking 9090 1254 87.719298 97.678768 -9.959470 ... 0.661383 0.303322 15.058554 32.834651 6.753893e-73 6.753893e-73 NaN NaN NaN 1.908650e-68
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1408 1409 Atlantico Sur 1 Number People Killed Hijacking 8019 3 3.666667 3.578626 0.088041 ... 0.007569 0.034984 11.632034 2.516611 9.895414e-01 9.895414e-01 NaN NaN NaN 9.921946e+01
1409 1410 Sandinista National Liberation Front (FSLN) 7 Number Kidnapped Hostage Hijacking 818 26 17.884615 19.683374 -1.798759 ... 0.002443 0.007318 736.393497 245.812177 9.900880e-01 9.900880e-01 NaN NaN NaN 9.921946e+01
1410 1411 Melee 7 Number Kidnapped Hostage Hijacking 839 5 23.200000 19.606675 3.593325 ... 0.004934 0.083392 728.340521 43.089442 9.912059e-01 9.912059e-01 NaN NaN NaN 9.926109e+01
1411 1412 Colon 1 Number People Killed Hijacking 8015 7 3.571429 3.578665 -0.007236 ... 0.000622 0.000937 11.633086 7.721337 9.986872e-01 9.986872e-01 NaN NaN NaN 9.993945e+01
1412 1413 Chile 5 Number Wounded Hijacking 7867 7 1.142857 1.141858 0.000999 ... 0.000225 0.000512 4.431667 1.951800 9.995243e-01 9.995243e-01 NaN NaN NaN 9.995243e+01

1413 rows × 21 columns

In [12]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'Central America & Caribbean ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(cenamdf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[12]:
my plot

Eastern Europe

In [13]:
easteudf = pd.read_csv('easteu/html_gdsc_anova/OUTPUT/results.csv')
replace_drugname(easteudf)
easteudf
Out[13]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 United States 2 Number US People Killed Hijacking 4233 21 0.285714 0.000945 0.284769 ... 9.267046 0.507962 0.030729 0.560612 4.506951e-143 4.506951e-143 NaN NaN NaN 6.967746e-138
1 2 Riyadus-Salikhin Reconnaissance and Sabotage B... 5 Number Wounded Hijacking 4882 10 105.200000 2.251741 102.948259 ... 10.077555 0.457930 10.215599 224.812416 1.100241e-112 1.100241e-112 NaN NaN NaN 8.504865e-108
2 3 North Ossetia-Alania (Republic) 5 Number Wounded Hijacking 4879 13 79.384615 2.257225 77.127391 ... 7.421825 0.391350 10.391971 197.080584 1.547807e-81 1.547807e-81 NaN NaN NaN 7.976368e-77
3 4 Federation of Bosnia and Herzegovina 2 Number US People Killed Hijacking 4241 13 0.230769 0.001651 0.229119 ... 4.976238 0.522471 0.046043 0.438529 5.117797e-56 5.117797e-56 NaN NaN NaN 1.978029e-51
4 5 Assassination 3 Success Hijacking 4730 414 61.352657 88.435518 -27.082861 ... 0.846783 0.555511 31.983233 48.753035 2.412342e-54 2.412342e-54 NaN NaN NaN 7.458960e-50
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1541 1542 Province Unknown 10 Number Hostage Released Hijacking 224 6 -14.666667 -14.973214 0.306548 ... 0.003200 0.007415 95.781605 41.340860 9.937781e-01 9.937781e-01 NaN NaN NaN 9.963560e+01
1542 1543 NVF 5 Number Wounded Hijacking 4888 4 2.500000 2.462152 0.037848 ... 0.002558 0.007570 14.796422 5.000000 9.959190e-01 9.959190e-01 NaN NaN NaN 9.978553e+01
1543 1544 Serbian extremists 5 Number Wounded Hijacking 4883 9 2.444444 2.462216 -0.017771 ... 0.001200 0.004129 14.803491 4.304391 9.971271e-01 9.971271e-01 NaN NaN NaN 9.982476e+01
1544 1545 Caucasus Province of the Islamic State 5 Number Wounded Hijacking 4875 17 2.470588 2.462154 0.008434 ... 0.000569 0.001934 14.814554 4.360585 9.981276e-01 9.981276e-01 NaN NaN NaN 9.982476e+01
1545 1546 Volgograd (Oblast) 1 Number People Killed Hijacking 4974 4 1.500000 1.489546 0.010454 ... 0.001098 0.008098 9.518268 1.290994 9.982476e-01 9.982476e-01 NaN NaN NaN 9.982476e+01

1546 rows × 21 columns

In [14]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'Eastern Europe ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(easteudf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[14]:
my plot

Western Europe

In [15]:
westeudf = pd.read_csv('westeu/html_gdsc_anova/OUTPUT/results.csv')
westeudf
Out[15]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 Al-Qaida 5 Number Wounded Hijacking 14114 15 1.723333e+02 1.115701e+00 171.217633 ... 20.995387 0.865387 8.155012e+00 1.978508e+02 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
1 2 Popular Front for the Liberation of Palestine,... 1 Number People Killed Hijacking 15724 3 4.500000e+01 4.171330e-01 44.582867 ... 15.010524 1.012463 2.970107e+00 4.403408e+01 4.234365e-142 4.234365e-142 NaN NaN NaN 6.163118e-137
2 3 Target type Unknown 3 Success Hijacking 16264 375 4.586667e+01 8.601205e+01 -40.145384 ... 1.157352 0.804590 3.468726e+01 4.989543e+01 8.439573e-105 8.439573e-105 NaN NaN NaN 8.189199e-100
3 4 Al-Qaida 1 Number People Killed Hijacking 15712 15 1.646667e+01 4.103233e-01 16.056343 ... 5.441263 0.677049 2.950849e+00 2.371517e+01 4.056315e-92 4.056315e-92 NaN NaN NaN 2.951983e-87
4 5 Scotland 1 Number People Killed Hijacking 15707 20 1.375000e+01 4.086713e-01 13.341329 ... 6.070444 0.221188 2.197752e+00 6.031660e+01 7.767746e-85 7.767746e-85 NaN NaN NaN 4.522382e-80
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2906 2907 Attack type Unknown 4 Damaged Property Value Hijacking 3273 15 1.421633e+06 1.402767e+06 18866.603538 ... 0.000371 0.003666 5.091972e+07 5.145764e+06 9.988553e-01 9.988553e-01 NaN NaN NaN 9.998623e+01
2907 2908 Bremen 5 Number Wounded Hijacking 14109 20 1.300000e+00 1.297470e+00 0.002530 ... 0.000217 0.000514 1.168231e+01 4.921489e+00 9.992273e-01 9.992273e-01 NaN NaN NaN 9.998623e+01
2908 2909 First of October Antifascist Resistance Group ... 1 Number People Killed Hijacking 15525 202 4.257426e-01 4.256361e-01 0.000107 ... 0.000034 0.000122 3.091695e+00 8.735646e-01 9.996096e-01 9.996096e-01 NaN NaN NaN 9.998623e+01
2909 2910 Libya 1 Number People Killed Hijacking 15680 47 4.255319e-01 4.256378e-01 -0.000106 ... 0.000034 0.000195 3.077825e+00 5.415228e-01 9.998119e-01 9.998119e-01 NaN NaN NaN 9.998623e+01
2910 2911 Popular Forces of April 25 3 Success Hijacking 16592 47 8.510638e+01 8.510728e+01 -0.000898 ... 0.000025 0.000025 3.560274e+01 3.598746e+01 9.998623e-01 9.998623e-01 NaN NaN NaN 9.998623e+01

2911 rows × 21 columns

In [16]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'Western Europe ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(westeudf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[16]:
my plot

South Asia

In [17]:
soasiadf = pd.read_csv('southasia/html_gdsc_anova/OUTPUT/results.csv')
soasiadf
Out[17]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 International 2 Number US People Killed Hijacking 36594 1037 4.040501e-01 0.003197 4.008529e-01 ... 3.043863 0.424521 0.131692 9.442485e-01 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
1 2 Target type Unknown 3 Success Hijacking 42572 2402 3.825978e+01 90.317580 -5.205780e+01 ... 1.760364 1.070878 29.572171 4.861225e+01 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
2 3 United States 2 Number US People Killed Hijacking 37495 136 6.764706e-01 0.011842 6.646290e-01 ... 3.624491 0.386228 0.183372 1.720820e+00 9.469378e-292 9.469378e-292 NaN NaN NaN 1.073196e-286
3 4 Tourists 4 Damaged Property Value Hijacking 9709 9 3.888880e+07 11255.309118 3.887755e+07 ... 86.625972 0.333236 448797.800496 1.166667e+08 2.384986e-246 2.384986e-246 NaN NaN NaN 2.027238e-241
4 5 Nationality Unknown 3 Success Hijacking 44128 846 5.023641e+01 88.252357 -3.801595e+01 ... 1.180653 0.759878 32.199079 5.002902e+01 4.382776e-244 4.382776e-244 NaN NaN NaN 2.980287e-239
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
3395 3396 Philippines 3 Success Hijacking 44966 8 8.750000e+01 87.537250 -3.725037e-02 ... 0.001128 0.001054 33.029973 3.535534e+01 9.974552e-01 9.974552e-01 NaN NaN NaN 9.986300e+01
3396 3397 Nationality Unknown 7 Number Kidnapped Hostage Hijacking 3671 4 5.500000e+00 5.430945 6.905475e-02 ... 0.001137 0.014835 60.721121 4.654747e+00 9.981856e-01 9.981856e-01 NaN NaN NaN 9.990671e+01
3397 3398 Young Communist League 5 Number Wounded Hijacking 43064 18 3.277778e+00 3.281186 -3.408364e-03 ... 0.000241 0.000531 14.126405 6.424270e+00 9.991833e-01 9.991833e-01 NaN NaN NaN 9.993778e+01
3398 3399 United Peoples Democratic Solidarity (UPDS) 5 Number Wounded Hijacking 43075 7 3.285714e+00 3.281184 4.530304e-03 ... 0.000321 0.001113 14.125096 4.070802e+00 9.993230e-01 9.993230e-01 NaN NaN NaN 9.993778e+01
3399 3400 Paktia 6 Number US Wounded Hijacking 37300 258 1.550388e-02 0.015469 3.470707e-05 ... 0.000049 0.000197 0.714735 1.757473e-01 9.993778e-01 9.993778e-01 NaN NaN NaN 9.993778e+01

3400 rows × 21 columns

In [18]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'South Asia ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(soasiadf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[18]:
my plot

Southeast Asia

In [19]:
soeastasiadf = pd.read_csv('southeastasia/html_gdsc_anova/OUTPUT/results.csv')
soeastasiadf
Out[19]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 United States 2 Number US People Killed Hijacking 9701 60 0.516667 0.001649 0.515017 ... 6.904258 0.761553 0.074594 0.676273 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
1 2 Bali (Province) 2 Number US People Killed Hijacking 9756 5 1.400000 0.004100 1.395900 ... 16.266603 0.716082 0.085814 1.949359 4.608504e-227 4.608504e-227 NaN NaN NaN 5.659244e-222
2 3 Target type Unknown 3 Success Hijacking 12193 292 40.753425 90.478143 -49.724719 ... 1.694033 1.010215 29.352863 49.221927 1.290535e-167 1.290535e-167 NaN NaN NaN 1.056518e-162
3 4 Bali (Province) 1 Number People Killed Hijacking 12204 5 45.400000 1.262701 44.137299 ... 11.778560 0.865221 3.747258 51.012744 1.534945e-140 1.534945e-140 NaN NaN NaN 9.424561e-136
4 5 Bali (Province) 6 Number US Wounded Hijacking 9738 3 2.333333 0.005648 2.327685 ... 14.064815 0.575953 0.165497 4.041452 5.819303e-114 5.819303e-114 NaN NaN NaN 2.858441e-109
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2451 2452 Quezon 7 Number Kidnapped Hostage Hijacking 924 4 4.250000 4.358225 -0.108225 ... 0.002163 0.018493 50.041504 5.852350 9.965517e-01 9.965517e-01 NaN NaN NaN 9.976946e+01
2452 2453 Tawi-Tawi 7 Number Kidnapped Hostage Hijacking 916 12 4.416667 4.356987 0.059680 ... 0.001187 0.013026 50.258395 4.581749 9.967207e-01 9.967207e-01 NaN NaN NaN 9.976946e+01
2453 2454 Maute Group 7 Number Kidnapped Hostage Hijacking 921 7 4.428571 4.357220 0.071351 ... 0.001424 0.023847 50.123559 2.992053 9.969974e-01 9.969974e-01 NaN NaN NaN 9.976946e+01
2454 2455 India 1 Number People Killed Hijacking 12202 7 1.285714 1.280774 0.004941 ... 0.001247 0.002311 3.961458 2.138090 9.973676e-01 9.973676e-01 NaN NaN NaN 9.976946e+01
2455 2456 Lanao del Norte 10 Number Hostage Released Hijacking 705 14 -12.857143 -12.809929 -0.047214 ... 0.000778 0.000953 60.705775 49.565585 9.976946e-01 9.976946e-01 NaN NaN NaN 9.976946e+01

2456 rows × 21 columns

In [20]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'Southeast Asia ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(soeastasiadf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[20]:
my plot

Sub-Saharan Africa

In [22]:
subafdf = pd.read_csv('subaf/html_gdsc_anova/OUTPUT/results.csv')
subafdf
Out[22]:
ASSOC_ID FEATURE DRUG_ID DRUG_NAME DRUG_TARGET N_FEATURE_neg N_FEATURE_pos FEATURE_pos_logIC50_MEAN FEATURE_neg_logIC50_MEAN FEATURE_delta_MEAN_IC50 ... FEATURE_neg_Glass_delta FEATURE_pos_Glass_delta FEATURE_neg_IC50_sd FEATURE_pos_IC50_sd FEATURE_IC50_T_pval ANOVA_FEATURE_pval ANOVA_TISSUE_pval ANOVA_MSI_pval ANOVA_MEDIA_pval ANOVA_FEATURE_FDR
0 1 United States 2 Number US People Killed Hijacking 13625 76 0.644737 0.001541 0.643196 ... 9.040089 0.400531 0.071149 1.605856 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
1 2 North Kordofan 6 Number US Wounded Hijacking 13684 3 6.333333 0.002265 6.331068 ... 83.357986 0.577144 0.075950 10.969655 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
2 3 Al-Qaida 5 Number Wounded Hijacking 14433 5 820.600000 3.377953 817.222047 ... 54.788919 0.459712 14.915827 1777.682986 0.000000e+00 0.000000e+00 NaN NaN NaN 0.000000e+00
3 4 Al-Qaida 2 Number US People Killed Hijacking 13696 5 2.400000 0.004235 2.395765 ... 22.910549 0.446424 0.104570 5.366563 3.346507e-308 3.346507e-308 NaN NaN NaN 3.827567e-303
4 5 Assassination 3 Success Hijacking 15900 1650 75.151515 94.572327 -19.420812 ... 0.857166 0.449280 22.657007 43.226540 9.626513e-189 9.626513e-189 NaN NaN NaN 8.808260e-184
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
4570 4571 Katsina 1 Number People Killed Hijacking 15915 22 4.909091 4.918505 -0.009414 ... 0.000507 0.001021 18.560671 9.221657 9.981023e-01 9.981023e-01 NaN NaN NaN 9.989757e+01
4571 4572 Kirundo 5 Number Wounded Hijacking 14424 14 3.642857 3.660982 -0.018125 ... 0.000497 0.001388 36.473710 13.059669 9.985167e-01 9.985167e-01 NaN NaN NaN 9.991718e+01
4572 4573 Benguela 7 Number Kidnapped Hostage Hijacking 2229 4 1.250000 1.186631 0.063369 ... 0.000653 0.000925 97.054373 68.534055 9.989588e-01 9.989588e-01 NaN NaN NaN 9.993957e+01
4573 4574 Group name Unknown 14 Amount Ransom Paid by US sources Hijacking 92 45 -4.400000 -4.402174 0.002174 ... 0.000107 0.000105 20.300522 20.632499 9.995337e-01 9.995337e-01 NaN NaN NaN 9.995675e+01
4574 4575 Yei River 5 Number Wounded Hijacking 14426 12 3.666667 3.660959 0.005707 ... 0.000156 0.001011 36.472955 5.646130 9.995675e-01 9.995675e-01 NaN NaN NaN 9.995675e+01

4575 rows × 21 columns

In [23]:
tooltips = [('Feature', '@FEATURE'),('Label','@DRUG_NAME')]
p = make_expression_axes( tooltips, 'Sub-Saharan Africa ANOVA associations',
                         'Signed Effect Size', '-log(Q)')
to_plot_not, to_plot_yes = selector(subafdf,0.001,25)
p = add_points(p, to_plot_not, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#1a9641')
p = add_points(p, to_plot_yes, 'FEATURE_IC50_effect_size', 'ANOVA_FEATURE_pval', 'FEATURE_delta_MEAN_IC50', color='#fc8d59', alpha=0.6, outline=True)
html = file_html(p, CDN, "my plot")
HTML(html)
Out[23]:
my plot
In [ ]: