In [3]:
%matplotlib inline
In [4]:
import glob
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib
pd.set_option('display.max_columns', 50) # print all rows
import os
os.chdir('/Users/evanbiederstedt/Downloads/RRBS_data_files')
import statsmodels.api as sm
In [5]:
"""
Normal_B_regions.csv
pcell_regions.csv
trito_regions.csv
mcell_regions.csv
CD19cell_regions.csv
cw154_regions.csv
"""
Out[5]:
In [6]:
normalB = pd.read_csv("Correct_Normal_B_regions.csv")
mcell = pd.read_csv("Correct_mcell_regions.csv")
pcell = pd.read_csv("Correct_pcell_regions.csv")
cd19cell = pd.read_csv("Correct_CD19cell_regions.csv")
trito = pd.read_csv("Correct_trito_regions.csv")
cw154 = pd.read_csv("Correct_cw154_regions.csv")
In [7]:
print(normalB.shape)
print(mcell.shape)
print(pcell.shape)
print(cd19cell.shape)
print(trito.shape)
print(cw154.shape)
In [8]:
normal_all = pd.concat([normalB, mcell, pcell, cd19cell])
cll_all = pd.concat([trito, cw154])
In [9]:
print(normal_all.shape)
print(cll_all.shape)
In [ ]:
#
#
#
In [10]:
normalB.columns
Out[10]:
In [58]:
normalB_meth = normalB[['methylation_genesDistance', 'methylation_exonsDistance',
'methylation_intronsDistance', 'methylation_promoterDistance',
'methylation_cgiDistance', 'methylation_ctcfDistance', 'methylation_ctcfDownDistance',
'methylation_geneDistalRegulatoryModulesDistance',
'methylation_vistaEnhancersDistance', 'methylation_3PrimeUTRDistance',
'methylation_5PrimeUTRDistance', 'methylation_firstExonDistance',
'methylation_geneDistalRegulatoryModulesK562Distance',
'methylation_hypoInHues64Distance', 'methylation_intergenic',
'methylation_shore', 'methylation_shelf']]
pcell_meth = pcell[['methylation_genesDistance', 'methylation_exonsDistance',
'methylation_intronsDistance', 'methylation_promoterDistance',
'methylation_cgiDistance', 'methylation_ctcfDistance', 'methylation_ctcfDownDistance',
'methylation_geneDistalRegulatoryModulesDistance',
'methylation_vistaEnhancersDistance', 'methylation_3PrimeUTRDistance',
'methylation_5PrimeUTRDistance', 'methylation_firstExonDistance',
'methylation_geneDistalRegulatoryModulesK562Distance',
'methylation_hypoInHues64Distance', 'methylation_intergenic',
'methylation_shore', 'methylation_shelf']]
mcell_meth = mcell[['methylation_genesDistance', 'methylation_exonsDistance',
'methylation_intronsDistance', 'methylation_promoterDistance',
'methylation_cgiDistance', 'methylation_ctcfDistance', 'methylation_ctcfDownDistance',
'methylation_geneDistalRegulatoryModulesDistance',
'methylation_vistaEnhancersDistance', 'methylation_3PrimeUTRDistance',
'methylation_5PrimeUTRDistance', 'methylation_firstExonDistance',
'methylation_geneDistalRegulatoryModulesK562Distance',
'methylation_hypoInHues64Distance', 'methylation_intergenic',
'methylation_shore', 'methylation_shelf']]
cd19cell_meth = cd19cell[['methylation_genesDistance', 'methylation_exonsDistance',
'methylation_intronsDistance', 'methylation_promoterDistance',
'methylation_cgiDistance', 'methylation_ctcfDistance', 'methylation_ctcfDownDistance',
'methylation_geneDistalRegulatoryModulesDistance',
'methylation_vistaEnhancersDistance', 'methylation_3PrimeUTRDistance',
'methylation_5PrimeUTRDistance', 'methylation_firstExonDistance',
'methylation_geneDistalRegulatoryModulesK562Distance',
'methylation_hypoInHues64Distance', 'methylation_intergenic',
'methylation_shore', 'methylation_shelf']]
trito_meth = trito[['methylation_genesDistance', 'methylation_exonsDistance',
'methylation_intronsDistance', 'methylation_promoterDistance',
'methylation_cgiDistance', 'methylation_ctcfDistance', 'methylation_ctcfDownDistance',
'methylation_geneDistalRegulatoryModulesDistance',
'methylation_vistaEnhancersDistance', 'methylation_3PrimeUTRDistance',
'methylation_5PrimeUTRDistance', 'methylation_firstExonDistance',
'methylation_geneDistalRegulatoryModulesK562Distance',
'methylation_hypoInHues64Distance', 'methylation_intergenic',
'methylation_shore', 'methylation_shelf']]
cw154_meth = cw154[['methylation_genesDistance', 'methylation_exonsDistance',
'methylation_intronsDistance', 'methylation_promoterDistance',
'methylation_cgiDistance', 'methylation_ctcfDistance', 'methylation_ctcfDownDistance',
'methylation_geneDistalRegulatoryModulesDistance',
'methylation_vistaEnhancersDistance', 'methylation_3PrimeUTRDistance',
'methylation_5PrimeUTRDistance', 'methylation_firstExonDistance',
'methylation_geneDistalRegulatoryModulesK562Distance',
'methylation_hypoInHues64Distance', 'methylation_intergenic',
'methylation_shore', 'methylation_shelf']]
normal_all_meth = normal_all[['methylation_genesDistance', 'methylation_exonsDistance',
'methylation_intronsDistance', 'methylation_promoterDistance',
'methylation_cgiDistance', 'methylation_ctcfDistance', 'methylation_ctcfDownDistance',
'methylation_geneDistalRegulatoryModulesDistance',
'methylation_vistaEnhancersDistance', 'methylation_3PrimeUTRDistance',
'methylation_5PrimeUTRDistance', 'methylation_firstExonDistance',
'methylation_geneDistalRegulatoryModulesK562Distance',
'methylation_hypoInHues64Distance', 'methylation_intergenic',
'methylation_shore', 'methylation_shelf']]
cll_all_meth = cll_all[['methylation_genesDistance', 'methylation_exonsDistance',
'methylation_intronsDistance', 'methylation_promoterDistance',
'methylation_cgiDistance', 'methylation_ctcfDistance', 'methylation_ctcfDownDistance',
'methylation_geneDistalRegulatoryModulesDistance',
'methylation_vistaEnhancersDistance', 'methylation_3PrimeUTRDistance',
'methylation_5PrimeUTRDistance', 'methylation_firstExonDistance',
'methylation_geneDistalRegulatoryModulesK562Distance',
'methylation_hypoInHues64Distance', 'methylation_intergenic',
'methylation_shore', 'methylation_shelf']]
In [ ]:
In [59]:
normalB_PDR = normalB[['PDR_genesDistance', 'PDR_exonsDistance', 'PDR_intronsDistance',
'PDR_promoterDistance', 'PDR_cgiDistance', 'PDR_ctcfDistance', 'PDR_ctcfDownDistance',
'PDR_geneDistalRegulatoryModulesDistance', 'PDR_vistaEnhancersDistance',
'PDR_3PrimeUTRDistance', 'PDR_5PrimeUTRDistance',
'PDR_firstExonDistance', 'PDR_geneDistalRegulatoryModulesK562Distance',
'PDR_hypoInHues64Distance', 'PDR_intergenic', 'PDR_shore', 'PDR_shelf']]
pcell_PDR = pcell[['PDR_genesDistance', 'PDR_exonsDistance', 'PDR_intronsDistance',
'PDR_promoterDistance', 'PDR_cgiDistance', 'PDR_ctcfDistance', 'PDR_ctcfDownDistance',
'PDR_geneDistalRegulatoryModulesDistance', 'PDR_vistaEnhancersDistance',
'PDR_3PrimeUTRDistance', 'PDR_5PrimeUTRDistance',
'PDR_firstExonDistance', 'PDR_geneDistalRegulatoryModulesK562Distance',
'PDR_hypoInHues64Distance', 'PDR_intergenic', 'PDR_shore', 'PDR_shelf']]
mcell_PDR = mcell[['PDR_genesDistance', 'PDR_exonsDistance', 'PDR_intronsDistance',
'PDR_promoterDistance', 'PDR_cgiDistance', 'PDR_ctcfDistance', 'PDR_ctcfDownDistance',
'PDR_geneDistalRegulatoryModulesDistance', 'PDR_vistaEnhancersDistance',
'PDR_3PrimeUTRDistance', 'PDR_5PrimeUTRDistance',
'PDR_firstExonDistance', 'PDR_geneDistalRegulatoryModulesK562Distance',
'PDR_hypoInHues64Distance', 'PDR_intergenic', 'PDR_shore', 'PDR_shelf']]
cd19cell_PDR = cd19cell[['PDR_genesDistance', 'PDR_exonsDistance', 'PDR_intronsDistance',
'PDR_promoterDistance', 'PDR_cgiDistance', 'PDR_ctcfDistance', 'PDR_ctcfDownDistance',
'PDR_geneDistalRegulatoryModulesDistance', 'PDR_vistaEnhancersDistance',
'PDR_3PrimeUTRDistance', 'PDR_5PrimeUTRDistance',
'PDR_firstExonDistance', 'PDR_geneDistalRegulatoryModulesK562Distance',
'PDR_hypoInHues64Distance', 'PDR_intergenic', 'PDR_shore', 'PDR_shelf']]
trito_PDR = trito[['PDR_genesDistance', 'PDR_exonsDistance', 'PDR_intronsDistance',
'PDR_promoterDistance', 'PDR_cgiDistance', 'PDR_ctcfDistance', 'PDR_ctcfDownDistance',
'PDR_geneDistalRegulatoryModulesDistance', 'PDR_vistaEnhancersDistance',
'PDR_3PrimeUTRDistance', 'PDR_5PrimeUTRDistance',
'PDR_firstExonDistance', 'PDR_geneDistalRegulatoryModulesK562Distance',
'PDR_hypoInHues64Distance', 'PDR_intergenic', 'PDR_shore', 'PDR_shelf']]
cw154_PDR = cw154[['PDR_genesDistance', 'PDR_exonsDistance', 'PDR_intronsDistance',
'PDR_promoterDistance', 'PDR_cgiDistance', 'PDR_ctcfDistance', 'PDR_ctcfDownDistance',
'PDR_geneDistalRegulatoryModulesDistance', 'PDR_vistaEnhancersDistance',
'PDR_3PrimeUTRDistance', 'PDR_5PrimeUTRDistance',
'PDR_firstExonDistance', 'PDR_geneDistalRegulatoryModulesK562Distance',
'PDR_hypoInHues64Distance', 'PDR_intergenic', 'PDR_shore', 'PDR_shelf']]
normal_all_PDR = normal_all[['PDR_genesDistance', 'PDR_exonsDistance', 'PDR_intronsDistance',
'PDR_promoterDistance', 'PDR_cgiDistance', 'PDR_ctcfDistance', 'PDR_ctcfDownDistance',
'PDR_geneDistalRegulatoryModulesDistance', 'PDR_vistaEnhancersDistance',
'PDR_3PrimeUTRDistance', 'PDR_5PrimeUTRDistance',
'PDR_firstExonDistance', 'PDR_geneDistalRegulatoryModulesK562Distance',
'PDR_hypoInHues64Distance', 'PDR_intergenic', 'PDR_shore', 'PDR_shelf']]
cll_all_PDR = cll_all[['PDR_genesDistance', 'PDR_exonsDistance', 'PDR_intronsDistance',
'PDR_promoterDistance', 'PDR_cgiDistance', 'PDR_ctcfDistance', 'PDR_ctcfDownDistance',
'PDR_geneDistalRegulatoryModulesDistance', 'PDR_vistaEnhancersDistance',
'PDR_3PrimeUTRDistance', 'PDR_5PrimeUTRDistance',
'PDR_firstExonDistance', 'PDR_geneDistalRegulatoryModulesK562Distance',
'PDR_hypoInHues64Distance', 'PDR_intergenic', 'PDR_shore', 'PDR_shelf']]
In [45]:
sns.boxplot(normalB_meth, orient="h", showfliers=False)
plt.title("Methylation Normal B cells")
Out[45]:
In [46]:
sns.boxplot(pcell_PDR, orient="h", showfliers=False)
plt.title("Methylation CD27 p cells")
Out[46]:
In [47]:
sns.boxplot(mcell_meth, orient="h", showfliers=False)
plt.title("Methylation CD27 m cells")
Out[47]:
In [48]:
sns.boxplot(cd19cell_meth, orient="h", showfliers=False)
plt.title("Methylation CD19 cells")
Out[48]:
In [49]:
sns.boxplot(trito_meth, orient="h", showfliers=False)
plt.title("Methylation trito_pool CLL cells")
Out[49]:
In [50]:
sns.boxplot(cw154_meth, orient="h", showfliers=False)
plt.title("Methylation cw154 CLL cells")
Out[50]:
In [ ]:
In [ ]:
In [ ]:
In [51]:
sns.boxplot(normalB_PDR, orient="h", showfliers=False)
plt.title("PDR Normal B cells")
Out[51]:
In [52]:
sns.boxplot(pcell_PDR, orient="h", showfliers=False)
plt.title("PDR CD27 p cells")
Out[52]:
In [53]:
sns.boxplot(mcell_PDR, orient="h", showfliers=False)
plt.title("PDR CD27 m cells")
Out[53]:
In [54]:
sns.boxplot(cd19cell_PDR, orient="h", showfliers=False)
plt.title("PDR CD19 cells")
Out[54]:
In [55]:
sns.boxplot(trito_PDR, orient="h", showfliers=False)
plt.title("PDR trito_pool CLL cells")
Out[55]:
In [56]:
sns.boxplot(cw154_PDR, orient="h", showfliers=False)
plt.title("PDR cw154 CLL cells")
Out[56]:
In [ ]:
In [61]:
pdr_normal_strip = pd.melt(normal_all_PDR, var_name='genome_region', value_name='PDR')
pdr_cll_strip = pd.melt(cll_all_PDR, var_name='genome_region', value_name='PDR')
In [62]:
meth_normal_strip = pd.melt(normal_all_meth, var_name='genome_region', value_name='methyl')
meth_cll_strip = pd.melt(cll_all_meth, var_name='genome_region', value_name='methyl')
In [63]:
pdr_normal_strip["category"] = str("Normal")
pdr_cll_strip["category"] = str("CLL")
meth_normal_strip["category"] = str("Normal")
meth_cll_strip["category"] = str("CLL")
In [64]:
total_pdr_pairs = pd.concat([pdr_normal_strip, pdr_cll_strip])
total_meth_pairs = pd.concat([meth_normal_strip, meth_cll_strip])
In [68]:
sns.boxplot(y=total_pdr_pairs.genome_region, x=total_pdr_pairs.PDR, hue=total_pdr_pairs.category, showfliers=False)
plt.title("PDR by genomic regions: 342 Normal vs 104 CLL")
plt.ylabel("genomic region")
Out[68]:
In [70]:
sns.boxplot(y=total_meth_pairs.genome_region, x=total_meth_pairs.methyl, hue=total_meth_pairs.category, showfliers=False)
plt.title("Methylation by regions: 342 Normal vs 104 CLL")
plt.ylabel("genomic region")
plt.xlabel("methylation, percentage")
Out[70]:
In [80]:
cll_all_PDR.columns
print(str("cll_all_PDR.PDR_genesDistance.mean()"))
print(cll_all_PDR.PDR_genesDistance.mean())
print(str("cll_all_PDR.PDR_exonsDistance.mean()"))
print(cll_all_PDR.PDR_exonsDistance.mean())
print(str("cll_all_PDR.PDR_intronsDistance.mean()"))
print(cll_all_PDR.PDR_intronsDistance.mean())
print(str("cll_all_PDR.PDR_promoterDistance.mean()"))
print(cll_all_PDR.PDR_promoterDistance.mean())
print(str("cll_all_PDR.PDR_cgiDistance.mean()"))
print(cll_all_PDR.PDR_cgiDistance.mean())
print(str("cll_all_PDR.PDR_ctcfDistance.mean()"))
print(cll_all_PDR.PDR_ctcfDistance.mean())
print(str("cll_all_PDR.PDR_ctcfDownDistance.mean()"))
print(cll_all_PDR.PDR_ctcfDownDistance.mean())
print(str("cll_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean()"))
print(cll_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean())
print(str("cll_all_PDR.PDR_vistaEnhancersDistance.mean()"))
print(cll_all_PDR.PDR_vistaEnhancersDistance.mean())
print(str("cll_all_PDR.PDR_3PrimeUTRDistance.mean()"))
print(cll_all_PDR.PDR_3PrimeUTRDistance.mean())
print(str("cll_all_PDR.PDR_5PrimeUTRDistance.mean()"))
print(cll_all_PDR.PDR_5PrimeUTRDistance.mean())
print(str("cll_all_PDR.PDR_firstExonDistance.mean()"))
print(cll_all_PDR.PDR_firstExonDistance.mean())
print(str("cll_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean()"))
print(cll_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean())
print(str("cll_all_PDR.PDR_hypoInHues64Distance.mean()"))
print(cll_all_PDR.PDR_hypoInHues64Distance.mean())
print(str("cll_all_PDR.PDR_intergenic.mean()"))
print(cll_all_PDR.PDR_intergenic.mean())
print(str("cll_all_PDR.PDR_shore.mean()"))
print(cll_all_PDR.PDR_shore.mean())
print(str("cll_all_PDR.PDR_shelf.mean()"))
print(cll_all_PDR.PDR_shelf.mean())
In [82]:
print(str("normal_all_PDR.PDR_genesDistance.mean()"))
print(normal_all_PDR.PDR_genesDistance.mean())
print(str("normal_all_PDR.PDR_exonsDistance.mean()"))
print(normal_all_PDR.PDR_exonsDistance.mean())
print(str("normal_all_PDR.PDR_intronsDistance.mean()"))
print(normal_all_PDR.PDR_intronsDistance.mean())
print(str("normal_all_PDR.PDR_promoterDistance.mean()"))
print(normal_all_PDR.PDR_promoterDistance.mean())
print(str("normal_all_PDR.PDR_cgiDistance.mean()"))
print(normal_all_PDR.PDR_cgiDistance.mean())
print(str("normal_all_PDR.PDR_ctcfDistance.mean()"))
print(normal_all_PDR.PDR_ctcfDistance.mean())
print(str("normal_all_PDR.PDR_ctcfDownDistance.mean()"))
print(normal_all_PDR.PDR_ctcfDownDistance.mean())
print(str("normal_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean()"))
print(normal_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean())
print(str("normal_all_PDR.PDR_vistaEnhancersDistance.mean()"))
print(normal_all_PDR.PDR_vistaEnhancersDistance.mean())
print(str("normal_all_PDR.PDR_3PrimeUTRDistance.mean()"))
print(normal_all_PDR.PDR_3PrimeUTRDistance.mean())
print(str("normal_all_PDR.PDR_5PrimeUTRDistance.mean()"))
print(normal_all_PDR.PDR_5PrimeUTRDistance.mean())
print(str("normal_all_PDR.PDR_firstExonDistance.mean()"))
print(normal_all_PDR.PDR_firstExonDistance.mean())
print(str("normal_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean()"))
print(normal_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean())
print(str("normal_all_PDR.PDR_hypoInHues64Distance.mean()"))
print(normal_all_PDR.PDR_hypoInHues64Distance.mean())
print(str("normal_all_PDR.PDR_intergenic.mean()"))
print(normal_all_PDR.PDR_intergenic.mean())
print(str("normal_all_PDR.PDR_shore.mean()"))
print(normal_all_PDR.PDR_shore.mean())
print(str("normal_all_PDR.PDR_shelf.mean()"))
print(normal_all_PDR.PDR_shelf.mean())
In [ ]:
In [103]:
print(str("cll_all_PDR.PDR_genesDistance.mean()"))
print((cll_all_PDR.PDR_genesDistance.mean() - normal_all_PDR.PDR_genesDistance.mean())
/(normal_all_PDR.PDR_genesDistance.mean()))
print(str("cll_all_PDR.PDR_exonsDistance.mean()"))
print((cll_all_PDR.PDR_exonsDistance.mean() - normal_all_PDR.PDR_exonsDistance.mean())
/(normal_all_PDR.PDR_exonsDistance.mean()))
print(str("cll_all_PDR.PDR_intronsDistance.mean()"))
print((cll_all_PDR.PDR_intronsDistance.mean() - normal_all_PDR.PDR_intronsDistance.mean())/(normal_all_PDR.PDR_intronsDistance.mean()
))
print(str("cll_all_PDR.PDR_promoterDistance.mean()"))
print((cll_all_PDR.PDR_promoterDistance.mean() - normal_all_PDR.PDR_promoterDistance.mean())
/normal_all_PDR.PDR_promoterDistance.mean())
print(str("cll_all_PDR.PDR_cgiDistance.mean()"))
print((cll_all_PDR.PDR_cgiDistance.mean() - normal_all_PDR.PDR_cgiDistance.mean())/normal_all_PDR.PDR_cgiDistance.mean())
print(str("cll_all_PDR.PDR_ctcfDistance.mean()"))
print((cll_all_PDR.PDR_ctcfDistance.mean() - normal_all_PDR.PDR_ctcfDistance.mean())/normal_all_PDR.PDR_ctcfDistance.mean())
print(str("cll_all_PDR.PDR_ctcfDownDistance.mean()"))
print((cll_all_PDR.PDR_ctcfDownDistance.mean() - normal_all_PDR.PDR_ctcfDownDistance.mean())/normal_all_PDR.PDR_ctcfDownDistance.mean())
print(str("cll_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean()"))
print((cll_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean()-normal_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean())/
(normal_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean()))
print(str("cll_all_PDR.PDR_vistaEnhancersDistance.mean()"))
print((cll_all_PDR.PDR_vistaEnhancersDistance.mean()-normal_all_PDR.PDR_vistaEnhancersDistance.mean())/normal_all_PDR.PDR_vistaEnhancersDistance.mean())
print(str("cll_all_PDR.PDR_3PrimeUTRDistance.mean()"))
print((cll_all_PDR.PDR_3PrimeUTRDistance.mean()-normal_all_PDR.PDR_vistaEnhancersDistance.mean())/normal_all_PDR.PDR_vistaEnhancersDistance.mean())
print(str("cll_all_PDR.PDR_5PrimeUTRDistance.mean()"))
print((cll_all_PDR.PDR_5PrimeUTRDistance.mean()-normal_all_PDR.PDR_5PrimeUTRDistance.mean())/normal_all_PDR.PDR_5PrimeUTRDistance.mean())
print(str("cll_all_PDR.PDR_firstExonDistance.mean()"))
print((cll_all_PDR.PDR_firstExonDistance.mean()-normal_all_PDR.PDR_firstExonDistance.mean())/normal_all_PDR.PDR_firstExonDistance.mean())
print(str("cll_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean()"))
print((cll_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean()-normal_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean())
/normal_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean())
print(str("cll_all_PDR.PDR_hypoInHues64Distance.mean()"))
print((cll_all_PDR.PDR_hypoInHues64Distance.mean()-normal_all_PDR.PDR_hypoInHues64Distance.mean())/normal_all_PDR.PDR_hypoInHues64Distance.mean()
)
print(str("cll_all_PDR.PDR_intergenic.mean()"))
print((cll_all_PDR.PDR_intergenic.mean()-normal_all_PDR.PDR_intergenic.mean())/normal_all_PDR.PDR_intergenic.mean())
print(str("cll_all_PDR.PDR_shore.mean()"))
print((cll_all_PDR.PDR_shore.mean()-normal_all_PDR.PDR_shore.mean())/normal_all_PDR.PDR_shore.mean())
print(str("cll_all_PDR.PDR_shelf.mean()"))
print((cll_all_PDR.PDR_shelf.mean()-normal_all_PDR.PDR_shelf.mean())/normal_all_PDR.PDR_shelf.mean())
In [104]:
print("Methylation values")
In [106]:
print(str("cll_all_PDR.PDR_genesDistance.mean()"))
print((cll_all_meth.methylation_genesDistance.mean() - normal_all_meth.methylation_genesDistance.mean())
/(normal_all_meth.methylation_genesDistance.mean()))
print(str("cll_all_PDR.PDR_exonsDistance.mean()"))
print((cll_all_meth.methylation_exonsDistance.mean() - normal_all_meth.methylation_exonsDistance.mean())
/(normal_all_meth.methylation_exonsDistance.mean()))
print(str("cll_all_PDR.PDR_intronsDistance.mean()"))
print((cll_all_meth.methylation_intronsDistance.mean() - normal_all_meth.methylation_intronsDistance.mean())
/(normal_all_meth.methylation_intronsDistance.mean()
))
print(str("cll_all_PDR.PDR_promoterDistance.mean()"))
print((cll_all_meth.methylation_promoterDistance.mean() - normal_all_meth.methylation_promoterDistance.mean())
/normal_all_meth.methylation_promoterDistance.mean())
print(str("cll_all_PDR.PDR_cgiDistance.mean()"))
print((cll_all_meth.methylation_cgiDistance.mean() - normal_all_meth.methylation_cgiDistance.mean())
/normal_all_meth.methylation_cgiDistance.mean())
print(str("cll_all_PDR.PDR_ctcfDistance.mean()"))
print((cll_all_meth.methylation_ctcfDistance.mean() - normal_all_meth.methylation_ctcfDistance.mean())/
normal_all_meth.methylation_ctcfDistance.mean())
print(str("cll_all_PDR.PDR_ctcfDownDistance.mean()"))
print((cll_all_meth.methylation_ctcfDownDistance.mean() - normal_all_meth.methylation_ctcfDownDistance.mean())
/normal_all_meth.methylation_ctcfDownDistance.mean())
print(str("cll_all_PDR.PDR_geneDistalRegulatoryModulesDistance.mean()"))
print((cll_all_meth.methylation_geneDistalRegulatoryModulesDistance.mean()-normal_all_meth.methylation_geneDistalRegulatoryModulesDistance.mean())/
(normal_all_meth.methylation_geneDistalRegulatoryModulesDistance.mean()))
print(str("cll_all_PDR.PDR_vistaEnhancersDistance.mean()"))
print((cll_all_meth.methylation_vistaEnhancersDistance.mean()-normal_all_meth.methylation_vistaEnhancersDistance.mean())
/normal_all_meth.methylation_vistaEnhancersDistance.mean())
print(str("cll_all_PDR.PDR_3PrimeUTRDistance.mean()"))
print((cll_all_meth.methylation_3PrimeUTRDistance.mean()-normal_all_meth.methylation_vistaEnhancersDistance.mean())
/normal_all_meth.methylation_vistaEnhancersDistance.mean())
print(str("cll_all_PDR.PDR_5PrimeUTRDistance.mean()"))
print((cll_all_meth.methylation_5PrimeUTRDistance.mean()-normal_all_meth.methylation_5PrimeUTRDistance.mean())
/normal_all_meth.methylation_5PrimeUTRDistance.mean())
print(str("cll_all_PDR.PDR_firstExonDistance.mean()"))
print((cll_all_meth.methylation_firstExonDistance.mean()-normal_all_meth.methylation_firstExonDistance.mean())
/normal_all_meth.methylation_firstExonDistance.mean())
print(str("cll_all_PDR.PDR_geneDistalRegulatoryModulesK562Distance.mean()"))
print((cll_all_meth.methylation_geneDistalRegulatoryModulesK562Distance.mean()-normal_all_meth.methylation_geneDistalRegulatoryModulesK562Distance.mean())
/normal_all_meth.methylation_geneDistalRegulatoryModulesK562Distance.mean())
print(str("cll_all_PDR.PDR_hypoInHues64Distance.mean()"))
print((cll_all_meth.methylation_hypoInHues64Distance.mean()-normal_all_meth.methylation_hypoInHues64Distance.mean())
/normal_all_meth.methylation_hypoInHues64Distance.mean())
print(str("cll_all_PDR.PDR_intergenic.mean()"))
print((cll_all_meth.methylation_intergenic.mean()-normal_all_meth.methylation_intergenic.mean())/normal_all_meth.methylation_intergenic.mean())
print(str("cll_all_PDR.PDR_shore.mean()"))
print((cll_all_meth.methylation_shore.mean()-normal_all_meth.methylation_shore.mean())/normal_all_meth.methylation_shore.mean())
print(str("cll_all_PDR.PDR_shelf.mean()"))
print((cll_all_meth.methylation_shelf.mean()-normal_all_meth.methylation_shelf.mean())/normal_all_meth.methylation_shelf.mean())
In [ ]:
In [ ]:
In [ ]:
In [110]:
rank = total_pdr_pairs.groupby("genome_region")["PDR"].mean().sort_values()[::-1].index
sns.boxplot(y=total_pdr_pairs.genome_region, x=total_pdr_pairs.PDR, hue=total_pdr_pairs.category, showfliers=False, order=rank)
plt.title("PDR by genomic regions: 342 Normal vs 104 CLL")
plt.ylabel("genomic region")
Out[110]:
In [ ]:
In [112]:
rank = total_meth_pairs.groupby("genome_region")["methyl"].mean().sort_values()[::-1].index
sns.boxplot(y=total_meth_pairs.genome_region, x=total_meth_pairs.methyl, hue=total_meth_pairs.category, showfliers=False, order=rank)
plt.title("Methylation by regions: 342 Normal vs 104 CLL")
plt.ylabel("genomic region")
plt.xlabel("methylation, percentage")
Out[112]:
In [114]:
rank = total_pdr_pairs.groupby("genome_region")["PDR"].mean().sort_values()[::-1].index
sns.violinplot(y=total_pdr_pairs.genome_region, x=total_pdr_pairs.PDR, hue=total_pdr_pairs.category, showfliers=False, order=rank)
plt.title("PDR by genomic regions: 342 Normal vs 104 CLL")
plt.ylabel("genomic region")
Out[114]:
In [108]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: