-
Notifications
You must be signed in to change notification settings - Fork 1
/
project_bash.sh
executable file
·183 lines (166 loc) · 7.23 KB
/
project_bash.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# hsa --> homo sapiens(human), org.Hs.eg.db
# Genome Wide annotation
# https://bioconductor.org/packages/3.12/data/annotation/
############################## 1.EXPORTING PRIOR BIOLOGICAL KNOWLEDGE LAYER (START) ###############################
# Exporting pathway info
echo "Exporting signaling pathway information from hipathia --- scripts/pathway_layer_data/1.1-pg-pathway-from-hipathia.r executing..."
Rscript scripts/pathway_layer_data/1.1-pg-pathway-from-hipathia.r -sp hsa -src hipathia
# Remowing disease related pathways
echo "Processing the pathway list, removing disease related pathways --- scripts/pathway_layer_data/1.2-pg-remove-disease-cancer.py executing..."
python scripts/pathway_layer_data/1.2-pg-remove-disease-cancer.py -sp hsa -src hipathia
# exporting gene list
echo "Exporting gene list based on processed pathway list in 1.2-pg-remove-disease-cancer.py --> scripts/pathway_layer_data/1.3-pg-gene-from-hipathia.r executing..."
Rscript scripts/pathway_layer_data/1.3-pg-gene-from-hipathia.r -sp hsa -src hipathia
# Converting entrez id into gene symbol
echo "Converting entrez id value into gene symbol --> scripts/pathway_layer_data/1.4-pg-gene-id-entrez-converter.r executed!!"
Rscript scripts/pathway_layer_data/1.4-pg-gene-id-entrez-converter.r -sp hsa -src hipathia -ga org.Hs.eg.db
# Creating pathway-gene matrix
echo "Creating prior biological knowledge information to include the nn design in first hidden layer --> scripts/pathway_layer_data/1.5-pg-creating-biological-layer.py executing..."
python scripts/pathway_layer_data/1.5-pg-creating-biological-layer.py -sp hsa -src hipathia
echo "PATHWAY INFORMATION EXPORTED!!!"
echo "Exporting data/processed/pbk_layer_{BIO_SOURCE} files"
python scripts/bio_layer_data/1.0-pg-exporting-bio-layer.py
# Creating circuit matrix
echo "Exporting circuits matrix --> scripts/pathway_layer_data/1.6-pg-creating-biological-layer_circuits.py"
python scripts/pathway_layer_data/1.6-pg-creating-biological-layer_circuits.py
############################### 1.EXPORTING PRIOR BIOLOGICAL KNOWLEDGE LAYER (END) ################################
######################################### 2.DATASET PREPROCESSING (START) #########################################
echo "PREPROCESSING EXPERIMENTS' DATASETS"
# $ python notebooks/2.0-pg-preprocessing-dataset.py -exp {EXPERIMENT NAME}
# -ds {DATASET NAME}
# -sc {SCALER, StandardScaler(ss), MinMaxScaker(mms), Log1p}
# -tci {TARGET COLUMN INDEX}
# -ofn {OUTPUT FILE NAME}
echo "PREPROCESSING of EXPERIMENT MELANOMA DATASET"
python notebooks/2.0-pg-preprocessing-dataset.py \
-exp exper_melanoma \
-ds reference.pck \
-sw False \
-sc log1p \
-tci -1 \
-ofn reference_log1p &&
python notebooks/2.0-pg-preprocessing-dataset.py \
-exp exper_melanoma \
-ds query.pck \
-sw False \
-sc log1p \
-tci -1 \
-ofn query_log1p
echo "PREPROCESSING of EXPERIMENT PBMC DATASET"
python notebooks/2.0-pg-preprocessing-dataset.py \
-exp exper_pbmc \
-ds Immune.pck \
-sw True \
-sc log1p \
-tci -1 \
-ofn pbmc_sw_log1p
echo "PREPROCESSING of EXPERIMENT IMMUNE DATASET"
python notebooks/2.0-pg-preprocessing-dataset.py \
-exp exper_immune \
-ds Fig3g.pck \
-sw False \
-sc None \
-tci -1 \
-ofn immune_new
########################################## 2.DATASET PREPROCESSING (END) ##########################################
############################################### 3.EXPERIMENT (START) ##############################################
echo "NEURAL NETWORK TRAINING"
# network parameters
optimizer_var='Adam'
activation_var='relu'
tuning='False'
filter_space='False'
# prior biological knowledge detail
pbk_var='pbk_circuit_hsa_sig.txt' #circuits
pbk_info='circuits'
########################################### a.IMMUNE EXPERIMENT (START) ###########################################
echo "IMMUNE EXPERIMENT"
# analysis_var='encoding'
# analysis_var='performance'
analysis_var='evaluate_rskf'
ds_var='processed/exper_immune/immune_new.pck'
# 1-LAYER SIGNALING
python notebooks/4.0-pg-model.py \
-design ${pbk_info}_1_layer \
-first_hidden_layer_pbk $pbk_var \
-first_hidden_layer_dense 0 \
-second_hidden_layer False \
-optimizer $optimizer_var \
-activation $activation_var \
-ds $ds_var \
-analysis $analysis_var \
-filter_gene_space $filter_space \
-hp_tuning $tuning
# 2-LAYER SIGNALING
python notebooks/4.0-pg-model.py \
-design ${pbk_info}_2_layer \
-first_hidden_layer_pbk $pbk_var \
-first_hidden_layer_dense 0 \
-second_hidden_layer True \
-optimizer $optimizer_var \
-activation $activation_var \
-ds $ds_var \
-analysis $analysis_var \
-filter_gene_space $filter_space \
-hp_tuning $tuning
############################################ a.IMMUNE EXPERIMENT (END) ############################################
############################################ b.PBMC EXPERIMENT (START) ############################################
echo "PBMC EXPERIMENT"
analysis_var='evaluate_rskf'
ds_var='processed/exper_pbmc/pbmc_sw_log1p.pck'
# 1-LAYER SIGNALING
python notebooks/4.0-pg-model.py \
-design ${pbk_info}_1_layer \
-first_hidden_layer_pbk $pbk_var \
-first_hidden_layer_dense 0 \
-second_hidden_layer False \
-optimizer $optimizer_var \
-activation $activation_var \
-ds $ds_var \
-analysis $analysis_var \
-filter_gene_space $filter_space \
-hp_tuning $tuning
# 2-LAYER SIGNALING
python notebooks/4.0-pg-model.py \
-design ${pbk_info}_2_layer \
-first_hidden_layer_pbk $pbk_var \
-first_hidden_layer_dense 0 \
-second_hidden_layer True \
-optimizer $optimizer_var \
-activation $activation_var \
-ds $ds_var \
-analysis $analysis_var \
-filter_gene_space $filter_space \
-hp_tuning $tuning
############################################# b.PBMC EXPERIMENT (END) #############################################
######################################### 3c.MELANOMA EXPERIMENT (START) ##########################################
echo "MELANOMA EXPERIMENT"
# analysis_var='None'
analysis_var='encoding'
ds_var='processed/exper_melanoma/reference_log1p.pck'
# 1-LAYER SIGNALING
python notebooks/4.0-pg-model.py \
-design ${pbk_info}_1_layer \
-first_hidden_layer_pbk $pbk_var \
-first_hidden_layer_dense 0 \
-second_hidden_layer False \
-optimizer $optimizer_var \
-activation $activation_var \
-ds $ds_var \
-analysis $analysis_var \
-filter_gene_space $filter_space \
-hp_tuning $tuning
# 2-LAYER SIGNALING
python notebooks/4.0-pg-model.py \
-design ${pbk_info}_2_layer \
-first_hidden_layer_pbk $pbk_var \
-first_hidden_layer_dense 0 \
-second_hidden_layer True \
-optimizer $optimizer_var \
-activation $activation_var \
-ds $ds_var \
-analysis $analysis_var \
-filter_gene_space $filter_space \
-hp_tuning $tuning
########################################## 3c.MELANOMA EXPERIMENT (END) ###########################################
################################################ 3.EXPERIMENT (END) ###############################################