Skip to content

Commit b66c789

Browse files
committed
load thesis files
0 parents  commit b66c789

File tree

141 files changed

+5118
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+5118
-0
lines changed

.idea/ML_vs_DL_Bioinformatics_thesis.iml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/R_User_Library.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.spyproject/codestyle.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[codestyle]
2+
indentation = True
3+
4+
[main]
5+
version = 0.1.0
6+

.spyproject/encoding.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[encoding]
2+
text_encoding = utf-8
3+
4+
[main]
5+
version = 0.1.0
6+

.spyproject/vcs.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[vcs]
2+
use_version_control = False
3+
version_control_system =
4+
5+
[main]
6+
version = 0.1.0
7+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
7+
[main]
8+
version = 0.1.0
9+
recent_files = ['C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\40_Richieste_specifiche.py', 'C:\\Users\\anton\\.spyder-py3\\temp.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\15_Modeling.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\10_PCA.py']
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
7+
[main]
8+
version = 0.1.0
9+
recent_files = ['C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\65_Post_processing_NN.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\80_Other_attempt.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\Lasso.py', 'C:\\Users\\anton\\.spyder-py3\\temp.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\20_Modeling_Cancer_type.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\15_Modeling.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\85_Other_attempt.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\17_Modeling_single_cell_line.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\40_Richieste_specifiche.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\Lasso - Copia.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\50_Post_processing.py']
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
7+
[main]
8+
version = 0.1.0
9+
recent_files = ['C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\15_Modeling.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\01_Importazione_dati_e_moduli.py', 'C:\\Users\\anton\\.spyder-py3\\temp.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\25_Modeling_Deep_Learning.py', 'C:\\Users\\anton\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\Utils.py']
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
7+
[main]
8+
version = 0.1.0
9+
recent_files = ['C:\\Users\\amacaluso\\.spyder-py3\\temp.py', 'C:\\Users\\amacaluso\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\10_PCA.py', 'C:\\Users\\amacaluso\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\15_Modeling.py', 'C:\\Users\\amacaluso\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\01_Importazione_dati_e_moduli.py']
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
7+
[main]
8+
version = 0.1.0
9+
recent_files = ['C:\\Users\\amacaluso\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\10_PCA.py']
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
7+
[main]
8+
version = 0.1.0
9+
recent_files = ['C:\\Users\\amacaluso\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\Utils.py', 'C:\\Users\\amacaluso\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\25_Modeling_Deep_Learning.py', 'C:\\Users\\amacaluso\\OneDrive - Alma Mater Studiorum Università di Bologna\\Tesi\\Progetto_Tesi_py\\20_Modeling_Cancer_type.py']
10+

.spyproject/workspace.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
7+
[main]
8+
version = 0.1.0
9+
recent_files = ['C:\\Users\\anton\\.spyder-py3\\temp.py']
10+

