@@ -63,9 +63,10 @@ def ProteinComplexFigure(self, proteinSubunit, proteinData, colNames):
63
63
self .axes .scatter (temps , vec , marker = '.' , label = p , s = 15 )
64
64
self .axes .plot (temps_ , meltCurve (temps_ , paras [0 ], paras [1 ], paras [2 ]), lw = 1 )
65
65
66
- self .axes .set_xlabel ('Temperature (℃)' , fontsize = 5 )
67
- self .axes .set_ylabel ('Abundances' , fontsize = 5 )
68
- self .axes .legend (fontsize = 4 , bbox_to_anchor = (1 ,1 ), loc = "upper left" )
66
+ self .axes .set_xlabel ('Temperature (℃)' , fontsize = 6 )
67
+ self .axes .set_ylabel ('Abundances' , fontsize = 6 )
68
+ self .axes .tick_params (labelsize = 5 )
69
+ self .axes .legend (fontsize = 4.5 , bbox_to_anchor = (1 ,1 ), loc = "upper left" )
69
70
self .draw ()
70
71
71
72
@@ -83,9 +84,9 @@ def AverageTSAFigure(self, proteinData1, proteinData2, colNames):
83
84
self .axes .plot (temps , vec_2 , label = 'Group 2' )
84
85
85
86
self .axes .tick_params (labelsize = 4 )
86
- self .axes .set_xlabel ('Temperature (℃)' , fontsize = 3 )
87
- self .axes .set_ylabel ('Abundances' , fontsize = 3 )
88
- self .axes .legend (fontsize = 3 )
87
+ self .axes .set_xlabel ('Temperature (℃)' , fontsize = 5 )
88
+ self .axes .set_ylabel ('Abundances' , fontsize = 5 )
89
+ self .axes .legend (fontsize = 4 )
89
90
self .draw ()
90
91
91
92
@@ -109,8 +110,8 @@ def SingleTSAFigure(self, proteinData1, proteinData2, colNames, ProteinAccession
109
110
self .axes .plot (temps_ , meltCurve (temps_ , paras2 [0 ], paras2 [1 ], paras2 [2 ]))
110
111
111
112
self .axes .tick_params (labelsize = 4 )
112
- self .axes .set_xlabel ('Temperature (℃)' , fontsize = 4 )
113
- self .axes .set_ylabel ('Abundances' , fontsize = 4 )
113
+ self .axes .set_xlabel ('Temperature (℃)' , fontsize = 5 )
114
+ self .axes .set_ylabel ('Abundances' , fontsize = 5 )
114
115
self .axes .legend (fontsize = 3 )
115
116
self .draw ()
116
117
@@ -119,18 +120,18 @@ def RSDHistFigure(self, rsdList):
119
120
rsdList = [i for i in rsdList if not np .isnan (i )]
120
121
self .axes .cla ()
121
122
self .axes .hist (rsdList , 100 )
122
- self .axes .tick_params (labelsize = 3 )
123
- self .axes .set_xlabel ('RSD' , fontsize = 3 )
124
- self .axes .set_ylabel ('Number' , fontsize = 3 )
123
+ self .axes .tick_params (labelsize = 4 )
124
+ self .axes .set_xlabel ('RSD' , fontsize = 4 )
125
+ self .axes .set_ylabel ('Number' , fontsize = 4 )
125
126
self .draw ()
126
127
127
128
128
129
def ROCFigure (self , fpr , tpr , auroc ):
129
130
self .axes .cla ()
130
131
self .axes .plot (fpr , tpr , label = 'AUC = {}' .format (auroc ), color = 'red' , lw = 0.7 )
131
132
self .axes .plot ([0 , 1 ], [0 , 1 ], color = 'black' , linestyle = '--' , lw = 0.7 )
132
- self .axes .set_xlabel ('False Positive Rate' , fontsize = 4 )
133
- self .axes .set_ylabel ('True Positive Rate' , fontsize = 4 )
133
+ self .axes .set_xlabel ('False Positive Rate' , fontsize = 5 )
134
+ self .axes .set_ylabel ('True Positive Rate' , fontsize = 5 )
134
135
self .axes .tick_params (labelsize = 4 )
135
136
self .axes .legend (fontsize = 3 )
136
137
self .draw ()
@@ -156,8 +157,8 @@ def ProteinPairFigure(self, p1, p2, proteinData, colNames):
156
157
self .axes .scatter (temps , vec , marker = '.' , label = p , s = 5 )
157
158
self .axes .plot (temps_ , meltCurve (temps_ , paras [0 ], paras [1 ], paras [2 ]), lw = 1 )
158
159
159
- self .axes .set_xlabel ('Temperature (℃)' , fontsize = 5 )
160
- self .axes .set_ylabel ('Abundances' , fontsize = 5 )
160
+ self .axes .set_xlabel ('Temperature (℃)' , fontsize = 6 )
161
+ self .axes .set_ylabel ('Abundances' , fontsize = 6 )
161
162
self .axes .legend (fontsize = 4 )
162
163
self .draw ()
163
164
@@ -181,7 +182,7 @@ def iTSA_Volcano(self, iTSA_result, fc_thres, pv_thres):
181
182
# sig = np.where(np.logical_and(np.abs(fc) >= np.log2(fc_thres), pv >= -np.log10(pv_thres)))[0]
182
183
183
184
self .axes .cla ()
184
- scatterplot (data = pltdata , x = "FC" , y = "PV" , hue = "G" , palette = 'tab10' , legend = False , alpha = 0.9 , marker = '. ' , ax = self .axes )
185
+ scatterplot (data = pltdata , x = "FC" , y = "PV" , hue = "G" , palette = 'tab10' , legend = False , marker = '.' , alpha = 0.7 , edgecolor = 'none ' , ax = self .axes )
185
186
'''
186
187
markers = pltdata[pltdata['G'] == 'Both sig']
187
188
markers = markers.iloc[:min(len(markers), 10),:]
@@ -197,8 +198,8 @@ def iTSA_Volcano(self, iTSA_result, fc_thres, pv_thres):
197
198
self .axes .axvline (x = np .log2 (fc_thres ),ls = '--' , color = 'black' , lw = 0.5 )
198
199
self .axes .axvline (x = - np .log2 (fc_thres ),ls = '--' , color = 'black' , lw = 0.5 )
199
200
self .axes .axhline (y = - np .log10 (pv_thres ), ls = '--' , color = 'black' , lw = 0.5 )
200
- self .axes .set_xlabel ('Log FC' , fontsize = 4 )
201
- self .axes .set_ylabel ('-Log Adj P' , fontsize = 4 )
201
+ self .axes .set_xlabel ('Log FC' , fontsize = 5 )
202
+ self .axes .set_ylabel ('-Log Adj P' , fontsize = 5 )
202
203
self .axes .tick_params (labelsize = 4 )
203
204
self .draw ()
204
205
@@ -213,9 +214,9 @@ def PCAPlot(self, X, y):
213
214
self .axes .cla ()
214
215
for i in range (len (label )):
215
216
self .axes .scatter (X_r [y == label [i ], 0 ], X_r [y == label [i ], 1 ], alpha = .8 , lw = 1 , label = target_names [i ], s = 10 )
216
- self .axes .set_xlabel ('PC 1' , fontsize = 4 )
217
- self .axes .set_ylabel ('PC 2' , fontsize = 4 )
218
- self .axes .tick_params (labelsize = 4 )
217
+ self .axes .set_xlabel ('PC 1' , fontsize = 5 )
218
+ self .axes .set_ylabel ('PC 2' , fontsize = 5 )
219
+ self .axes .tick_params (labelsize = 5 )
219
220
self .draw ()
220
221
221
222
@@ -225,8 +226,8 @@ def BarChart(self, X, y):
225
226
flierprops = dict (markersize = 2 )
226
227
bplot = self .axes .boxplot (np .log2 (X ), patch_artist = True , flierprops = flierprops )
227
228
self .axes .set_xticklabels (list (X .columns ), rotation = 90 )
228
- self .axes .set_xlabel ('Sample' , fontsize = 5 )
229
- self .axes .set_ylabel ('Log2 Intensity' , fontsize = 5 )
229
+ self .axes .set_xlabel ('Sample' , fontsize = 6 )
230
+ self .axes .set_ylabel ('Log2 Intensity' , fontsize = 6 )
230
231
colors = [cm (val / len (X .columns )) for val in range (len (X .columns ))]
231
232
for patch , color in zip (bplot ['boxes' ], colors ):
232
233
patch .set_facecolor (color )
@@ -239,8 +240,8 @@ def CorrHeatMap(self, X):
239
240
self .axes .imshow (corr , cmap = "YlOrBr" )
240
241
self .axes .set_xticks (np .arange (corr .shape [0 ]))
241
242
self .axes .set_yticks (np .arange (corr .shape [0 ]))
242
- self .axes .set_xticklabels (list (X .columns ), fontsize = 5 , rotation = 90 )
243
- self .axes .set_yticklabels (list (X .columns ), fontsize = 5 )
243
+ self .axes .set_xticklabels (list (X .columns ), fontsize = 6 , rotation = 90 )
244
+ self .axes .set_yticklabels (list (X .columns ), fontsize = 6 )
244
245
for i in range (corr .shape [0 ]):
245
246
for j in range (corr .shape [0 ]):
246
247
self .axes .text (i , j , corr [i , j ], ha = "center" , va = "center" , color = "black" , fontsize = 3 )
@@ -274,7 +275,7 @@ def TPP2D_Volcano(self, fdr_df, hits):
274
275
# sig = np.where(np.logical_and(np.abs(fc) >= np.log2(fc_thres), pv >= -np.log10(pv_thres)))[0]
275
276
276
277
self .axes .cla ()
277
- scatterplot (data = pltdata , x = "x" , y = "y" , hue = "G" , palette = 'tab10' , legend = False , alpha = 0.9 , marker = '.' , ax = self .axes )
278
+ scatterplot (data = pltdata , x = "x" , y = "y" , hue = "G" , palette = 'tab10' , legend = False , alpha = 0.7 , edgecolor = 'none' , marker = '.' , ax = self .axes )
278
279
'''
279
280
markers = pltdata[pltdata['G'] == 'Hits']
280
281
markers = markers.iloc[:min(len(markers), 10),:]
@@ -287,8 +288,8 @@ def TPP2D_Volcano(self, fdr_df, hits):
287
288
expand_points=(1, 1), expand_text=(1, 1),
288
289
arrowprops=dict(arrowstyle="-", color='black', lw=0.5), ax=self.axes)
289
290
'''
290
- self .axes .set_xlabel ('sign(k) sqrt(RSS0-RSS1)' , fontsize = 4 )
291
- self .axes .set_ylabel ('np.log2 (F_statistic + 1)' , fontsize = 4 )
291
+ self .axes .set_xlabel ('sign(k) sqrt(RSS0-RSS1)' , fontsize = 5 )
292
+ self .axes .set_ylabel ('np.log2 (F_statistic + 1)' , fontsize = 5 )
292
293
self .axes .tick_params (labelsize = 4 )
293
294
self .draw ()
294
295
@@ -305,8 +306,9 @@ def TPP2D_protHeatmap(self, data, ProteinAccession):
305
306
img = pd .DataFrame (img )
306
307
img .index = conc
307
308
img .columns = temp
308
- heatmap (img , ax = self .axes )
309
- self .axes .set_xlabel ('drug concentration' , fontsize = 5 )
310
- self .axes .set_ylabel ('temperture' , fontsize = 5 )
309
+ heatmap (img , ax = self .axes , cbar = False )
310
+ self .axes .tick_params (labelsize = 6 )
311
+ self .axes .set_xlabel ('temperture' , fontsize = 6 )
312
+ self .axes .set_ylabel ('drug concentration' , fontsize = 6 )
311
313
self .draw ()
312
314
0 commit comments