Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
byemaxx committed Jul 24, 2024
2 parents 195b9a4 + 3595ac6 commit 2171364
Show file tree
Hide file tree
Showing 20 changed files with 9,585 additions and 8,996 deletions.
6 changes: 6 additions & 0 deletions Docs/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version: 1.109.3
## Date: 2024-07-24
### Changes:
- Change: Optimized the UI of plot settings.


# Version: 1.109.2
## Date: 2024-07-23
### Changes:
Expand Down
Binary file modified Docs/MetaX_Cookbook.assets/anova_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/basic_setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/basic_stats_heatmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/basic_stats_heatmap_seeting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/basic_stats_pca.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/co_network_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/co_network_setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/deseq2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/group_control_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/t_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/taxa_func_link_net_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/taxa_func_link_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/taxa_func_link_page2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/MetaX_Cookbook.assets/trends_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Docs/MetaX_Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ We can select <u>**meta**</u> <u>**groups**</u> or <u>**samples**</u> (default a

- Change settings in the **PLOT PARAMETER** tab

- <img src="MetaX_Cookbook.assets/basic_setting.png" alt="basic_setting" style="zoom:80%;" />
- <img src="MetaX_Cookbook.assets/basic_setting.png" alt="basic_setting" />


Expand Down Expand Up @@ -565,7 +565,7 @@ We can select <u>**meta**</u> <u>**groups**</u> or <u>**samples**</u> (default a



<img src="./MetaX_Cookbook.assets/deseq2.png" alt="image-20230728123725717"/>
<img src="./MetaX_Cookbook.assets/deseq2.png">

- Select <u>p-adjust</u>, <u>log2FC</u> to plot

Expand Down
69 changes: 17 additions & 52 deletions metax/gui/main_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QTextBrowser
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import Qt, QTimer, QDir, QSettings
from PyQt5.QtWidgets import QToolBox
from PyQt5.QtWidgets import QToolBox, QGroupBox

import qtawesome as qta
# from qt_material import apply_stylesheet
Expand Down Expand Up @@ -398,9 +398,6 @@ def __init__(self, MainWindow):

### ANOVA
self.pushButton_anova_test.clicked.connect(self.anova_test)

### Group Control Test
self.hide_all_in_layout(self.gridLayout_38)

# self.hiddenTab = self.tabWidget_3.widget(3)
# self.tabWidget_3.removeTab(3)
Expand Down Expand Up @@ -512,6 +509,9 @@ def __init__(self, MainWindow):
self.toolButton_db_anno_folder_help.clicked.connect(self.show_toolButton_db_anno_folder_help)

self.set_change_event_for_all_condition_group()

# hide ploting setting groupbox
self.hide_plot_setting_groupbox()

# init theme
self.init_theme_menu()
Expand Down Expand Up @@ -768,6 +768,17 @@ def change_event_comboBox_3dbar_sub_meta(self):
# else:
# self.comboBox_3dbar_sub_meta.setEnabled(True)

def hide_plot_setting_groupbox(self):
groupbox_list = ["groupBox_basic_plot", "groupBox_basic_heatmap_plot_settings",
"groupBox_cross_heatmap_settings", "groupBox_deseq2_plot_settings",
"groupBox_co_expression_plot_settings", "groupBox_expression_trends_plot_settings",
"groupBox_taxa_func_link_plot_settings", "groupBox_taxa_func_link_net_plot_settings"
]
for groupbox_name in groupbox_list:
groupbox = getattr(self, groupbox_name)
groupbox.setVisible(False)



############### basic function End ###############

Expand Down Expand Up @@ -1442,56 +1453,14 @@ def swith_stack_page_dbuilder(self):
def swith_stack_page_db_update(self):
self.stackedWidget.setCurrentIndex(3)

# def swith_stack_page_about(self):
# self.stackedWidget.setCurrentIndex(3)

def cross_test_tab_change(self, index):
if index in [3, 4]: # TUKEY Test or DESeq2 Test
# self.hide_all_in_layout(self.gridLayout_top_heatmap_plot)
self.hide_all_in_layout(self.toolBox_9)
else:
self.show_all_in_layout(self.toolBox_9)

if index == 2: # Group Control Test
self.hide_all_in_layout(self.gridLayout_38)
self.groupBox_cross_heatmap_plot.setVisible(False)
else:
self.show_all_in_layout(self.gridLayout_38)
self.groupBox_cross_heatmap_plot.setVisible(True)



def hide_all_in_layout(self, layout):
if isinstance(layout, QToolBox):
# For QToolBox
layout.hide()
else:
# For other types of layout
for i in range(layout.count()):
layout_item = layout.itemAt(i)
if layout_item.widget() is not None:
layout_item.widget().hide()
elif layout_item.layout() is not None:
self.hide_all_in_layout(layout_item.layout())

def show_all_in_layout(self, layout, if_except=True):
except_list = ['doubleSpinBox_mini_log2fc_heatmap', 'label_138',
'comboBox_cross_3_level_plot_df_type', 'label_141',
'checkBox_cross_3_level_plot_remove_zero_col', 'label_139',
'doubleSpinBox_max_log2fc_heatmap'] if if_except else []

if isinstance(layout, QToolBox):
# For QToolBox
layout.show()
else:
# For other types of layout
for i in range(layout.count()):
layout_item = layout.itemAt(i)
if layout_item.widget() is not None:
if layout_item.widget().objectName() not in except_list:
layout_item.widget().show()
elif layout_item.layout() is not None:
self.show_all_in_layout(layout_item.layout(), if_except=if_except)


def add_theme_to_combobox(self):
# get all themes
from matplotlib import colormaps
Expand Down Expand Up @@ -2275,7 +2244,6 @@ def change_event_comboBox_top_heatmap_table(self):

if 'dunnett_test' in selected_table_name:
self.comboBox_top_heatmap_sort_type.setEnabled(False)
self.hide_all_in_layout(self.gridLayout_38)

if selected_table_name.startswith('deseq2allin') or selected_table_name.startswith('dunnettAllCondtion'):
self.comboBox_cross_3_level_plot_df_type.setEnabled(True)
Expand All @@ -2284,7 +2252,6 @@ def change_event_comboBox_top_heatmap_table(self):

if selected_table_name.startswith('deseq2'):

self.show_all_in_layout(self.gridLayout_38, if_except=False)
self.doubleSpinBox_mini_log2fc_heatmap.setEnabled(True)
self.doubleSpinBox_max_log2fc_heatmap.setEnabled(True)

Expand All @@ -2299,14 +2266,12 @@ def change_event_comboBox_top_heatmap_table(self):
self.comboBox_top_heatmap_sort_type.addItems(['padj', 'pvalue'])

if selected_table_name.startswith('dunnettAllCondtion'):
self.show_all_in_layout(self.gridLayout_38, if_except=False)
self.doubleSpinBox_mini_log2fc_heatmap.setEnabled(False)
self.doubleSpinBox_max_log2fc_heatmap.setEnabled(False)
self.comboBox_top_heatmap_sort_type.setEnabled(False)


else:
self.hide_all_in_layout(self.gridLayout_38)
self.label_57.setText('Sort By:')
sort_type_list = ["p-value", "f-statistic (ANOVA)", "t-statistic (T-Test)"]
if 't_test' in selected_table_name:
Expand Down
Loading

0 comments on commit 2171364

Please sign in to comment.