01_Importazione_dati_e_moduli.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Created on Sun Feb 26 17:08:26 2017
4+
5+
@author: Antonio
6+
"""
7+
8+
exec(open("Utils.py").read(), globals())
9+
10+
###############################################
11+
############ Importazione dati ################
12+
###############################################
13+
14+
data_X = pd.read_csv('dataset/gene_expression.csv', decimal = '.')
15+
dati_risposta = pd.read_table('dataset/ccle_drug_response.txt', decimal = '.')
16+
17+
complete_dataframe = pd.merge( dati_risposta, data_X, on = 'ID')
18+
#print('La dimensione del dataframe completo (variaibli risposta + regressori) e', complete_dataframe.shape)
19+
20+
X = data_X.drop('ID',1)
21+
22+
sns.set_style('whitegrid')
23+
24+
n_rows = X.shape[0]
25+
n_col = X.shape[1]
26+
27+
print('La dimensione della matrice dei regressori è ', n_rows, 'x', n_col)
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+
47+
48+

03_Descrittive.py

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Created on Sun Mar 19 11:20:17 2017
4+
5+
@author: Antonio
6+
"""
7+
8+
exec(open("Utils.py").read(), globals())
9+
exec(open("01_Importazione_dati_e_moduli.py").read(), globals())
10+
11+
12+
13+
###############################################
14+
############ Descrittive delle colonne ########
15+
###############################################
16+
17+
18+
###############################################
19+
################## MEDIE ######################
20+
###############################################
21+
22+
means = pd.DataFrame( X.apply( np.mean ) )
23+
summary_means = means.describe(percentiles = [0,1])
24+
25+
means = X.apply( np.mean )
26+
sns.kdeplot(np.array( means ), bw=0.5)
27+
means
28+
29+
30+
###############################################
31+
############## Deviazioni standard ############
32+
###############################################
33+
34+
std = pd.DataFrame(X.apply( np.std ))
35+
summary_std = std.describe(percentiles = [0,1])
36+
37+
std = X.apply( np.std )
38+
sns.kdeplot(np.array( std ), bw=0.5)
39+
40+
###############################################
41+
######### Coefficienti di variazione ##########
42+
###############################################
43+
44+
CV = pd.DataFrame(X.apply( stats.variation ))
45+
summary_cv = CV.describe(percentiles = [0,1])
46+
47+
CV = X.apply( stats.variation )
48+
sns.kdeplot(np.array( CV ), bw=0.5)
49+
50+
###############################################
51+
52+
53+
###############################################
54+
################ Analisi missing ##############
55+
###############################################
56+
57+
tipo = list(set(dati_risposta.ix[:,2]))
58+
tipo
59+
60+
lista_null = []
61+
62+
for i in tipo:
63+
dati_correnti = dati_risposta[dati_risposta['Cancer Type'] == i]
64+
current_n_rows = dati_correnti.shape[0]
65+
lista_null.append([i,
66+
current_n_rows,
67+
dati_correnti.ix[: , 4].isnull().sum(),
68+
dati_correnti.ix[: , 5].isnull().sum(),
69+
dati_correnti.ix[: , 6].isnull().sum(),
70+
dati_correnti.ix[: , 7].isnull().sum()])
71+
72+
dataframe_null_type = pd.DataFrame.from_records(lista_null)
73+
dataframe_null_type.columns = ['Cancer_type', 'total_n_row',
74+
'null_BMS_IC_50','null_BMS_AUC',
75+
'null_Z_IC_50', 'null_Z_AUC']
76+
77+
sum_missing = dataframe_null_type.apply( np.sum )
78+
79+
80+
MIN = X.min().min()
81+
MAX = X.max().max()
82+
print(MIN, MAX)
83+
84+
sns.countplot(x="Cancer Type", data=dati_risposta, palette="Greens_d");
85+
plt.subplots_adjust(bottom=0.25)
86+
plt.xticks(rotation=60)
87+
plt.title('\n Distribuzione variabile Cancer Type')
88+
savefig("Presentazione/frequenze.png") #, transparent=True)
89+
plt.show()
90+
91+
import matplotlib.pyplot as plt
92+
93+
dati_risposta.ix[:, [2, 4]].boxplot( by='Cancer Type')
94+
plt.subplots_adjust(bottom=0.15)
95+
plt.xticks(rotation=60)
96+
savefig("Presentazione/boxplot1.png", dpi = 900) #, transparent=True) #), dpi = 500)
97+
plt.show()
98+
99+
100+
dati_risposta.ix[:, [2, 5]].boxplot( by='Cancer Type')
101+
plt.subplots_adjust(bottom=0.25)
102+
plt.xticks(rotation=60)
103+
savefig("Presentazione/boxplot2.png") #, transparent=True) #), dpi = 500)
104+
105+
plt.show()
106+
107+
dati_risposta.ix[:, [2, 6]].boxplot( by='Cancer Type')
108+
plt.subplots_adjust(bottom=0.25)
109+
plt.xticks(rotation=60)
110+
savefig("Presentazione/boxplot3.png") #, transparent=True) #), dpi = 500)
111+
112+
plt.show()
113+
114+
dati_risposta.ix[:, [2, 7]].boxplot( by='Cancer Type')
115+
plt.subplots_adjust(bottom=0.25)
116+
plt.xticks(rotation=60)
117+
savefig("Presentazione/boxplot4.png") #, transparent=True) #), dpi = 500)
118+
plt.show()

0 commit comments

Comments
 (0)