diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md
index 452106c..cf38796 100644
--- a/Docs/ChangeLog.md
+++ b/Docs/ChangeLog.md
@@ -1,3 +1,15 @@
+
+# Version: 1.119.7
+## Date: 2024-12-5
+### Changes:
+- Change: Optimized the Data Overview section to make the layout more clear.
+- Update README.md
+
+# Version: 1.119.6
+## Date: 2024-12-5
+### Changes:
+- Change: Optimized the correlation heatmap plot.
+
# Version: 1.119.5
## Date: 2024-12-3
### Changes:
diff --git a/Docs/MetaX_Cookbook.assets/otf_heatmap.png b/Docs/MetaX_Cookbook.assets/otf_heatmap.png
new file mode 100644
index 0000000..e499ec2
Binary files /dev/null and b/Docs/MetaX_Cookbook.assets/otf_heatmap.png differ
diff --git a/README.md b/README.md
index 263bda4..2392313 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,11 @@ Show all functions of a taxon
-
+**OTF Heatmap**
+Show OTFS intensity in groups(samples), e.g., **Species-KO** OTF Heatmap
+
+
## Download & Installation
- **Desktop Version** (Recommended)
diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py
index 0c473fc..e3b5f22 100644
--- a/metax/gui/main_gui.py
+++ b/metax/gui/main_gui.py
@@ -365,6 +365,7 @@ def __init__(self, MainWindow):
self.comboBox_method_of_protein_inference.currentIndexChanged.connect(self.update_method_of_protein_inference)
self.comboBox_3dbar_sub_meta.currentIndexChanged.connect(self.change_event_comboBox_3dbar_sub_meta)
self.comboBox_tflink_sub_meta.currentIndexChanged.connect(self.change_event_comboBox_tflink_sub_meta)
+ self.comboBox_sub_meta_pca.currentIndexChanged.connect(self.change_event_comboBox_sub_meta_pca)
## Basic Stat
self.pushButton_plot_pca_sns.clicked.connect(lambda: self.plot_basic_info_sns('pca'))
@@ -889,6 +890,13 @@ def change_event_comboBox_3dbar_sub_meta(self):
# self.comboBox_3dbar_sub_meta.setEnabled(False)
# else:
# self.comboBox_3dbar_sub_meta.setEnabled(True)
+
+ def change_event_comboBox_sub_meta_pca(self):
+ if self.comboBox_sub_meta_pca.currentText() != 'None':
+ self.checkBox_corr_plot_samples.setEnabled(False)
+ else:
+ self.checkBox_corr_plot_samples.setEnabled(True)
+
def change_event_comboBox_tflink_sub_meta(self):
# when the sub_meta comboBox is not None, the mean plot is not available
if self.comboBox_tflink_sub_meta.currentText() != 'None':
@@ -1037,7 +1045,7 @@ def change_theme(self, theme, silent=False):
padding: 5px;
margin: 2px;
height: 20px;
- }}
+ }}
'''
current_app = QtWidgets.QApplication.instance()
@@ -4062,7 +4070,7 @@ def plot_trends_cluster(self):
width=width, height=height, title=title
, font_size=font_size, num_col=num_col)
# create a dialog to show the figure
- # plt_dialog = PltDialog(self.MainWindow, fig)
+ # plt_dialog = PltDialog(self.MainWindow, fig) #obsolete
plt_size= (width*50, int(height*num_cluster*50/num_col) )
plt_dialog = ExportablePlotDialog(self.MainWindow,fig, plt_size)
#set title
@@ -4340,9 +4348,9 @@ def plot_taxa_stats(self):
else:
# BasicPlot(self.tfa).plot_taxa_stats()
theme = self.comboBox_data_overiew_theme.currentText()
- pic = BasicPlot(self.tfa).plot_taxa_stats_pie(theme=theme)
+ pic = BasicPlot(self.tfa).plot_taxa_stats_pie(theme=theme, font_size=8, width=5, height=4)
# Add the new MatplotlibWidget
- self.mat_widget_plot_peptide_num = MatplotlibWidget(pic)
+ self.mat_widget_plot_peptide_num = MatplotlibWidget(pic, width = 5, height = 4)
self.verticalLayout_overview_plot.addWidget(self.mat_widget_plot_peptide_num)
def plot_taxa_stats_new_window(self):
@@ -4361,9 +4369,10 @@ def plot_taxa_number(self):
QMessageBox.warning(self.MainWindow, 'Warning', 'Please run OTF Analyzer first!')
else:
theme = self.comboBox_data_overiew_theme.currentText()
- pic = BasicPlot(self.tfa).plot_taxa_number(theme = theme).get_figure()
+ pic = BasicPlot(self.tfa).plot_taxa_number(theme = theme, font_size = 8, width = 5,height = 4
+ ).get_figure()
- self.mat_widget_plot_taxa_num = MatplotlibWidget(pic)
+ self.mat_widget_plot_taxa_num = MatplotlibWidget(pic, width = 5, height = 4)
self.verticalLayout_overview_plot.addWidget(self.mat_widget_plot_taxa_num)
def plot_taxa_number_new_window(self):
@@ -4391,9 +4400,9 @@ def plot_peptide_num_in_func(self):
self.show_message('Plotting peptide number in function...')
BasicPlot(self.tfa).plot_prop_stats(func_name, theme=theme, res_type='show', font_size = font_size)
else:
- pic = BasicPlot(self.tfa).plot_prop_stats(func_name, theme=theme)
+ pic = BasicPlot(self.tfa).plot_prop_stats(func_name, theme=theme, font_size = 8, width=5, height=4)
- self.mat_widget_plot_peptide_num_in_func = MatplotlibWidget(pic.get_figure())
+ self.mat_widget_plot_peptide_num_in_func = MatplotlibWidget(pic.get_figure(), width = 5, height = 4)
self.verticalLayout_overview_func.addWidget(self.mat_widget_plot_peptide_num_in_func)
@@ -4509,6 +4518,8 @@ def get_title_by_table_name(self, table_name):
cluster = self.checkBox_corr_cluster.isChecked()
show_all_labels = (self.checkBox_corr_show_all_labels_x.isChecked(), self.checkBox_corr_show_all_labels_y.isChecked())
cmap = self.comboBox_basic_corr_cmap.currentText()
+ corr_method = self.comboBox_basic_corr_method.currentText()
+ plot_mean = False if self.checkBox_corr_plot_samples.isChecked() else True
# checek if the dataframe has at least 2 rows and 2 columns
if df.shape[0] < 2 or df.shape[1] < 2:
QMessageBox.warning(self.MainWindow, 'Warning', 'The number of rows or columns is less than 2, correlation cannot be plotted!')
@@ -4520,7 +4531,8 @@ def get_title_by_table_name(self, table_name):
BasicPlot(self.tfa, **self.heatmap_params_dict).plot_corr_sns(df=df, title_name=title_name, cluster= cluster,
width=width, height=height, font_size=font_size,
show_all_labels=show_all_labels, theme=theme, cmap=cmap,
- rename_sample = rename_sample)
+ rename_sample = rename_sample, corr_method=corr_method,
+ plot_mean = plot_mean, sub_meta = sub_meta)
elif method == 'alpha_div':
self.show_message('Alpha diversity is running, please wait...')
@@ -5355,9 +5367,11 @@ def plot_co_expr(self, plot_type = 'network'):
self.show_message('Co-expression heatmap is plotting...\n\n It may take a long time! Please wait...')
try:
print(f'Calculate correlation with {corr_method} method...')
- df = self.tfa.BasicStats.get_correlation(df_type = df_type, sample_list = sample_list, focus_list = focus_list, plot_list_only = plot_list_only, rename_taxa = rename_taxa, method=corr_method)
+ df = self.tfa.BasicStats.get_correlation(df_type = df_type, sample_list = sample_list,
+ focus_list = focus_list, plot_list_only = plot_list_only,
+ rename_taxa = rename_taxa, method=corr_method)
# save df to table_dict
- self.update_table_dict(f'expression correlation heatmap({df_type})', df)
+ self.update_table_dict(f'{corr_method} correlation heatmap({df_type})', df)
show_all_labels = (
self.checkBox_corr_hetatmap_show_all_labels_x.isChecked(),
@@ -5365,12 +5379,12 @@ def plot_co_expr(self, plot_type = 'network'):
)
cmap = self.comboBox_corr_hetatmap_cmap.currentText()
BasicPlot(self.tfa, **self.heatmap_params_dict).plot_items_corr_heatmap(df=df,
- title_name=f'Expression Correlation Heatmap({df_type})',
+ title_name=f'{corr_method.capitalize()} Correlation of {df_type}',
cluster=True,
cmap=cmap,
width=width, height=height,
font_size=font_size,
- show_all_labels=show_all_labels
+ show_all_labels=show_all_labels,
)
except Exception:
diff --git a/metax/gui/metax_gui/main_window.ui b/metax/gui/metax_gui/main_window.ui
index 5ddd1fe..32aac38 100644
--- a/metax/gui/metax_gui/main_window.ui
+++ b/metax/gui/metax_gui/main_window.ui
@@ -46,7 +46,7 @@
Qt::LeftToRight
- 5
+ 1
false
@@ -186,7 +186,7 @@
-
- Operational Taxa-Functions (OTF) Table (head 200)
+ Operational Taxon-Function (OTF) Table (head 200)
@@ -205,6 +205,9 @@
0
+
+ true
+
-
@@ -215,6 +218,15 @@
0
+
+ true
+
+
+ true
+
+
+ false
+
-
@@ -246,7 +258,7 @@
0
0
462
- 531
+ 527
@@ -1447,7 +1459,7 @@
QTabWidget::Triangular
- 1
+ 0
@@ -1830,7 +1842,7 @@
0
0
- 799
+ 885
239
@@ -2406,6 +2418,12 @@
-
+
+
+ 0
+ 0
+
+
Show All Labels
@@ -2413,6 +2431,12 @@
-
+
+
+ 0
+ 0
+
+
X
@@ -2420,11 +2444,33 @@
-
+
+
+ 0
+ 0
+
+
Y
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Theme
+
+
+
+ -
+
+
-
@@ -2471,6 +2517,13 @@
-
+
-
+
+
+ Plot Samples
+
+
+
-
@@ -2488,20 +2541,42 @@
-
-
+
-
+
0
0
- Theme
+ Method
-
-
+
+
+
+ 0
+ 0
+
+
+
-
+
+ pearson
+
+
+ -
+
+ spearman
+
+
+ -
+
+ kendall
+
+
+
@@ -3185,8 +3260,8 @@
0
0
- 885
- 170
+ 665
+ 157
@@ -6532,7 +6607,7 @@
QTabWidget::Triangular
- 1
+ 0
@@ -6747,7 +6822,7 @@
0
0
885
- 170
+ 168
@@ -6840,6 +6915,11 @@
spearman
+ -
+
+ kendall
+
+
@@ -7131,7 +7211,7 @@
false
- Plot Co-Expression Heatmap
+ Plot Correlation Heatmap
@@ -7596,8 +7676,8 @@
0
0
- 885
- 123
+ 620
+ 65
@@ -8350,8 +8430,8 @@
0
0
- 885
- 225
+ 775
+ 102
@@ -9532,7 +9612,7 @@
0
0
885
- 158
+ 155
@@ -10801,7 +10881,7 @@
0
0
991
- 21
+ 23