diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index 29daf0a..452106c 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,13 @@ +# Version: 1.119.5 +## Date: 2024-12-3 +### Changes: +- Fix: add top error when in co-expression part and trends part. + +# Version: 1.119.4 +## Date: 2024-12-3 +### Changes: +- New: added an option to plot violin plot to replace the box plot in the basic plot part. + # Version: 1.119.3 ## Date: 2024-12-3 ### Changes: diff --git a/Docs/MetaX_Cookbook.assets/basic_stats_heatmap.png b/Docs/MetaX_Cookbook.assets/basic_stats_heatmap.png index 1ac0a1b..48d91b9 100644 Binary files a/Docs/MetaX_Cookbook.assets/basic_stats_heatmap.png and b/Docs/MetaX_Cookbook.assets/basic_stats_heatmap.png differ diff --git a/Docs/MetaX_Cookbook.assets/basic_stats_heatmap_seeting.png b/Docs/MetaX_Cookbook.assets/basic_stats_heatmap_seeting.png index b31c45a..a136072 100644 Binary files a/Docs/MetaX_Cookbook.assets/basic_stats_heatmap_seeting.png and b/Docs/MetaX_Cookbook.assets/basic_stats_heatmap_seeting.png differ diff --git a/Docs/MetaX_Cookbook.assets/basic_stats_pca.png b/Docs/MetaX_Cookbook.assets/basic_stats_pca.png index 75078c9..8714e93 100644 Binary files a/Docs/MetaX_Cookbook.assets/basic_stats_pca.png and b/Docs/MetaX_Cookbook.assets/basic_stats_pca.png differ diff --git a/Docs/MetaX_Cookbook.assets/co_network_page.png b/Docs/MetaX_Cookbook.assets/co_network_page.png index e034b93..ae8dee9 100644 Binary files a/Docs/MetaX_Cookbook.assets/co_network_page.png and b/Docs/MetaX_Cookbook.assets/co_network_page.png differ diff --git a/Docs/MetaX_Cookbook.assets/dev_menu.png b/Docs/MetaX_Cookbook.assets/dev_menu.png index 4226d2e..1b2d60b 100644 Binary files a/Docs/MetaX_Cookbook.assets/dev_menu.png and b/Docs/MetaX_Cookbook.assets/dev_menu.png differ diff --git a/Docs/MetaX_Cookbook.assets/group_control_test.png b/Docs/MetaX_Cookbook.assets/group_control_test.png index 50635a3..59ed96c 100644 Binary files a/Docs/MetaX_Cookbook.assets/group_control_test.png and b/Docs/MetaX_Cookbook.assets/group_control_test.png differ diff --git a/Docs/MetaX_Cookbook.assets/group_in_condition.png b/Docs/MetaX_Cookbook.assets/group_in_condition.png index 581301c..3945bd2 100644 Binary files a/Docs/MetaX_Cookbook.assets/group_in_condition.png and b/Docs/MetaX_Cookbook.assets/group_in_condition.png differ diff --git a/Docs/MetaX_Cookbook.assets/pca_setting.png b/Docs/MetaX_Cookbook.assets/pca_setting.png index 43e7841..0c3e396 100644 Binary files a/Docs/MetaX_Cookbook.assets/pca_setting.png and b/Docs/MetaX_Cookbook.assets/pca_setting.png differ diff --git a/Docs/MetaX_Cookbook.assets/settings.png b/Docs/MetaX_Cookbook.assets/settings.png index a602658..ab7261d 100644 Binary files a/Docs/MetaX_Cookbook.assets/settings.png and b/Docs/MetaX_Cookbook.assets/settings.png differ diff --git a/Docs/MetaX_Cookbook.assets/settings_page2.png b/Docs/MetaX_Cookbook.assets/settings_page2.png index b597afe..93128dc 100644 Binary files a/Docs/MetaX_Cookbook.assets/settings_page2.png and b/Docs/MetaX_Cookbook.assets/settings_page2.png differ diff --git a/Docs/MetaX_Cookbook.assets/sub_meta.png b/Docs/MetaX_Cookbook.assets/sub_meta.png index 9df3005..64a2d46 100644 Binary files a/Docs/MetaX_Cookbook.assets/sub_meta.png and b/Docs/MetaX_Cookbook.assets/sub_meta.png differ diff --git a/Docs/MetaX_Cookbook.assets/t_test.png b/Docs/MetaX_Cookbook.assets/t_test.png index 91f5c0c..c5b215b 100644 Binary files a/Docs/MetaX_Cookbook.assets/t_test.png and b/Docs/MetaX_Cookbook.assets/t_test.png differ diff --git a/Docs/MetaX_Cookbook.assets/taxa_func_link_page.png b/Docs/MetaX_Cookbook.assets/taxa_func_link_page.png index f279bb5..2bfe6f6 100644 Binary files a/Docs/MetaX_Cookbook.assets/taxa_func_link_page.png and b/Docs/MetaX_Cookbook.assets/taxa_func_link_page.png differ diff --git a/Docs/MetaX_Cookbook.assets/taxa_func_link_page2.png b/Docs/MetaX_Cookbook.assets/taxa_func_link_page2.png index 5a2994c..fa57a3e 100644 Binary files a/Docs/MetaX_Cookbook.assets/taxa_func_link_page2.png and b/Docs/MetaX_Cookbook.assets/taxa_func_link_page2.png differ diff --git a/Docs/MetaX_Cookbook.assets/trends_page.png b/Docs/MetaX_Cookbook.assets/trends_page.png index 75a8904..c6b57df 100644 Binary files a/Docs/MetaX_Cookbook.assets/trends_page.png and b/Docs/MetaX_Cookbook.assets/trends_page.png differ diff --git a/Docs/MetaX_Cookbook.md b/Docs/MetaX_Cookbook.md index a8b1696..beb5c26 100644 --- a/Docs/MetaX_Cookbook.md +++ b/Docs/MetaX_Cookbook.md @@ -257,7 +257,7 @@ We can select **meta** **groups** or **samples** (default a - Select **Sub Meta** to plot with two meta - - sub_meta + - - Change settings in the **PLOT PARAMETER** tab @@ -269,11 +269,11 @@ We can select **meta** **groups** or **samples** (default a **e.g. :** Select PBS, BAS and others groups **only in** Individual V1 - - group_in_condition + - - Select **specific Samples** to Analysis - - image-20230728113359732 + - @@ -309,7 +309,7 @@ We can select **meta** **groups** or **samples** (default a ### Heatmap and Bar Plot -basic_stats_heatmap + - **Select items(Taxa, Function, Taxa-Func and Peptide ) to plot:** - Add **All Taxa**, or select one we are interested in. @@ -340,17 +340,10 @@ We can select **meta** **groups** or **samples** (default a - **Rename Samples**: Add group info to each sample name - **Rename Taxa**: Only keep the last taxonomic level to reduce to name - **Plot Mean**: calculate the mean of each group before plotting - + - **Sub Meta:** select a second meta, then combine two meta by mean for Heatmap and 3D bar plot - - **For Heatmap** - - **Theme**: The theme of the heatmap - - **scale**: Scale method of the heatmap - - **Show All Labels:** if show all labels in the heatmap - - **For Bar** - - **Bar Ldg**: Show the legend when plotting Bar - - **Bar %:** Transfer each col to percent when plotting Bar - - basic_stats_heatmap_seeting - + - + - Plot all color maps to view by right click **Theme** - ![right_click_theme](MetaX_Cookbook.assets/right_click_theme.png) - all_cmap diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index 13067c2..0c473fc 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -156,7 +156,7 @@ def __init__(self, MainWindow): icon_path = os.path.join(os.path.dirname(__file__), "./MetaX_GUI/resources/logo.png") self.MainWindow.setWindowIcon(QIcon(icon_path)) - self.MainWindow.resize(1440, 900) + self.MainWindow.resize(1200, 800) self.MainWindow.setWindowTitle("MetaX v" + __version__) self.logger = LoggerManager() @@ -402,7 +402,7 @@ def __init__(self, MainWindow): self.comboBox_co_expr_group_sample.currentIndexChanged.connect(lambda:self.change_event_comboBox_group_or_sample('co_expr_group')) self.comboBox_trends_group_sample.currentIndexChanged.connect(lambda:self.change_event_comboBox_group_or_sample('trends_group')) self.comboBox_tflink_group_sample.currentIndexChanged.connect(lambda:self.change_event_comboBox_group_or_sample('tflink_group')) - self.comboBox_radioButton_network_group_sample.currentIndexChanged.connect(lambda:self.change_event_comboBox_group_or_sample('tfnet_group')) + self.comboBox_network_group_sample.currentIndexChanged.connect(lambda:self.change_event_comboBox_group_or_sample('tfnet_group')) ### Peptide Qeruy self.pushButton_basic_peptide_query.clicked.connect(self.peptide_query) @@ -690,7 +690,7 @@ def change_event_comboBox_group_or_sample(self, position): 'tflink_group': {"current_text": 'comboBox_tflink_group_sample', "group_layout": ['horizontalLayout_78', 'gridLayout_tflink_group'], "sample_layout": ['gridLayout_tflink_sample']}, - 'tfnet_group': {"current_text": 'comboBox_radioButton_network_group_sample', + 'tfnet_group': {"current_text": 'comboBox_network_group_sample', "group_layout": ['horizontalLayout_55', 'gridLayout_network_group'], "sample_layout": ['gridLayout_network_sample']}, } @@ -3640,7 +3640,7 @@ def add_co_expr_top_list(self): top_num = self.spinBox_co_expr_top_num.value() filtered = self.checkBox_co_expr_top_filtered.isChecked() # get sample list - if self.radioButton_co_expr_bygroup.isChecked(): # select by group + if self.comboBox_co_expr_group_sample.currentText() == 'Group': group_list = self.comboBox_co_expr_group.getCheckedItems() in_condition = ( [self.comboBox_co_expression_condition_meta.currentText(), self.comboBox_co_expression_condition_group.getCheckedItems()] @@ -3968,7 +3968,6 @@ def add_trends_top_list(self): ) # get sample list - # if self.radioButton_trends_group.isChecked(): # select by group if self.comboBox_trends_group_sample.currentText() == 'Group': sample_list = self.get_sample_list_for_group_list_in_condition(group_list, condition=in_condition) @@ -4002,7 +4001,7 @@ def plot_trends_cluster(self): # get sample list and check if the sample list at least has 2 groups - if self.radioButton_trends_group.isChecked(): + if self.comboBox_trends_group_sample.currentText() == 'Group': condition = [self.comboBox_trends_condition_meta.currentText(), self.comboBox_trends_condition_group.getCheckedItems()]\ if self.checkBox_trends_in_condition.isChecked() else None @@ -4121,14 +4120,14 @@ def plot_trends_interactive_line(self): dft = self.get_table_by_df_type(df_type=table_name, replace_if_two_index = True) # get sample list - if self.radioButton_trends_group.isChecked(): + if self.comboBox_trends_group_sample.currentText() == 'Group': group_list = self.comboBox_trends_group.getCheckedItems() group_list = group_list if group_list != [] else sorted(set(self.tfa.group_list)) sample_list = self.get_sample_list_for_group_list_in_condition(group_list, condition=condition) if sample_list is None: return None - else: # self.radioButton_trends_sample.isChecked() + else: # select by sample sample_list = self.comboBox_trends_sample.getCheckedItems() if sample_list == []: sample_list = self.tfa.sample_list @@ -4447,7 +4446,6 @@ def get_title_by_table_name(self, table_name): title_name = get_title_by_table_name(self, table_name) # get sample list when plot by group - # if self.radioButton_basic_pca_group.isChecked(): if self.comboBox_basic_pca_group_sample.currentText() == 'Group': condition = [self.comboBox_basic_condition_meta.currentText(), self.comboBox_basic_condition_group.getCheckedItems()] \ @@ -4499,10 +4497,13 @@ def get_title_by_table_name(self, table_name): elif method == 'box': plot_samples = self.checkBox_box_plot_samples.isChecked() + violinplot = self.checkBox_box_violinplot.isChecked() + log_scale = self.checkBox_box_log_scale.isChecked() BasicPlot(self.tfa).plot_box_sns(df=df, title_name=title_name, show_fliers=show_fliers, width=width, height=height, font_size=font_size, theme=theme, rename_sample = rename_sample, plot_samples = plot_samples, - legend_col_num=legend_col_num, sub_meta = sub_meta) + legend_col_num=legend_col_num, sub_meta = sub_meta, + violinplot=violinplot, log_scale=log_scale) elif method == 'corr': cluster = self.checkBox_corr_cluster.isChecked() @@ -5337,7 +5338,6 @@ def plot_co_expr(self, plot_type = 'network'): else: sample_list = slected_list # print(f'Plot with selected samples:{sample_list}') - # elif self.radioButton_co_expr_bygroup.isChecked(): elif self.comboBox_co_expr_group_sample.currentText() == 'Group': condition = [self.comboBox_co_expression_condition_meta.currentText(), self.comboBox_co_expression_condition_group.getCheckedItems()] \ @@ -5520,8 +5520,7 @@ def add_tfnet_top_list(self): df_type = self.comboBox_tfnet_table.currentText() filtered = self.checkBox_tfnet_top_filtered.isChecked() - # if self.radioButton_network_bysample.isChecked(): # by sample - if self.comboBox_radioButton_network_group_sample.currentText() == 'Sample': + if self.comboBox_network_group_sample.currentText() == 'Sample': slected_list = self.comboBox_network_sample.getCheckedItems() if slected_list: sample_list = slected_list @@ -5610,7 +5609,7 @@ def plot_network(self): rename_taxa = self.checkBox_tf_link_net_rename_taxa.isChecked() font_size = self.spinBox_network_font_size.value() - if self.radioButton_network_bysample.isChecked(): # by sample + if self.comboBox_network_group_sample.currentText() == 'Sample': slected_list = self.comboBox_network_sample.getCheckedItems() if slected_list: sample_list = slected_list @@ -5656,7 +5655,6 @@ def plot_network(self): def get_sample_list_tflink(self): # get sample list - # if self.radioButton_tflink_group.isChecked(): # by group if self.comboBox_tflink_group_sample.currentText() == 'Group': in_condition = ( [self.comboBox_tflink_condition_meta.currentText(), self.comboBox_tflink_condition_group.getCheckedItems()] diff --git a/metax/gui/metax_gui/main_window.ui b/metax/gui/metax_gui/main_window.ui index 9191950..5ddd1fe 100644 --- a/metax/gui/metax_gui/main_window.ui +++ b/metax/gui/metax_gui/main_window.ui @@ -246,7 +246,7 @@ 0 0 462 - 527 + 531 @@ -1447,7 +1447,7 @@ QTabWidget::Triangular - 0 + 1 @@ -1830,8 +1830,8 @@ 0 0 - 885 - 237 + 799 + 239 @@ -2098,19 +2098,6 @@ - - - - - 0 - 0 - - - - show Fliers - - - @@ -2124,19 +2111,6 @@ - - - - - 0 - 0 - - - - Plot Samples - - - @@ -2607,6 +2581,50 @@ + + + + + + + 0 + 0 + + + + Plot Samples + + + + + + + + 0 + 0 + + + + show Fliers + + + + + + + Log Scale + + + + + + + + + Plot as Violinplot + + + @@ -2687,6 +2705,12 @@ + + + 0 + 0 + + Select for plotting @@ -2724,7 +2748,7 @@ false - + 0 0 @@ -2740,7 +2764,7 @@ false - + 0 0 @@ -2756,7 +2780,7 @@ false - + 0 0 @@ -2899,7 +2923,7 @@ - + 0 0 @@ -3162,7 +3186,7 @@ 0 0 885 - 187 + 170 @@ -5089,7 +5113,7 @@ - + 0 0 @@ -5098,7 +5122,7 @@ QTabWidget::Triangular - 0 + 3 @@ -5990,7 +6014,7 @@ 0 0 865 - 117 + 95 @@ -6508,7 +6532,7 @@ QTabWidget::Triangular - 0 + 1 @@ -6533,7 +6557,7 @@ false - + 0 0 @@ -6549,7 +6573,7 @@ false - + 0 0 @@ -6565,7 +6589,7 @@ false - + 0 0 @@ -6597,6 +6621,12 @@ + + + 0 + 0 + + Select @@ -6717,7 +6747,7 @@ 0 0 885 - 168 + 170 @@ -7051,95 +7081,16 @@ - - - - - - - 0 - 0 - - - - Table - - - - - - - false - - - - 0 - 0 - - - - - Taxa - - - - - Functions - - - - - Taxa-Functions - - - - - Peptides - - - - - - - - - 0 - 0 - - - - Qt::LeftToRight - - - Meta - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - + 0 0 - Focus List + Select Focus @@ -7327,82 +7278,326 @@ - - - - - Expression Trends - - - - + + - + + + + 0 + 0 + + - Select + Table - + + + false + + + + 0 + 0 + + - Group + Taxa - Sample + Functions + + + + + Taxa-Functions + + + + + Peptides - - - - - 0 - 0 - - - - List for Plotting - - - - - - - Qt::Horizontal - - - - - - - - 16777215 - 260 - - - - Plotting Parameter - - - - - - true - - - - + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + Meta + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + + + + Expression Trends + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 600 + 0 + + + + + + + + + + Select Cluster + + + + + + + false + + + + 0 + 0 + + + + Get ClusterTable + + + + + + + + 75 + true + + + + Plot Specific Cluster + + + + + + + + + + Qt::Horizontal + + + + + + + Cluster Number + + + + + + + false + + + + 0 + 0 + + + + Plot Trends + + + + + + + false + + + + 0 + 0 + + + + Plot Interactive Line + + + + + + + 1 + + + 5 + + + + + + + + 75 + true + + + + Calculate Cluster + + + + + + + Show Plotting Parameter + + + + + + + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + In Condition + + + + + + + + + true + + + + + + + true + + + + 0 + 0 + + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + 16777215 + 250 + + + + Plotting Parameter + + + + + + true + + + + 0 0 885 - 119 + 123 @@ -7627,70 +7822,100 @@ - - + + + + Qt::Horizontal + + + + + + + false + - + 0 0 + + Add conditionally filtered items to the drawing box + + + Add Top to List + - - + + - - - - - - 0 - 0 - - - - Qt::LeftToRight - - - In Condition - - - - - - - - - true - - - - - - - true - - - - 0 - 0 - - - - - - - + + + false + + + + 0 + 0 + + + + Drop Item + + - + + + false + + + + 0 + 0 + + + + Clean List + + - + + + false + + + + 0 + 0 + + + + Add a list to the drawing box, make sure there is one item per line. + + + Add A list + + + + + + + 0 + 0 + + + + Select for plotting + + + @@ -7828,299 +8053,117 @@ - - - - - - false - - - - 0 - 0 - - - - Drop Item - - - - - - - false - - - - 0 - 0 - - - - Clean List - - - - - - - false - - - - 0 - 0 - - - - Add a list to the drawing box, make sure there is one item per line. - - - Add A list - - - - - - - + + Qt::Horizontal - - - - Select for plotting - - - - - + + - + 0 0 - - Qt::LeftToRight - - Table - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Select - - - false - - - - Taxa - - - - - Functions - - + - Taxa-Functions + Group - Peptides + Sample - - - - Meta - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - 0 - 0 - - - - - 600 - 0 - - - - - - - - false - - - - 0 - 0 - - - - Add conditionally filtered items to the drawing box - - - Add Top to List - - - - - - - - - Select Cluster - - - - - - - false - - - - 0 - 0 - - - - Get ClusterTable - - - - - - - - 75 - true - - - - Plot Specific Cluster - - - - - - - - - - Qt::Horizontal - - - - - - - Cluster Number - - - - - - - false - + + + + - + 0 0 + + Qt::LeftToRight + - Plot Trends + Table + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + false + + + Taxa + + + + + Functions + + + + + Taxa-Functions + + + + + Peptides + + + + + + + + + + - + 0 0 - Plot Interactive Line - - - - - - - 1 - - - 5 - - - - - - - - 75 - true - + Meta - - Calculate Cluster + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - Show Plotting Parameter - - + + - - - - Qt::Horizontal - - - @@ -8141,7 +8184,7 @@ QTabWidget::Triangular - 0 + 1 @@ -8232,25 +8275,12 @@ - - - - - 0 - 0 - - - - Qt::LeftToRight - - - - + 0 0 @@ -8884,19 +8914,6 @@ - - - - - 0 - 0 - - - - Meta - - - @@ -9117,6 +9134,36 @@ + + + + + + + 0 + 0 + + + + Meta + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + + + @@ -9281,58 +9328,6 @@ - - - - - - - 0 - 0 - - - - Table - - - - - - - false - - - - Taxa - - - - - Functions - - - - - Taxa-Functions - - - - - - - - Meta - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - @@ -9499,7 +9494,7 @@ - + Group @@ -9537,7 +9532,7 @@ 0 0 885 - 166 + 158 @@ -9776,6 +9771,74 @@ + + + + + + + 0 + 0 + + + + Table + + + + + + + false + + + + 0 + 0 + + + + + Taxa + + + + + Functions + + + + + Taxa-Functions + + + + + + + + + + + + + 0 + 0 + + + + Meta + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + @@ -10738,7 +10801,7 @@ 0 0 991 - 23 + 21 diff --git a/metax/gui/metax_gui/ui_main_window.py b/metax/gui/metax_gui/ui_main_window.py index a668a49..9104649 100644 --- a/metax/gui/metax_gui/ui_main_window.py +++ b/metax/gui/metax_gui/ui_main_window.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'c:\Users\max\OneDrive - University of Ottawa\code\TaxaFunc\MetaX\metax\gui\metax_gui\main_window.ui' +# Form implementation generated from reading ui file 'c:\Users\Qing\OneDrive - University of Ottawa\code\TaxaFunc\MetaX\metax\gui\metax_gui\main_window.ui' # # Created by: PyQt5 UI code generator 5.15.9 # @@ -147,7 +147,7 @@ def setupUi(self, metaX_main): self.toolBox_2.setMaximumSize(QtCore.QSize(1677, 16777215)) self.toolBox_2.setObjectName("toolBox_2") self.page_2 = QtWidgets.QWidget() - self.page_2.setGeometry(QtCore.QRect(0, 0, 462, 527)) + self.page_2.setGeometry(QtCore.QRect(0, 0, 462, 531)) self.page_2.setObjectName("page_2") self.gridLayout_27 = QtWidgets.QGridLayout(self.page_2) self.gridLayout_27.setObjectName("gridLayout_27") @@ -904,7 +904,7 @@ def setupUi(self, metaX_main): self.scrollArea.setWidgetResizable(True) self.scrollArea.setObjectName("scrollArea") self.scrollAreaWidgetContents = QtWidgets.QWidget() - self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 885, 237)) + self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 799, 239)) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.gridLayout_34 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents) self.gridLayout_34.setObjectName("gridLayout_34") @@ -1035,14 +1035,6 @@ def setupUi(self, metaX_main): self.label_137.setFont(font) self.label_137.setObjectName("label_137") self.gridLayout_34.addWidget(self.label_137, 8, 0, 1, 1) - self.checkBox_box_if_show_fliers = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_box_if_show_fliers.sizePolicy().hasHeightForWidth()) - self.checkBox_box_if_show_fliers.setSizePolicy(sizePolicy) - self.checkBox_box_if_show_fliers.setObjectName("checkBox_box_if_show_fliers") - self.gridLayout_34.addWidget(self.checkBox_box_if_show_fliers, 6, 2, 1, 1) self.label_122 = QtWidgets.QLabel(self.scrollAreaWidgetContents) font = QtGui.QFont() font.setBold(True) @@ -1050,14 +1042,6 @@ def setupUi(self, metaX_main): self.label_122.setFont(font) self.label_122.setObjectName("label_122") self.gridLayout_34.addWidget(self.label_122, 0, 0, 1, 1) - self.checkBox_box_plot_samples = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_box_plot_samples.sizePolicy().hasHeightForWidth()) - self.checkBox_box_plot_samples.setSizePolicy(sizePolicy) - self.checkBox_box_plot_samples.setObjectName("checkBox_box_plot_samples") - self.gridLayout_34.addWidget(self.checkBox_box_plot_samples, 6, 1, 1, 1) self.horizontalLayout_34 = QtWidgets.QHBoxLayout() self.horizontalLayout_34.setObjectName("horizontalLayout_34") self.checkBox_pca_if_show_group_name_in_label = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) @@ -1301,6 +1285,31 @@ def setupUi(self, metaX_main): self.spinBox_basic_plot_upset_max_rank.setObjectName("spinBox_basic_plot_upset_max_rank") self.horizontalLayout_105.addWidget(self.spinBox_basic_plot_upset_max_rank) self.gridLayout_34.addLayout(self.horizontalLayout_105, 5, 2, 1, 1) + self.horizontalLayout_108 = QtWidgets.QHBoxLayout() + self.horizontalLayout_108.setObjectName("horizontalLayout_108") + self.checkBox_box_plot_samples = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_box_plot_samples.sizePolicy().hasHeightForWidth()) + self.checkBox_box_plot_samples.setSizePolicy(sizePolicy) + self.checkBox_box_plot_samples.setObjectName("checkBox_box_plot_samples") + self.horizontalLayout_108.addWidget(self.checkBox_box_plot_samples) + self.checkBox_box_if_show_fliers = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_box_if_show_fliers.sizePolicy().hasHeightForWidth()) + self.checkBox_box_if_show_fliers.setSizePolicy(sizePolicy) + self.checkBox_box_if_show_fliers.setObjectName("checkBox_box_if_show_fliers") + self.horizontalLayout_108.addWidget(self.checkBox_box_if_show_fliers) + self.checkBox_box_log_scale = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + self.checkBox_box_log_scale.setObjectName("checkBox_box_log_scale") + self.horizontalLayout_108.addWidget(self.checkBox_box_log_scale) + self.gridLayout_34.addLayout(self.horizontalLayout_108, 6, 1, 1, 1) + self.checkBox_box_violinplot = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + self.checkBox_box_violinplot.setObjectName("checkBox_box_violinplot") + self.gridLayout_34.addWidget(self.checkBox_box_violinplot, 6, 2, 1, 1) self.scrollArea.setWidget(self.scrollAreaWidgetContents) self.gridLayout_40.addWidget(self.scrollArea, 0, 0, 1, 1) self.gridLayout_26.addWidget(self.groupBox_basic_plot, 12, 0, 1, 3) @@ -1356,6 +1365,11 @@ def setupUi(self, metaX_main): self.gridLayout_23 = QtWidgets.QGridLayout(self.tab_13) self.gridLayout_23.setObjectName("gridLayout_23") self.label_32 = QtWidgets.QLabel(self.tab_13) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_32.sizePolicy().hasHeightForWidth()) + self.label_32.setSizePolicy(sizePolicy) self.label_32.setObjectName("label_32") self.gridLayout_23.addWidget(self.label_32, 5, 0, 1, 1) self.line_8 = QtWidgets.QFrame(self.tab_13) @@ -1378,7 +1392,7 @@ def setupUi(self, metaX_main): self.verticalLayout.setObjectName("verticalLayout") self.pushButton_basic_heatmap_drop_item = QtWidgets.QPushButton(self.tab_13) self.pushButton_basic_heatmap_drop_item.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_basic_heatmap_drop_item.sizePolicy().hasHeightForWidth()) @@ -1387,7 +1401,7 @@ def setupUi(self, metaX_main): self.verticalLayout.addWidget(self.pushButton_basic_heatmap_drop_item) self.pushButton_basic_heatmap_clean_list = QtWidgets.QPushButton(self.tab_13) self.pushButton_basic_heatmap_clean_list.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_basic_heatmap_clean_list.sizePolicy().hasHeightForWidth()) @@ -1396,7 +1410,7 @@ def setupUi(self, metaX_main): self.verticalLayout.addWidget(self.pushButton_basic_heatmap_clean_list) self.pushButton_basic_heatmap_add_a_list = QtWidgets.QPushButton(self.tab_13) self.pushButton_basic_heatmap_add_a_list.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_basic_heatmap_add_a_list.sizePolicy().hasHeightForWidth()) @@ -1458,7 +1472,7 @@ def setupUi(self, metaX_main): self.horizontalLayout_29.addWidget(self.checkBox_basic_heatmap_top_filtered) self.gridLayout_23.addLayout(self.horizontalLayout_29, 6, 1, 1, 2) self.label_34 = QtWidgets.QLabel(self.tab_13) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_34.sizePolicy().hasHeightForWidth()) @@ -1601,7 +1615,7 @@ def setupUi(self, metaX_main): self.scrollArea_2.setWidgetResizable(True) self.scrollArea_2.setObjectName("scrollArea_2") self.scrollAreaWidgetContents_2 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 885, 187)) + self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 885, 170)) self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2") self.gridLayout_50 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_2) self.gridLayout_50.setObjectName("gridLayout_50") @@ -2547,7 +2561,7 @@ def setupUi(self, metaX_main): self.gridLayout_75.addWidget(self.groupBox_cross_heatmap_settings, 1, 0, 1, 1) self.gridLayout_9.addWidget(self.groupBox_cross_heatmap_plot, 1, 0, 1, 1) self.tabWidget_3 = QtWidgets.QTabWidget(self.tab_2) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Ignored) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.tabWidget_3.sizePolicy().hasHeightForWidth()) @@ -3071,7 +3085,7 @@ def setupUi(self, metaX_main): self.scrollArea_3.setWidgetResizable(True) self.scrollArea_3.setObjectName("scrollArea_3") self.scrollAreaWidgetContents_4 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 865, 117)) + self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 865, 95)) self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4") self.gridLayout_68 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_4) self.gridLayout_68.setObjectName("gridLayout_68") @@ -3372,7 +3386,7 @@ def setupUi(self, metaX_main): self.verticalLayout_2.setObjectName("verticalLayout_2") self.pushButton_co_expr_drop_item = QtWidgets.QPushButton(self.tab_5) self.pushButton_co_expr_drop_item.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_co_expr_drop_item.sizePolicy().hasHeightForWidth()) @@ -3381,7 +3395,7 @@ def setupUi(self, metaX_main): self.verticalLayout_2.addWidget(self.pushButton_co_expr_drop_item) self.pushButton_co_expr_clean_list = QtWidgets.QPushButton(self.tab_5) self.pushButton_co_expr_clean_list.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_co_expr_clean_list.sizePolicy().hasHeightForWidth()) @@ -3390,7 +3404,7 @@ def setupUi(self, metaX_main): self.verticalLayout_2.addWidget(self.pushButton_co_expr_clean_list) self.pushButton_co_expr_add_a_list = QtWidgets.QPushButton(self.tab_5) self.pushButton_co_expr_add_a_list.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_co_expr_add_a_list.sizePolicy().hasHeightForWidth()) @@ -3405,6 +3419,11 @@ def setupUi(self, metaX_main): self.horizontalLayout_67 = QtWidgets.QHBoxLayout() self.horizontalLayout_67.setObjectName("horizontalLayout_67") self.label_213 = QtWidgets.QLabel(self.tab_5) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_213.sizePolicy().hasHeightForWidth()) + self.label_213.setSizePolicy(sizePolicy) self.label_213.setObjectName("label_213") self.horizontalLayout_67.addWidget(self.label_213) self.comboBox_co_expr_group_sample = QtWidgets.QComboBox(self.tab_5) @@ -3468,7 +3487,7 @@ def setupUi(self, metaX_main): self.scrollArea_4.setWidgetResizable(True) self.scrollArea_4.setObjectName("scrollArea_4") self.scrollAreaWidgetContents_5 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_5.setGeometry(QtCore.QRect(0, 0, 885, 168)) + self.scrollAreaWidgetContents_5.setGeometry(QtCore.QRect(0, 0, 885, 170)) self.scrollAreaWidgetContents_5.setObjectName("scrollAreaWidgetContents_5") self.gridLayout_49 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_5) self.gridLayout_49.setObjectName("gridLayout_49") @@ -3655,50 +3674,8 @@ def setupUi(self, metaX_main): self.line_11.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_11.setObjectName("line_11") self.gridLayout_47.addWidget(self.line_11, 1, 0, 1, 4) - self.horizontalLayout_41 = QtWidgets.QHBoxLayout() - self.horizontalLayout_41.setObjectName("horizontalLayout_41") - self.label_29 = QtWidgets.QLabel(self.tab_5) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_29.sizePolicy().hasHeightForWidth()) - self.label_29.setSizePolicy(sizePolicy) - self.label_29.setObjectName("label_29") - self.horizontalLayout_41.addWidget(self.label_29) - self.comboBox_co_expr_table = QtWidgets.QComboBox(self.tab_5) - self.comboBox_co_expr_table.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_co_expr_table.sizePolicy().hasHeightForWidth()) - self.comboBox_co_expr_table.setSizePolicy(sizePolicy) - self.comboBox_co_expr_table.setObjectName("comboBox_co_expr_table") - self.comboBox_co_expr_table.addItem("") - self.comboBox_co_expr_table.addItem("") - self.comboBox_co_expr_table.addItem("") - self.comboBox_co_expr_table.addItem("") - self.horizontalLayout_41.addWidget(self.comboBox_co_expr_table) - self.label_143 = QtWidgets.QLabel(self.tab_5) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_143.sizePolicy().hasHeightForWidth()) - self.label_143.setSizePolicy(sizePolicy) - self.label_143.setLayoutDirection(QtCore.Qt.LeftToRight) - self.label_143.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_143.setObjectName("label_143") - self.horizontalLayout_41.addWidget(self.label_143) - self.comboBox_co_expr_meta = QtWidgets.QComboBox(self.tab_5) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_co_expr_meta.sizePolicy().hasHeightForWidth()) - self.comboBox_co_expr_meta.setSizePolicy(sizePolicy) - self.comboBox_co_expr_meta.setObjectName("comboBox_co_expr_meta") - self.horizontalLayout_41.addWidget(self.comboBox_co_expr_meta) - self.gridLayout_47.addLayout(self.horizontalLayout_41, 0, 0, 1, 4) self.label_72 = QtWidgets.QLabel(self.tab_5) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_72.sizePolicy().hasHeightForWidth()) @@ -3787,108 +3764,254 @@ def setupUi(self, metaX_main): self.checkBox_co_expr_top_filtered.setObjectName("checkBox_co_expr_top_filtered") self.horizontalLayout_43.addWidget(self.checkBox_co_expr_top_filtered) self.gridLayout_47.addLayout(self.horizontalLayout_43, 6, 1, 1, 2) + self.horizontalLayout_41 = QtWidgets.QHBoxLayout() + self.horizontalLayout_41.setObjectName("horizontalLayout_41") + self.label_29 = QtWidgets.QLabel(self.tab_5) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_29.sizePolicy().hasHeightForWidth()) + self.label_29.setSizePolicy(sizePolicy) + self.label_29.setObjectName("label_29") + self.horizontalLayout_41.addWidget(self.label_29) + self.comboBox_co_expr_table = QtWidgets.QComboBox(self.tab_5) + self.comboBox_co_expr_table.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_co_expr_table.sizePolicy().hasHeightForWidth()) + self.comboBox_co_expr_table.setSizePolicy(sizePolicy) + self.comboBox_co_expr_table.setObjectName("comboBox_co_expr_table") + self.comboBox_co_expr_table.addItem("") + self.comboBox_co_expr_table.addItem("") + self.comboBox_co_expr_table.addItem("") + self.comboBox_co_expr_table.addItem("") + self.horizontalLayout_41.addWidget(self.comboBox_co_expr_table) + self.gridLayout_47.addLayout(self.horizontalLayout_41, 0, 0, 1, 1) + self.horizontalLayout_113 = QtWidgets.QHBoxLayout() + self.horizontalLayout_113.setObjectName("horizontalLayout_113") + self.label_143 = QtWidgets.QLabel(self.tab_5) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_143.sizePolicy().hasHeightForWidth()) + self.label_143.setSizePolicy(sizePolicy) + self.label_143.setLayoutDirection(QtCore.Qt.LeftToRight) + self.label_143.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_143.setObjectName("label_143") + self.horizontalLayout_113.addWidget(self.label_143) + self.comboBox_co_expr_meta = QtWidgets.QComboBox(self.tab_5) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_co_expr_meta.sizePolicy().hasHeightForWidth()) + self.comboBox_co_expr_meta.setSizePolicy(sizePolicy) + self.comboBox_co_expr_meta.setObjectName("comboBox_co_expr_meta") + self.horizontalLayout_113.addWidget(self.comboBox_co_expr_meta) + self.gridLayout_47.addLayout(self.horizontalLayout_113, 0, 1, 1, 1) self.tabWidget.addTab(self.tab_5, "") self.tab_15 = QtWidgets.QWidget() self.tab_15.setObjectName("tab_15") self.gridLayout_24 = QtWidgets.QGridLayout(self.tab_15) self.gridLayout_24.setObjectName("gridLayout_24") - self.horizontalLayout_115 = QtWidgets.QHBoxLayout() - self.horizontalLayout_115.setObjectName("horizontalLayout_115") - self.label_215 = QtWidgets.QLabel(self.tab_15) - self.label_215.setObjectName("label_215") - self.horizontalLayout_115.addWidget(self.label_215) - self.comboBox_trends_group_sample = QtWidgets.QComboBox(self.tab_15) - self.comboBox_trends_group_sample.setObjectName("comboBox_trends_group_sample") - self.comboBox_trends_group_sample.addItem("") - self.comboBox_trends_group_sample.addItem("") - self.horizontalLayout_115.addWidget(self.comboBox_trends_group_sample) - self.gridLayout_24.addLayout(self.horizontalLayout_115, 2, 0, 1, 1) - self.label_98 = QtWidgets.QLabel(self.tab_15) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) + self.listWidget_trends_list_for_ploting = QtWidgets.QListWidget(self.tab_15) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_98.sizePolicy().hasHeightForWidth()) - self.label_98.setSizePolicy(sizePolicy) - self.label_98.setObjectName("label_98") - self.gridLayout_24.addWidget(self.label_98, 6, 0, 1, 1) - self.line_18 = QtWidgets.QFrame(self.tab_15) - self.line_18.setFrameShape(QtWidgets.QFrame.HLine) - self.line_18.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_18.setObjectName("line_18") - self.gridLayout_24.addWidget(self.line_18, 1, 0, 1, 5) - self.groupBox_expression_trends_plot_settings = QtWidgets.QGroupBox(self.tab_15) - self.groupBox_expression_trends_plot_settings.setMaximumSize(QtCore.QSize(16777215, 260)) - self.groupBox_expression_trends_plot_settings.setObjectName("groupBox_expression_trends_plot_settings") - self.gridLayout_60 = QtWidgets.QGridLayout(self.groupBox_expression_trends_plot_settings) - self.gridLayout_60.setObjectName("gridLayout_60") - self.scrollArea_5 = QtWidgets.QScrollArea(self.groupBox_expression_trends_plot_settings) - self.scrollArea_5.setWidgetResizable(True) - self.scrollArea_5.setObjectName("scrollArea_5") - self.scrollAreaWidgetContents_6 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_6.setGeometry(QtCore.QRect(0, 0, 885, 119)) - self.scrollAreaWidgetContents_6.setObjectName("scrollAreaWidgetContents_6") - self.gridLayout_57 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_6) - self.gridLayout_57.setObjectName("gridLayout_57") - self.gridLayout_59 = QtWidgets.QGridLayout() - self.gridLayout_59.setObjectName("gridLayout_59") - self.checkBox_trends_plot_interactive_rename_taxa = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_6) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.listWidget_trends_list_for_ploting.sizePolicy().hasHeightForWidth()) + self.listWidget_trends_list_for_ploting.setSizePolicy(sizePolicy) + self.listWidget_trends_list_for_ploting.setObjectName("listWidget_trends_list_for_ploting") + self.gridLayout_24.addWidget(self.listWidget_trends_list_for_ploting, 6, 1, 2, 4) + self.comboBox_trends_selection_list = QtWidgets.QComboBox(self.tab_15) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_trends_plot_interactive_rename_taxa.sizePolicy().hasHeightForWidth()) - self.checkBox_trends_plot_interactive_rename_taxa.setSizePolicy(sizePolicy) - self.checkBox_trends_plot_interactive_rename_taxa.setChecked(True) - self.checkBox_trends_plot_interactive_rename_taxa.setObjectName("checkBox_trends_plot_interactive_rename_taxa") - self.gridLayout_59.addWidget(self.checkBox_trends_plot_interactive_rename_taxa, 1, 7, 1, 1) - self.checkBox_trends_plot_interactive_plot_samples = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_6) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.comboBox_trends_selection_list.sizePolicy().hasHeightForWidth()) + self.comboBox_trends_selection_list.setSizePolicy(sizePolicy) + self.comboBox_trends_selection_list.setMinimumSize(QtCore.QSize(600, 0)) + self.comboBox_trends_selection_list.setObjectName("comboBox_trends_selection_list") + self.gridLayout_24.addWidget(self.comboBox_trends_selection_list, 4, 1, 1, 3) + self.gridLayout_61 = QtWidgets.QGridLayout() + self.gridLayout_61.setObjectName("gridLayout_61") + self.label_93 = QtWidgets.QLabel(self.tab_15) + self.label_93.setObjectName("label_93") + self.gridLayout_61.addWidget(self.label_93, 2, 1, 1, 1) + self.pushButton_trends_get_trends_table = QtWidgets.QPushButton(self.tab_15) + self.pushButton_trends_get_trends_table.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_trends_plot_interactive_plot_samples.sizePolicy().hasHeightForWidth()) - self.checkBox_trends_plot_interactive_plot_samples.setSizePolicy(sizePolicy) - self.checkBox_trends_plot_interactive_plot_samples.setObjectName("checkBox_trends_plot_interactive_plot_samples") - self.gridLayout_59.addWidget(self.checkBox_trends_plot_interactive_plot_samples, 1, 1, 1, 3) - self.label_174 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_174.setFont(font) - self.label_174.setObjectName("label_174") - self.gridLayout_59.addWidget(self.label_174, 0, 0, 1, 1) - self.label_175 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6) + sizePolicy.setHeightForWidth(self.pushButton_trends_get_trends_table.sizePolicy().hasHeightForWidth()) + self.pushButton_trends_get_trends_table.setSizePolicy(sizePolicy) + self.pushButton_trends_get_trends_table.setObjectName("pushButton_trends_get_trends_table") + self.gridLayout_61.addWidget(self.pushButton_trends_get_trends_table, 2, 4, 1, 1) + self.label_165 = QtWidgets.QLabel(self.tab_15) font = QtGui.QFont() font.setBold(True) font.setWeight(75) - self.label_175.setFont(font) - self.label_175.setObjectName("label_175") - self.gridLayout_59.addWidget(self.label_175, 1, 0, 1, 1) - self.checkBox_trends_plot_interactive_show_legend = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_6) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_trends_plot_interactive_show_legend.sizePolicy().hasHeightForWidth()) - self.checkBox_trends_plot_interactive_show_legend.setSizePolicy(sizePolicy) - self.checkBox_trends_plot_interactive_show_legend.setChecked(True) - self.checkBox_trends_plot_interactive_show_legend.setObjectName("checkBox_trends_plot_interactive_show_legend") - self.gridLayout_59.addWidget(self.checkBox_trends_plot_interactive_show_legend, 1, 6, 1, 1) - self.checkBox_get_trends_cluster_intensity = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_6) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + self.label_165.setFont(font) + self.label_165.setObjectName("label_165") + self.gridLayout_61.addWidget(self.label_165, 2, 0, 1, 1) + self.comboBox_trends_get_cluster_name = QtWidgets.QComboBox(self.tab_15) + self.comboBox_trends_get_cluster_name.setObjectName("comboBox_trends_get_cluster_name") + self.gridLayout_61.addWidget(self.comboBox_trends_get_cluster_name, 2, 2, 1, 1) + self.line_20 = QtWidgets.QFrame(self.tab_15) + self.line_20.setFrameShape(QtWidgets.QFrame.HLine) + self.line_20.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_20.setObjectName("line_20") + self.gridLayout_61.addWidget(self.line_20, 1, 1, 1, 4) + self.label_95 = QtWidgets.QLabel(self.tab_15) + self.label_95.setObjectName("label_95") + self.gridLayout_61.addWidget(self.label_95, 0, 1, 1, 1) + self.pushButton_trends_plot_trends = QtWidgets.QPushButton(self.tab_15) + self.pushButton_trends_plot_trends.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_get_trends_cluster_intensity.sizePolicy().hasHeightForWidth()) - self.checkBox_get_trends_cluster_intensity.setSizePolicy(sizePolicy) - self.checkBox_get_trends_cluster_intensity.setObjectName("checkBox_get_trends_cluster_intensity") - self.gridLayout_59.addWidget(self.checkBox_get_trends_cluster_intensity, 1, 4, 1, 2) - self.horizontalLayout_97 = QtWidgets.QHBoxLayout() - self.horizontalLayout_97.setObjectName("horizontalLayout_97") - self.label_97 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.pushButton_trends_plot_trends.sizePolicy().hasHeightForWidth()) + self.pushButton_trends_plot_trends.setSizePolicy(sizePolicy) + self.pushButton_trends_plot_trends.setObjectName("pushButton_trends_plot_trends") + self.gridLayout_61.addWidget(self.pushButton_trends_plot_trends, 0, 3, 1, 2) + self.pushButton_trends_plot_interactive_line = QtWidgets.QPushButton(self.tab_15) + self.pushButton_trends_plot_interactive_line.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_97.sizePolicy().hasHeightForWidth()) - self.label_97.setSizePolicy(sizePolicy) - self.label_97.setObjectName("label_97") - self.horizontalLayout_97.addWidget(self.label_97) + sizePolicy.setHeightForWidth(self.pushButton_trends_plot_interactive_line.sizePolicy().hasHeightForWidth()) + self.pushButton_trends_plot_interactive_line.setSizePolicy(sizePolicy) + self.pushButton_trends_plot_interactive_line.setObjectName("pushButton_trends_plot_interactive_line") + self.gridLayout_61.addWidget(self.pushButton_trends_plot_interactive_line, 2, 3, 1, 1) + self.spinBox_trends_num_cluster = QtWidgets.QSpinBox(self.tab_15) + self.spinBox_trends_num_cluster.setMinimum(1) + self.spinBox_trends_num_cluster.setProperty("value", 5) + self.spinBox_trends_num_cluster.setObjectName("spinBox_trends_num_cluster") + self.gridLayout_61.addWidget(self.spinBox_trends_num_cluster, 0, 2, 1, 1) + self.label_145 = QtWidgets.QLabel(self.tab_15) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_145.setFont(font) + self.label_145.setObjectName("label_145") + self.gridLayout_61.addWidget(self.label_145, 0, 0, 1, 1) + self.checkBox_5 = QtWidgets.QCheckBox(self.tab_15) + self.checkBox_5.setObjectName("checkBox_5") + self.gridLayout_61.addWidget(self.checkBox_5, 3, 0, 1, 1) + self.gridLayout_24.addLayout(self.gridLayout_61, 9, 0, 1, 5) + self.horizontalLayout_116 = QtWidgets.QHBoxLayout() + self.horizontalLayout_116.setObjectName("horizontalLayout_116") + self.horizontalLayout_45 = QtWidgets.QHBoxLayout() + self.horizontalLayout_45.setObjectName("horizontalLayout_45") + self.checkBox_trends_in_condition = QtWidgets.QCheckBox(self.tab_15) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_trends_in_condition.sizePolicy().hasHeightForWidth()) + self.checkBox_trends_in_condition.setSizePolicy(sizePolicy) + self.checkBox_trends_in_condition.setLayoutDirection(QtCore.Qt.LeftToRight) + self.checkBox_trends_in_condition.setObjectName("checkBox_trends_in_condition") + self.horizontalLayout_45.addWidget(self.checkBox_trends_in_condition) + self.horizontalLayout_76 = QtWidgets.QHBoxLayout() + self.horizontalLayout_76.setObjectName("horizontalLayout_76") + self.comboBox_trends_condition_meta = QtWidgets.QComboBox(self.tab_15) + self.comboBox_trends_condition_meta.setEnabled(True) + self.comboBox_trends_condition_meta.setObjectName("comboBox_trends_condition_meta") + self.horizontalLayout_76.addWidget(self.comboBox_trends_condition_meta) + self.comboBox_trends_condition_group = QtWidgets.QComboBox(self.tab_15) + self.comboBox_trends_condition_group.setEnabled(True) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_trends_condition_group.sizePolicy().hasHeightForWidth()) + self.comboBox_trends_condition_group.setSizePolicy(sizePolicy) + self.comboBox_trends_condition_group.setObjectName("comboBox_trends_condition_group") + self.horizontalLayout_76.addWidget(self.comboBox_trends_condition_group) + self.horizontalLayout_45.addLayout(self.horizontalLayout_76) + self.horizontalLayout_116.addLayout(self.horizontalLayout_45) + self.verticalLayout_trends_group = QtWidgets.QVBoxLayout() + self.verticalLayout_trends_group.setObjectName("verticalLayout_trends_group") + self.horizontalLayout_116.addLayout(self.verticalLayout_trends_group) + self.verticalLayout_trends_sample = QtWidgets.QVBoxLayout() + self.verticalLayout_trends_sample.setObjectName("verticalLayout_trends_sample") + self.horizontalLayout_116.addLayout(self.verticalLayout_trends_sample) + self.gridLayout_24.addLayout(self.horizontalLayout_116, 2, 1, 1, 4) + self.line_18 = QtWidgets.QFrame(self.tab_15) + self.line_18.setFrameShape(QtWidgets.QFrame.HLine) + self.line_18.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_18.setObjectName("line_18") + self.gridLayout_24.addWidget(self.line_18, 1, 0, 1, 5) + self.groupBox_expression_trends_plot_settings = QtWidgets.QGroupBox(self.tab_15) + self.groupBox_expression_trends_plot_settings.setMaximumSize(QtCore.QSize(16777215, 250)) + self.groupBox_expression_trends_plot_settings.setObjectName("groupBox_expression_trends_plot_settings") + self.gridLayout_60 = QtWidgets.QGridLayout(self.groupBox_expression_trends_plot_settings) + self.gridLayout_60.setObjectName("gridLayout_60") + self.scrollArea_5 = QtWidgets.QScrollArea(self.groupBox_expression_trends_plot_settings) + self.scrollArea_5.setWidgetResizable(True) + self.scrollArea_5.setObjectName("scrollArea_5") + self.scrollAreaWidgetContents_6 = QtWidgets.QWidget() + self.scrollAreaWidgetContents_6.setGeometry(QtCore.QRect(0, 0, 885, 123)) + self.scrollAreaWidgetContents_6.setObjectName("scrollAreaWidgetContents_6") + self.gridLayout_57 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_6) + self.gridLayout_57.setObjectName("gridLayout_57") + self.gridLayout_59 = QtWidgets.QGridLayout() + self.gridLayout_59.setObjectName("gridLayout_59") + self.checkBox_trends_plot_interactive_rename_taxa = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_6) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_trends_plot_interactive_rename_taxa.sizePolicy().hasHeightForWidth()) + self.checkBox_trends_plot_interactive_rename_taxa.setSizePolicy(sizePolicy) + self.checkBox_trends_plot_interactive_rename_taxa.setChecked(True) + self.checkBox_trends_plot_interactive_rename_taxa.setObjectName("checkBox_trends_plot_interactive_rename_taxa") + self.gridLayout_59.addWidget(self.checkBox_trends_plot_interactive_rename_taxa, 1, 7, 1, 1) + self.checkBox_trends_plot_interactive_plot_samples = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_6) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_trends_plot_interactive_plot_samples.sizePolicy().hasHeightForWidth()) + self.checkBox_trends_plot_interactive_plot_samples.setSizePolicy(sizePolicy) + self.checkBox_trends_plot_interactive_plot_samples.setObjectName("checkBox_trends_plot_interactive_plot_samples") + self.gridLayout_59.addWidget(self.checkBox_trends_plot_interactive_plot_samples, 1, 1, 1, 3) + self.label_174 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_174.setFont(font) + self.label_174.setObjectName("label_174") + self.gridLayout_59.addWidget(self.label_174, 0, 0, 1, 1) + self.label_175 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_175.setFont(font) + self.label_175.setObjectName("label_175") + self.gridLayout_59.addWidget(self.label_175, 1, 0, 1, 1) + self.checkBox_trends_plot_interactive_show_legend = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_6) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_trends_plot_interactive_show_legend.sizePolicy().hasHeightForWidth()) + self.checkBox_trends_plot_interactive_show_legend.setSizePolicy(sizePolicy) + self.checkBox_trends_plot_interactive_show_legend.setChecked(True) + self.checkBox_trends_plot_interactive_show_legend.setObjectName("checkBox_trends_plot_interactive_show_legend") + self.gridLayout_59.addWidget(self.checkBox_trends_plot_interactive_show_legend, 1, 6, 1, 1) + self.checkBox_get_trends_cluster_intensity = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_6) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_get_trends_cluster_intensity.sizePolicy().hasHeightForWidth()) + self.checkBox_get_trends_cluster_intensity.setSizePolicy(sizePolicy) + self.checkBox_get_trends_cluster_intensity.setObjectName("checkBox_get_trends_cluster_intensity") + self.gridLayout_59.addWidget(self.checkBox_get_trends_cluster_intensity, 1, 4, 1, 2) + self.horizontalLayout_97 = QtWidgets.QHBoxLayout() + self.horizontalLayout_97.setObjectName("horizontalLayout_97") + self.label_97 = QtWidgets.QLabel(self.scrollAreaWidgetContents_6) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_97.sizePolicy().hasHeightForWidth()) + self.label_97.setSizePolicy(sizePolicy) + self.label_97.setObjectName("label_97") + self.horizontalLayout_97.addWidget(self.label_97) self.spinBox_trends_width = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_6) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -3959,51 +4082,58 @@ def setupUi(self, metaX_main): self.scrollArea_5.setWidget(self.scrollAreaWidgetContents_6) self.gridLayout_60.addWidget(self.scrollArea_5, 0, 0, 1, 1) self.gridLayout_24.addWidget(self.groupBox_expression_trends_plot_settings, 10, 0, 1, 5) - self.listWidget_trends_list_for_ploting = QtWidgets.QListWidget(self.tab_15) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + self.line_19 = QtWidgets.QFrame(self.tab_15) + self.line_19.setFrameShape(QtWidgets.QFrame.HLine) + self.line_19.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_19.setObjectName("line_19") + self.gridLayout_24.addWidget(self.line_19, 3, 0, 1, 5) + self.pushButton_trends_add_top = QtWidgets.QPushButton(self.tab_15) + self.pushButton_trends_add_top.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget_trends_list_for_ploting.sizePolicy().hasHeightForWidth()) - self.listWidget_trends_list_for_ploting.setSizePolicy(sizePolicy) - self.listWidget_trends_list_for_ploting.setObjectName("listWidget_trends_list_for_ploting") - self.gridLayout_24.addWidget(self.listWidget_trends_list_for_ploting, 6, 1, 2, 4) - self.horizontalLayout_116 = QtWidgets.QHBoxLayout() - self.horizontalLayout_116.setObjectName("horizontalLayout_116") - self.horizontalLayout_45 = QtWidgets.QHBoxLayout() - self.horizontalLayout_45.setObjectName("horizontalLayout_45") - self.checkBox_trends_in_condition = QtWidgets.QCheckBox(self.tab_15) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.pushButton_trends_add_top.sizePolicy().hasHeightForWidth()) + self.pushButton_trends_add_top.setSizePolicy(sizePolicy) + self.pushButton_trends_add_top.setObjectName("pushButton_trends_add_top") + self.gridLayout_24.addWidget(self.pushButton_trends_add_top, 5, 4, 1, 1) + self.verticalLayout_3 = QtWidgets.QVBoxLayout() + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.pushButton_trends_drop_item = QtWidgets.QPushButton(self.tab_15) + self.pushButton_trends_drop_item.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_trends_in_condition.sizePolicy().hasHeightForWidth()) - self.checkBox_trends_in_condition.setSizePolicy(sizePolicy) - self.checkBox_trends_in_condition.setLayoutDirection(QtCore.Qt.LeftToRight) - self.checkBox_trends_in_condition.setObjectName("checkBox_trends_in_condition") - self.horizontalLayout_45.addWidget(self.checkBox_trends_in_condition) - self.horizontalLayout_76 = QtWidgets.QHBoxLayout() - self.horizontalLayout_76.setObjectName("horizontalLayout_76") - self.comboBox_trends_condition_meta = QtWidgets.QComboBox(self.tab_15) - self.comboBox_trends_condition_meta.setEnabled(True) - self.comboBox_trends_condition_meta.setObjectName("comboBox_trends_condition_meta") - self.horizontalLayout_76.addWidget(self.comboBox_trends_condition_meta) - self.comboBox_trends_condition_group = QtWidgets.QComboBox(self.tab_15) - self.comboBox_trends_condition_group.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.pushButton_trends_drop_item.sizePolicy().hasHeightForWidth()) + self.pushButton_trends_drop_item.setSizePolicy(sizePolicy) + self.pushButton_trends_drop_item.setObjectName("pushButton_trends_drop_item") + self.verticalLayout_3.addWidget(self.pushButton_trends_drop_item) + self.pushButton_trends_clean_list = QtWidgets.QPushButton(self.tab_15) + self.pushButton_trends_clean_list.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_trends_condition_group.sizePolicy().hasHeightForWidth()) - self.comboBox_trends_condition_group.setSizePolicy(sizePolicy) - self.comboBox_trends_condition_group.setObjectName("comboBox_trends_condition_group") - self.horizontalLayout_76.addWidget(self.comboBox_trends_condition_group) - self.horizontalLayout_45.addLayout(self.horizontalLayout_76) - self.horizontalLayout_116.addLayout(self.horizontalLayout_45) - self.verticalLayout_trends_group = QtWidgets.QVBoxLayout() - self.verticalLayout_trends_group.setObjectName("verticalLayout_trends_group") - self.horizontalLayout_116.addLayout(self.verticalLayout_trends_group) - self.verticalLayout_trends_sample = QtWidgets.QVBoxLayout() - self.verticalLayout_trends_sample.setObjectName("verticalLayout_trends_sample") - self.horizontalLayout_116.addLayout(self.verticalLayout_trends_sample) - self.gridLayout_24.addLayout(self.horizontalLayout_116, 2, 1, 1, 4) + sizePolicy.setHeightForWidth(self.pushButton_trends_clean_list.sizePolicy().hasHeightForWidth()) + self.pushButton_trends_clean_list.setSizePolicy(sizePolicy) + self.pushButton_trends_clean_list.setObjectName("pushButton_trends_clean_list") + self.verticalLayout_3.addWidget(self.pushButton_trends_clean_list) + self.pushButton_trends_add_a_list = QtWidgets.QPushButton(self.tab_15) + self.pushButton_trends_add_a_list.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_trends_add_a_list.sizePolicy().hasHeightForWidth()) + self.pushButton_trends_add_a_list.setSizePolicy(sizePolicy) + self.pushButton_trends_add_a_list.setObjectName("pushButton_trends_add_a_list") + self.verticalLayout_3.addWidget(self.pushButton_trends_add_a_list) + self.gridLayout_24.addLayout(self.verticalLayout_3, 6, 0, 2, 1) + self.label_100 = QtWidgets.QLabel(self.tab_15) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_100.sizePolicy().hasHeightForWidth()) + self.label_100.setSizePolicy(sizePolicy) + self.label_100.setObjectName("label_100") + self.gridLayout_24.addWidget(self.label_100, 4, 0, 1, 1) self.pushButton_trends_add = QtWidgets.QPushButton(self.tab_15) self.pushButton_trends_add.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) @@ -4061,44 +4191,27 @@ def setupUi(self, metaX_main): self.checkBox_trends_top_filtered.setObjectName("checkBox_trends_top_filtered") self.horizontalLayout_46.addWidget(self.checkBox_trends_top_filtered) self.gridLayout_24.addLayout(self.horizontalLayout_46, 5, 1, 1, 3) - self.verticalLayout_3 = QtWidgets.QVBoxLayout() - self.verticalLayout_3.setObjectName("verticalLayout_3") - self.pushButton_trends_drop_item = QtWidgets.QPushButton(self.tab_15) - self.pushButton_trends_drop_item.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_trends_drop_item.sizePolicy().hasHeightForWidth()) - self.pushButton_trends_drop_item.setSizePolicy(sizePolicy) - self.pushButton_trends_drop_item.setObjectName("pushButton_trends_drop_item") - self.verticalLayout_3.addWidget(self.pushButton_trends_drop_item) - self.pushButton_trends_clean_list = QtWidgets.QPushButton(self.tab_15) - self.pushButton_trends_clean_list.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_trends_clean_list.sizePolicy().hasHeightForWidth()) - self.pushButton_trends_clean_list.setSizePolicy(sizePolicy) - self.pushButton_trends_clean_list.setObjectName("pushButton_trends_clean_list") - self.verticalLayout_3.addWidget(self.pushButton_trends_clean_list) - self.pushButton_trends_add_a_list = QtWidgets.QPushButton(self.tab_15) - self.pushButton_trends_add_a_list.setEnabled(False) + self.line_31 = QtWidgets.QFrame(self.tab_15) + self.line_31.setFrameShape(QtWidgets.QFrame.HLine) + self.line_31.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_31.setObjectName("line_31") + self.gridLayout_24.addWidget(self.line_31, 8, 0, 1, 5) + self.horizontalLayout_115 = QtWidgets.QHBoxLayout() + self.horizontalLayout_115.setObjectName("horizontalLayout_115") + self.label_215 = QtWidgets.QLabel(self.tab_15) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_trends_add_a_list.sizePolicy().hasHeightForWidth()) - self.pushButton_trends_add_a_list.setSizePolicy(sizePolicy) - self.pushButton_trends_add_a_list.setObjectName("pushButton_trends_add_a_list") - self.verticalLayout_3.addWidget(self.pushButton_trends_add_a_list) - self.gridLayout_24.addLayout(self.verticalLayout_3, 7, 0, 1, 1) - self.line_19 = QtWidgets.QFrame(self.tab_15) - self.line_19.setFrameShape(QtWidgets.QFrame.HLine) - self.line_19.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_19.setObjectName("line_19") - self.gridLayout_24.addWidget(self.line_19, 3, 0, 1, 5) - self.label_100 = QtWidgets.QLabel(self.tab_15) - self.label_100.setObjectName("label_100") - self.gridLayout_24.addWidget(self.label_100, 4, 0, 1, 1) + sizePolicy.setHeightForWidth(self.label_215.sizePolicy().hasHeightForWidth()) + self.label_215.setSizePolicy(sizePolicy) + self.label_215.setObjectName("label_215") + self.horizontalLayout_115.addWidget(self.label_215) + self.comboBox_trends_group_sample = QtWidgets.QComboBox(self.tab_15) + self.comboBox_trends_group_sample.setObjectName("comboBox_trends_group_sample") + self.comboBox_trends_group_sample.addItem("") + self.comboBox_trends_group_sample.addItem("") + self.horizontalLayout_115.addWidget(self.comboBox_trends_group_sample) + self.gridLayout_24.addLayout(self.horizontalLayout_115, 2, 0, 1, 1) self.horizontalLayout_44 = QtWidgets.QHBoxLayout() self.horizontalLayout_44.setObjectName("horizontalLayout_44") self.label_96 = QtWidgets.QLabel(self.tab_15) @@ -4119,103 +4232,22 @@ def setupUi(self, metaX_main): self.comboBox_trends_table.addItem("") self.comboBox_trends_table.addItem("") self.horizontalLayout_44.addWidget(self.comboBox_trends_table) + self.gridLayout_24.addLayout(self.horizontalLayout_44, 0, 0, 1, 2) + self.horizontalLayout_121 = QtWidgets.QHBoxLayout() + self.horizontalLayout_121.setObjectName("horizontalLayout_121") self.label_148 = QtWidgets.QLabel(self.tab_15) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_148.sizePolicy().hasHeightForWidth()) + self.label_148.setSizePolicy(sizePolicy) self.label_148.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_148.setObjectName("label_148") - self.horizontalLayout_44.addWidget(self.label_148) + self.horizontalLayout_121.addWidget(self.label_148) self.comboBox_trends_meta = QtWidgets.QComboBox(self.tab_15) self.comboBox_trends_meta.setObjectName("comboBox_trends_meta") - self.horizontalLayout_44.addWidget(self.comboBox_trends_meta) - self.gridLayout_24.addLayout(self.horizontalLayout_44, 0, 0, 1, 5) - self.comboBox_trends_selection_list = QtWidgets.QComboBox(self.tab_15) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_trends_selection_list.sizePolicy().hasHeightForWidth()) - self.comboBox_trends_selection_list.setSizePolicy(sizePolicy) - self.comboBox_trends_selection_list.setMinimumSize(QtCore.QSize(600, 0)) - self.comboBox_trends_selection_list.setObjectName("comboBox_trends_selection_list") - self.gridLayout_24.addWidget(self.comboBox_trends_selection_list, 4, 1, 1, 3) - self.pushButton_trends_add_top = QtWidgets.QPushButton(self.tab_15) - self.pushButton_trends_add_top.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_trends_add_top.sizePolicy().hasHeightForWidth()) - self.pushButton_trends_add_top.setSizePolicy(sizePolicy) - self.pushButton_trends_add_top.setObjectName("pushButton_trends_add_top") - self.gridLayout_24.addWidget(self.pushButton_trends_add_top, 5, 4, 1, 1) - self.gridLayout_61 = QtWidgets.QGridLayout() - self.gridLayout_61.setObjectName("gridLayout_61") - self.label_93 = QtWidgets.QLabel(self.tab_15) - self.label_93.setObjectName("label_93") - self.gridLayout_61.addWidget(self.label_93, 2, 1, 1, 1) - self.pushButton_trends_get_trends_table = QtWidgets.QPushButton(self.tab_15) - self.pushButton_trends_get_trends_table.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_trends_get_trends_table.sizePolicy().hasHeightForWidth()) - self.pushButton_trends_get_trends_table.setSizePolicy(sizePolicy) - self.pushButton_trends_get_trends_table.setObjectName("pushButton_trends_get_trends_table") - self.gridLayout_61.addWidget(self.pushButton_trends_get_trends_table, 2, 4, 1, 1) - self.label_165 = QtWidgets.QLabel(self.tab_15) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_165.setFont(font) - self.label_165.setObjectName("label_165") - self.gridLayout_61.addWidget(self.label_165, 2, 0, 1, 1) - self.comboBox_trends_get_cluster_name = QtWidgets.QComboBox(self.tab_15) - self.comboBox_trends_get_cluster_name.setObjectName("comboBox_trends_get_cluster_name") - self.gridLayout_61.addWidget(self.comboBox_trends_get_cluster_name, 2, 2, 1, 1) - self.line_20 = QtWidgets.QFrame(self.tab_15) - self.line_20.setFrameShape(QtWidgets.QFrame.HLine) - self.line_20.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_20.setObjectName("line_20") - self.gridLayout_61.addWidget(self.line_20, 1, 1, 1, 4) - self.label_95 = QtWidgets.QLabel(self.tab_15) - self.label_95.setObjectName("label_95") - self.gridLayout_61.addWidget(self.label_95, 0, 1, 1, 1) - self.pushButton_trends_plot_trends = QtWidgets.QPushButton(self.tab_15) - self.pushButton_trends_plot_trends.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_trends_plot_trends.sizePolicy().hasHeightForWidth()) - self.pushButton_trends_plot_trends.setSizePolicy(sizePolicy) - self.pushButton_trends_plot_trends.setObjectName("pushButton_trends_plot_trends") - self.gridLayout_61.addWidget(self.pushButton_trends_plot_trends, 0, 3, 1, 2) - self.pushButton_trends_plot_interactive_line = QtWidgets.QPushButton(self.tab_15) - self.pushButton_trends_plot_interactive_line.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_trends_plot_interactive_line.sizePolicy().hasHeightForWidth()) - self.pushButton_trends_plot_interactive_line.setSizePolicy(sizePolicy) - self.pushButton_trends_plot_interactive_line.setObjectName("pushButton_trends_plot_interactive_line") - self.gridLayout_61.addWidget(self.pushButton_trends_plot_interactive_line, 2, 3, 1, 1) - self.spinBox_trends_num_cluster = QtWidgets.QSpinBox(self.tab_15) - self.spinBox_trends_num_cluster.setMinimum(1) - self.spinBox_trends_num_cluster.setProperty("value", 5) - self.spinBox_trends_num_cluster.setObjectName("spinBox_trends_num_cluster") - self.gridLayout_61.addWidget(self.spinBox_trends_num_cluster, 0, 2, 1, 1) - self.label_145 = QtWidgets.QLabel(self.tab_15) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_145.setFont(font) - self.label_145.setObjectName("label_145") - self.gridLayout_61.addWidget(self.label_145, 0, 0, 1, 1) - self.checkBox_5 = QtWidgets.QCheckBox(self.tab_15) - self.checkBox_5.setObjectName("checkBox_5") - self.gridLayout_61.addWidget(self.checkBox_5, 3, 0, 1, 1) - self.gridLayout_24.addLayout(self.gridLayout_61, 9, 0, 1, 5) - self.line_31 = QtWidgets.QFrame(self.tab_15) - self.line_31.setFrameShape(QtWidgets.QFrame.HLine) - self.line_31.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_31.setObjectName("line_31") - self.gridLayout_24.addWidget(self.line_31, 8, 0, 1, 5) + self.horizontalLayout_121.addWidget(self.comboBox_trends_meta) + self.gridLayout_24.addLayout(self.horizontalLayout_121, 0, 2, 1, 1) self.tabWidget.addTab(self.tab_15, "") self.gridLayout_12.addWidget(self.tabWidget, 0, 0, 1, 1) self.tabWidget_TaxaFuncAnalyzer.addTab(self.tab_diff_stats, "") @@ -4274,19 +4306,10 @@ def setupUi(self, metaX_main): self.label_18.setSizePolicy(sizePolicy) self.label_18.setObjectName("label_18") self.gridLayout_4.addWidget(self.label_18, 5, 0, 1, 1) - self.comboBox_tflink_meta = QtWidgets.QComboBox(self.tab_8) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_tflink_meta.sizePolicy().hasHeightForWidth()) - self.comboBox_tflink_meta.setSizePolicy(sizePolicy) - self.comboBox_tflink_meta.setLayoutDirection(QtCore.Qt.LeftToRight) - self.comboBox_tflink_meta.setObjectName("comboBox_tflink_meta") - self.gridLayout_4.addWidget(self.comboBox_tflink_meta, 0, 1, 1, 1) self.horizontalLayout_101 = QtWidgets.QHBoxLayout() self.horizontalLayout_101.setObjectName("horizontalLayout_101") self.label_196 = QtWidgets.QLabel(self.tab_8) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_196.sizePolicy().hasHeightForWidth()) @@ -4655,14 +4678,6 @@ def setupUi(self, metaX_main): self.label_19.setSizePolicy(sizePolicy) self.label_19.setObjectName("label_19") self.gridLayout_4.addWidget(self.label_19, 6, 0, 1, 1) - self.label_149 = QtWidgets.QLabel(self.tab_8) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_149.sizePolicy().hasHeightForWidth()) - self.label_149.setSizePolicy(sizePolicy) - self.label_149.setObjectName("label_149") - self.gridLayout_4.addWidget(self.label_149, 0, 0, 1, 1) self.comboBox_others_taxa = QtWidgets.QComboBox(self.tab_8) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -4775,6 +4790,26 @@ def setupUi(self, metaX_main): self.gridLayout_tflink_sample.setObjectName("gridLayout_tflink_sample") self.horizontalLayout_118.addLayout(self.gridLayout_tflink_sample) self.gridLayout_4.addLayout(self.horizontalLayout_118, 2, 1, 1, 3) + self.horizontalLayout_123 = QtWidgets.QHBoxLayout() + self.horizontalLayout_123.setObjectName("horizontalLayout_123") + self.label_149 = QtWidgets.QLabel(self.tab_8) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_149.sizePolicy().hasHeightForWidth()) + self.label_149.setSizePolicy(sizePolicy) + self.label_149.setObjectName("label_149") + self.horizontalLayout_123.addWidget(self.label_149) + self.comboBox_tflink_meta = QtWidgets.QComboBox(self.tab_8) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_tflink_meta.sizePolicy().hasHeightForWidth()) + self.comboBox_tflink_meta.setSizePolicy(sizePolicy) + self.comboBox_tflink_meta.setLayoutDirection(QtCore.Qt.LeftToRight) + self.comboBox_tflink_meta.setObjectName("comboBox_tflink_meta") + self.horizontalLayout_123.addWidget(self.comboBox_tflink_meta) + self.gridLayout_4.addLayout(self.horizontalLayout_123, 0, 0, 1, 2) self.tabWidget_2.addTab(self.tab_8, "") self.tab_9 = QtWidgets.QWidget() self.tab_9.setObjectName("tab_9") @@ -4854,31 +4889,6 @@ def setupUi(self, metaX_main): self.label_77.setSizePolicy(sizePolicy) self.label_77.setObjectName("label_77") self.gridLayout_6.addWidget(self.label_77, 5, 0, 1, 1) - self.horizontalLayout_9 = QtWidgets.QHBoxLayout() - self.horizontalLayout_9.setObjectName("horizontalLayout_9") - self.label_49 = QtWidgets.QLabel(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_49.sizePolicy().hasHeightForWidth()) - self.label_49.setSizePolicy(sizePolicy) - self.label_49.setObjectName("label_49") - self.horizontalLayout_9.addWidget(self.label_49) - self.comboBox_tfnet_table = QtWidgets.QComboBox(self.tab_9) - self.comboBox_tfnet_table.setEnabled(False) - self.comboBox_tfnet_table.setObjectName("comboBox_tfnet_table") - self.comboBox_tfnet_table.addItem("") - self.comboBox_tfnet_table.addItem("") - self.comboBox_tfnet_table.addItem("") - self.horizontalLayout_9.addWidget(self.comboBox_tfnet_table) - self.label_150 = QtWidgets.QLabel(self.tab_9) - self.label_150.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_150.setObjectName("label_150") - self.horizontalLayout_9.addWidget(self.label_150) - self.comboBox_network_meta = QtWidgets.QComboBox(self.tab_9) - self.comboBox_network_meta.setObjectName("comboBox_network_meta") - self.horizontalLayout_9.addWidget(self.comboBox_network_meta) - self.gridLayout_6.addLayout(self.horizontalLayout_9, 0, 0, 1, 3) self.listWidget_tfnet_focus_list = QtWidgets.QListWidget(self.tab_9) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) @@ -4966,11 +4976,11 @@ def setupUi(self, metaX_main): self.label_217.setSizePolicy(sizePolicy) self.label_217.setObjectName("label_217") self.horizontalLayout_119.addWidget(self.label_217) - self.comboBox_radioButton_network_group_sample = QtWidgets.QComboBox(self.tab_9) - self.comboBox_radioButton_network_group_sample.setObjectName("comboBox_radioButton_network_group_sample") - self.comboBox_radioButton_network_group_sample.addItem("") - self.comboBox_radioButton_network_group_sample.addItem("") - self.horizontalLayout_119.addWidget(self.comboBox_radioButton_network_group_sample) + self.comboBox_network_group_sample = QtWidgets.QComboBox(self.tab_9) + self.comboBox_network_group_sample.setObjectName("comboBox_network_group_sample") + self.comboBox_network_group_sample.addItem("") + self.comboBox_network_group_sample.addItem("") + self.horizontalLayout_119.addWidget(self.comboBox_network_group_sample) self.gridLayout_6.addLayout(self.horizontalLayout_119, 2, 0, 1, 1) self.groupBox_taxa_func_link_net_plot_settings = QtWidgets.QGroupBox(self.tab_9) self.groupBox_taxa_func_link_net_plot_settings.setMaximumSize(QtCore.QSize(16777215, 260)) @@ -4981,7 +4991,7 @@ def setupUi(self, metaX_main): self.scrollArea_7.setWidgetResizable(True) self.scrollArea_7.setObjectName("scrollArea_7") self.scrollAreaWidgetContents_8 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_8.setGeometry(QtCore.QRect(0, 0, 885, 166)) + self.scrollAreaWidgetContents_8.setGeometry(QtCore.QRect(0, 0, 885, 158)) self.scrollAreaWidgetContents_8.setObjectName("scrollAreaWidgetContents_8") self.gridLayout_66 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_8) self.gridLayout_66.setObjectName("gridLayout_66") @@ -5116,6 +5126,44 @@ def setupUi(self, metaX_main): self.gridLayout_network_sample.setObjectName("gridLayout_network_sample") self.horizontalLayout_120.addLayout(self.gridLayout_network_sample) self.gridLayout_6.addLayout(self.horizontalLayout_120, 2, 1, 1, 3) + self.horizontalLayout_9 = QtWidgets.QHBoxLayout() + self.horizontalLayout_9.setObjectName("horizontalLayout_9") + self.label_49 = QtWidgets.QLabel(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_49.sizePolicy().hasHeightForWidth()) + self.label_49.setSizePolicy(sizePolicy) + self.label_49.setObjectName("label_49") + self.horizontalLayout_9.addWidget(self.label_49) + self.comboBox_tfnet_table = QtWidgets.QComboBox(self.tab_9) + self.comboBox_tfnet_table.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_tfnet_table.sizePolicy().hasHeightForWidth()) + self.comboBox_tfnet_table.setSizePolicy(sizePolicy) + self.comboBox_tfnet_table.setObjectName("comboBox_tfnet_table") + self.comboBox_tfnet_table.addItem("") + self.comboBox_tfnet_table.addItem("") + self.comboBox_tfnet_table.addItem("") + self.horizontalLayout_9.addWidget(self.comboBox_tfnet_table) + self.gridLayout_6.addLayout(self.horizontalLayout_9, 0, 0, 1, 2) + self.horizontalLayout_122 = QtWidgets.QHBoxLayout() + self.horizontalLayout_122.setObjectName("horizontalLayout_122") + self.label_150 = QtWidgets.QLabel(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_150.sizePolicy().hasHeightForWidth()) + self.label_150.setSizePolicy(sizePolicy) + self.label_150.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_150.setObjectName("label_150") + self.horizontalLayout_122.addWidget(self.label_150) + self.comboBox_network_meta = QtWidgets.QComboBox(self.tab_9) + self.comboBox_network_meta.setObjectName("comboBox_network_meta") + self.horizontalLayout_122.addWidget(self.comboBox_network_meta) + self.gridLayout_6.addLayout(self.horizontalLayout_122, 0, 2, 1, 1) self.tabWidget_2.addTab(self.tab_9, "") self.gridLayout_19.addWidget(self.tabWidget_2, 0, 0, 1, 1) self.tabWidget_TaxaFuncAnalyzer.addTab(self.tab_others_stats, "") @@ -5597,7 +5645,7 @@ def setupUi(self, metaX_main): self.statusbar.setObjectName("statusbar") metaX_main.setStatusBar(self.statusbar) self.menuBar = QtWidgets.QMenuBar(metaX_main) - self.menuBar.setGeometry(QtCore.QRect(0, 0, 991, 23)) + self.menuBar.setGeometry(QtCore.QRect(0, 0, 991, 21)) self.menuBar.setObjectName("menuBar") self.menuTools = QtWidgets.QMenu(self.menuBar) self.menuTools.setObjectName("menuTools") @@ -5665,10 +5713,10 @@ def setupUi(self, metaX_main): self.stackedWidget.setCurrentIndex(0) self.tabWidget_TaxaFuncAnalyzer.setCurrentIndex(5) self.toolBox_2.setCurrentIndex(0) - self.tabWidget_4.setCurrentIndex(0) - self.tabWidget_3.setCurrentIndex(0) - self.tabWidget.setCurrentIndex(0) - self.tabWidget_2.setCurrentIndex(0) + self.tabWidget_4.setCurrentIndex(1) + self.tabWidget_3.setCurrentIndex(3) + self.tabWidget.setCurrentIndex(1) + self.tabWidget_2.setCurrentIndex(1) self.tabWidget_6.setCurrentIndex(0) self.toolBox_metalab_res_anno.setCurrentIndex(0) self.tabWidget_5.setCurrentIndex(0) @@ -5887,9 +5935,7 @@ def retranslateUi(self, metaX_main): self.label_160.setText(_translate("metaX_main", "Dot Size")) self.label_155.setText(_translate("metaX_main", "Counts Plot")) self.label_137.setText(_translate("metaX_main", "Sunburst")) - self.checkBox_box_if_show_fliers.setText(_translate("metaX_main", "show Fliers")) self.label_122.setText(_translate("metaX_main", "general")) - self.checkBox_box_plot_samples.setText(_translate("metaX_main", "Plot Samples")) self.checkBox_pca_if_show_group_name_in_label.setToolTip(_translate("metaX_main", "Add group name to Sample names")) self.checkBox_pca_if_show_group_name_in_label.setText(_translate("metaX_main", "Rename Samples")) self.checkBox_pca_if_show_lable.setToolTip(_translate("metaX_main", "Show label text in diagram")) @@ -5922,6 +5968,10 @@ def retranslateUi(self, metaX_main): self.checkBox_basic_plot_upset_show_percentage.setText(_translate("metaX_main", "Show Percentages")) self.label_206.setText(_translate("metaX_main", "Min Subset Size")) self.label_208.setText(_translate("metaX_main", "Max Rank")) + self.checkBox_box_plot_samples.setText(_translate("metaX_main", "Plot Samples")) + self.checkBox_box_if_show_fliers.setText(_translate("metaX_main", "show Fliers")) + self.checkBox_box_log_scale.setText(_translate("metaX_main", "Log Scale")) + self.checkBox_box_violinplot.setText(_translate("metaX_main", "Plot as Violinplot")) self.checkBox_basic_in_condtion.setText(_translate("metaX_main", "In Condition")) self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.tab_12), _translate("metaX_main", "Basic Plot")) self.label_32.setText(_translate("metaX_main", "Select for plotting")) @@ -6169,13 +6219,7 @@ def retranslateUi(self, metaX_main): self.label_187.setText(_translate("metaX_main", "General")) self.label_188.setText(_translate("metaX_main", "Network")) self.checkBox_co_expr_plot_list_only.setText(_translate("metaX_main", "Plot List Only")) - self.label_29.setText(_translate("metaX_main", "Table")) - self.comboBox_co_expr_table.setItemText(0, _translate("metaX_main", "Taxa")) - self.comboBox_co_expr_table.setItemText(1, _translate("metaX_main", "Functions")) - self.comboBox_co_expr_table.setItemText(2, _translate("metaX_main", "Taxa-Functions")) - self.comboBox_co_expr_table.setItemText(3, _translate("metaX_main", "Peptides")) - self.label_143.setText(_translate("metaX_main", "Meta")) - self.label_72.setText(_translate("metaX_main", "Focus List")) + self.label_72.setText(_translate("metaX_main", "Select Focus")) self.pushButton_co_expr_add_top.setToolTip(_translate("metaX_main", "Add conditionally filtered items to the drawing box")) self.pushButton_co_expr_add_top.setText(_translate("metaX_main", "Add Top to List")) self.pushButton_co_expr_plot.setText(_translate("metaX_main", "Plot Co-Expression Network")) @@ -6194,11 +6238,22 @@ def retranslateUi(self, metaX_main): self.comboBox_co_expr_top_by.setItemText(9, _translate("metaX_main", "Deseq2-up(log2FC)")) self.comboBox_co_expr_top_by.setItemText(10, _translate("metaX_main", "Deseq2-down(log2FC)")) self.checkBox_co_expr_top_filtered.setText(_translate("metaX_main", "Filter with threshold")) + self.label_29.setText(_translate("metaX_main", "Table")) + self.comboBox_co_expr_table.setItemText(0, _translate("metaX_main", "Taxa")) + self.comboBox_co_expr_table.setItemText(1, _translate("metaX_main", "Functions")) + self.comboBox_co_expr_table.setItemText(2, _translate("metaX_main", "Taxa-Functions")) + self.comboBox_co_expr_table.setItemText(3, _translate("metaX_main", "Peptides")) + self.label_143.setText(_translate("metaX_main", "Meta")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("metaX_main", "Co-Expression")) - self.label_215.setText(_translate("metaX_main", "Select")) - self.comboBox_trends_group_sample.setItemText(0, _translate("metaX_main", "Group")) - self.comboBox_trends_group_sample.setItemText(1, _translate("metaX_main", "Sample")) - self.label_98.setText(_translate("metaX_main", "List for Plotting")) + self.label_93.setText(_translate("metaX_main", "Select Cluster")) + self.pushButton_trends_get_trends_table.setText(_translate("metaX_main", "Get ClusterTable")) + self.label_165.setText(_translate("metaX_main", "Plot Specific Cluster")) + self.label_95.setText(_translate("metaX_main", "Cluster Number")) + self.pushButton_trends_plot_trends.setText(_translate("metaX_main", "Plot Trends")) + self.pushButton_trends_plot_interactive_line.setText(_translate("metaX_main", "Plot Interactive Line")) + self.label_145.setText(_translate("metaX_main", "Calculate Cluster")) + self.checkBox_5.setText(_translate("metaX_main", "Show Plotting Parameter")) + self.checkBox_trends_in_condition.setText(_translate("metaX_main", "In Condition")) self.groupBox_expression_trends_plot_settings.setTitle(_translate("metaX_main", "Plotting Parameter")) self.checkBox_trends_plot_interactive_rename_taxa.setText(_translate("metaX_main", "Simplify Taxa Names")) self.checkBox_trends_plot_interactive_plot_samples.setText(_translate("metaX_main", "Plot Samples")) @@ -6210,7 +6265,13 @@ def retranslateUi(self, metaX_main): self.label_92.setText(_translate("metaX_main", "Height")) self.label_158.setText(_translate("metaX_main", "Font Size")) self.label_195.setText(_translate("metaX_main", "Number of Col for Cluster Plot")) - self.checkBox_trends_in_condition.setText(_translate("metaX_main", "In Condition")) + self.pushButton_trends_add_top.setToolTip(_translate("metaX_main", "Add conditionally filtered items to the drawing box")) + self.pushButton_trends_add_top.setText(_translate("metaX_main", "Add Top to List")) + self.pushButton_trends_drop_item.setText(_translate("metaX_main", "Drop Item")) + self.pushButton_trends_clean_list.setText(_translate("metaX_main", "Clean List")) + self.pushButton_trends_add_a_list.setToolTip(_translate("metaX_main", "Add a list to the drawing box, make sure there is one item per line.")) + self.pushButton_trends_add_a_list.setText(_translate("metaX_main", "Add A list")) + self.label_100.setText(_translate("metaX_main", "Select for plotting")) self.pushButton_trends_add.setToolTip(_translate("metaX_main", "Add selected item to the drawing box")) self.pushButton_trends_add.setText(_translate("metaX_main", "Add to List")) self.label_99.setText(_translate("metaX_main", "Select Top")) @@ -6227,27 +6288,15 @@ def retranslateUi(self, metaX_main): self.comboBox_trends_top_by.setItemText(9, _translate("metaX_main", "Deseq2-up(log2FC)")) self.comboBox_trends_top_by.setItemText(10, _translate("metaX_main", "Deseq2-down(log2FC)")) self.checkBox_trends_top_filtered.setText(_translate("metaX_main", "Filter with threshold")) - self.pushButton_trends_drop_item.setText(_translate("metaX_main", "Drop Item")) - self.pushButton_trends_clean_list.setText(_translate("metaX_main", "Clean List")) - self.pushButton_trends_add_a_list.setToolTip(_translate("metaX_main", "Add a list to the drawing box, make sure there is one item per line.")) - self.pushButton_trends_add_a_list.setText(_translate("metaX_main", "Add A list")) - self.label_100.setText(_translate("metaX_main", "Select for plotting")) + self.label_215.setText(_translate("metaX_main", "Select")) + self.comboBox_trends_group_sample.setItemText(0, _translate("metaX_main", "Group")) + self.comboBox_trends_group_sample.setItemText(1, _translate("metaX_main", "Sample")) self.label_96.setText(_translate("metaX_main", "Table")) self.comboBox_trends_table.setItemText(0, _translate("metaX_main", "Taxa")) self.comboBox_trends_table.setItemText(1, _translate("metaX_main", "Functions")) self.comboBox_trends_table.setItemText(2, _translate("metaX_main", "Taxa-Functions")) self.comboBox_trends_table.setItemText(3, _translate("metaX_main", "Peptides")) self.label_148.setText(_translate("metaX_main", "Meta")) - self.pushButton_trends_add_top.setToolTip(_translate("metaX_main", "Add conditionally filtered items to the drawing box")) - self.pushButton_trends_add_top.setText(_translate("metaX_main", "Add Top to List")) - self.label_93.setText(_translate("metaX_main", "Select Cluster")) - self.pushButton_trends_get_trends_table.setText(_translate("metaX_main", "Get ClusterTable")) - self.label_165.setText(_translate("metaX_main", "Plot Specific Cluster")) - self.label_95.setText(_translate("metaX_main", "Cluster Number")) - self.pushButton_trends_plot_trends.setText(_translate("metaX_main", "Plot Trends")) - self.pushButton_trends_plot_interactive_line.setText(_translate("metaX_main", "Plot Interactive Line")) - self.label_145.setText(_translate("metaX_main", "Calculate Cluster")) - self.checkBox_5.setText(_translate("metaX_main", "Show Plotting Parameter")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_15), _translate("metaX_main", "Expression Trends")) self.tabWidget_TaxaFuncAnalyzer.setTabText(self.tabWidget_TaxaFuncAnalyzer.indexOf(self.tab_diff_stats), _translate("metaX_main", "Expression Analysis")) self.pushButton_others_plot_heatmap.setText(_translate("metaX_main", "Plot Heatmap")) @@ -6290,7 +6339,6 @@ def retranslateUi(self, metaX_main): self.label_others_func_num.setText(_translate("metaX_main", "Linked Number: -")) self.pushButton_others_show_linked_taxa.setText(_translate("metaX_main", "Show Linked Taxa Only")) self.label_19.setText(_translate("metaX_main", "Taxa")) - self.label_149.setText(_translate("metaX_main", "Meta")) self.label_75.setText(_translate("metaX_main", "Filter Top")) self.label_76.setText(_translate("metaX_main", "By")) self.comboBox_tflink_top_by.setItemText(0, _translate("metaX_main", "Total Intensity")) @@ -6308,6 +6356,7 @@ def retranslateUi(self, metaX_main): self.pushButton_tflink_filter.setToolTip(_translate("metaX_main", "Filter items in the two lists by condition")) self.pushButton_tflink_filter.setText(_translate("metaX_main", "Filter")) self.checkBox_tflink_in_condition.setText(_translate("metaX_main", "In Condition")) + self.label_149.setText(_translate("metaX_main", "Meta")) self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_8), _translate("metaX_main", "Taxa-Func Link")) self.label_78.setText(_translate("metaX_main", "Select Top")) self.label_79.setText(_translate("metaX_main", "Sort by")) @@ -6325,11 +6374,6 @@ def retranslateUi(self, metaX_main): self.checkBox_tfnet_top_filtered.setText(_translate("metaX_main", "Filter with threshold")) self.checkBox_7.setText(_translate("metaX_main", "Show Parameter")) self.label_77.setText(_translate("metaX_main", "Focus List")) - self.label_49.setText(_translate("metaX_main", "Table")) - self.comboBox_tfnet_table.setItemText(0, _translate("metaX_main", "Taxa")) - self.comboBox_tfnet_table.setItemText(1, _translate("metaX_main", "Functions")) - self.comboBox_tfnet_table.setItemText(2, _translate("metaX_main", "Taxa-Functions")) - self.label_150.setText(_translate("metaX_main", "Meta")) self.pushButton_tfnet_add_to_list.setToolTip(_translate("metaX_main", "Add selected item to the drawing box")) self.pushButton_tfnet_add_to_list.setText(_translate("metaX_main", "Add to Focus List")) self.pushButton_plot_network.setText(_translate("metaX_main", "Plot Ntework")) @@ -6340,8 +6384,8 @@ def retranslateUi(self, metaX_main): self.pushButton_tfnet_add_top.setToolTip(_translate("metaX_main", "Add conditionally filtered items to the drawing box")) self.pushButton_tfnet_add_top.setText(_translate("metaX_main", "Add Top to List")) self.label_217.setText(_translate("metaX_main", "Select")) - self.comboBox_radioButton_network_group_sample.setItemText(0, _translate("metaX_main", "Group")) - self.comboBox_radioButton_network_group_sample.setItemText(1, _translate("metaX_main", "Sample")) + self.comboBox_network_group_sample.setItemText(0, _translate("metaX_main", "Group")) + self.comboBox_network_group_sample.setItemText(1, _translate("metaX_main", "Sample")) self.groupBox_taxa_func_link_net_plot_settings.setTitle(_translate("metaX_main", "Plotting Parameter")) self.label_50.setText(_translate("metaX_main", "Width")) self.label_51.setText(_translate("metaX_main", "Height")) @@ -6351,6 +6395,11 @@ def retranslateUi(self, metaX_main): self.checkBox_tf_link_net_rename_taxa.setText(_translate("metaX_main", "Raname Taxa")) self.label_163.setText(_translate("metaX_main", "Font Size")) self.checkBox_tfnetwork_in_condition.setText(_translate("metaX_main", "In Condition")) + self.label_49.setText(_translate("metaX_main", "Table")) + self.comboBox_tfnet_table.setItemText(0, _translate("metaX_main", "Taxa")) + self.comboBox_tfnet_table.setItemText(1, _translate("metaX_main", "Functions")) + self.comboBox_tfnet_table.setItemText(2, _translate("metaX_main", "Taxa-Functions")) + self.label_150.setText(_translate("metaX_main", "Meta")) self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_9), _translate("metaX_main", "Taxa-Func Network")) self.tabWidget_TaxaFuncAnalyzer.setTabText(self.tabWidget_TaxaFuncAnalyzer.indexOf(self.tab_others_stats), _translate("metaX_main", "Taxa-Func Link")) self.pushButton_view_table.setText(_translate("metaX_main", "View Table")) diff --git a/metax/taxafunc_ploter/basic_plot.py b/metax/taxafunc_ploter/basic_plot.py index b64aa9f..86ba8ff 100644 --- a/metax/taxafunc_ploter/basic_plot.py +++ b/metax/taxafunc_ploter/basic_plot.py @@ -251,42 +251,41 @@ def plot_pca_sns(self, df, title_name = 'Table', show_label = True, plt.close('all') raise e - - def plot_box_sns(self, df, title_name = 'Table', show_fliers = False, width=10, height=8, - font_size = 10, theme:str|None = None, rename_sample:bool = False, - plot_samples:bool = False, legend_col_num: int | None = None, sub_meta:str|None = 'None'): + def plot_box_sns(self, df, title_name='Table', show_fliers=False, width=10, height=8, + font_size=10, theme: str | None = None, rename_sample: bool = False, + plot_samples: bool = False, legend_col_num: int | None = None, + sub_meta: str | None = 'None', violinplot: bool = False, log_scale: bool = False): - def create_df(self, df, sub_meta:str|None = 'None', plot_samples:bool = False): + def create_df(self, df, sub_meta: str | None = 'None', plot_samples: bool = False): df = df.copy() - # replace 0 with nan due to optimization of boxplot + # Replace 0 with NaN to optimize boxplot/violinplot visualization df = df.replace(0, np.nan) - + sample_list = df.columns - + group_list = [self.tfa.get_group_of_a_sample(sample) for sample in sample_list] - # get unique groups, and keep the order + # Get unique groups while preserving order group_order = [x for i, x in enumerate(group_list) if i == group_list.index(x)] - + group_map = {sample: self.tfa.get_group_of_a_sample(sample) for sample in sample_list} - + df = df.melt(var_name='Sample', value_name='Intensity') df['Group'] = df['Sample'].map(group_map) - + if plot_samples: - # resort the by sample_list + # Sort by sample_list df = df.sort_values(by='Sample', key=lambda x: x.map({v: i for i, v in enumerate(sample_list)})) else: if sub_meta not in ['None', None]: sub_group_map = {sample: self.tfa.get_group_of_a_sample(sample, sub_meta) for sample in sample_list} df['SubGroup'] = df['Sample'].map(sub_group_map) else: - df['SubGroup'] = df['Group'] # copy the group to sub group, avoid error - # resort the by group + df['SubGroup'] = df['Group'] # Copy group to SubGroup to avoid errors + # Sort by group df = df.sort_values(by='Group', key=lambda x: x.map({v: i for i, v in enumerate(group_order)})) - + return df - - + df = create_df(self, df, sub_meta, plot_samples) unique_groups = df['Group'].unique() if plot_samples else df['SubGroup'].unique() @@ -295,28 +294,43 @@ def create_df(self, df, sub_meta:str|None = 'None', plot_samples:bool = False): distinct_colors = self.get_distinct_colors(len(unique_groups)) color_palette = dict(zip(unique_groups, distinct_colors)) else: - # color_palette = dict(zip(unique_groups, sns.color_palette("deep", len(unique_groups)))) color_palette = None - # set style + # Set style if theme is not None and theme != 'Auto': plt.style.use(theme) else: custom_params = {"axes.spines.right": False, "axes.spines.top": False} sns.set_theme(style="ticks", rc=custom_params) - # set size + # Set size plt.figure(figsize=(width, height)) - ax = sns.boxplot( - data=df, - x="Sample" if plot_samples else "Group", - y="Intensity", - hue="Group" if sub_meta in ["None", None] or plot_samples else "SubGroup", - palette=color_palette, - showfliers=show_fliers, - legend=True, - ) - # set x label + plot_func = sns.violinplot if violinplot else sns.boxplot # Determine plot type + + # Prepare specific kwargs for violinplot + plot_kwargs = { + "data": df, + "x": "Sample" if plot_samples else "Group", + "y": "Intensity", + "hue": "Group" if sub_meta in ["None", None] or plot_samples else "SubGroup", + "palette": color_palette, + "legend": True, + "log_scale": log_scale, + } + if violinplot: + plot_kwargs.update({ + "cut": 0, + "linewidth": 1, + }) + else: # Boxplot + plot_kwargs.update({ + "showfliers": show_fliers, + }) + + # Plot + ax = plot_func(**plot_kwargs) + + # Set x-axis labels x_labels = ax.get_xticklabels() if rename_sample and plot_samples: for label in x_labels: @@ -326,34 +340,33 @@ def create_df(self, df, sub_meta:str|None = 'None', plot_samples:bool = False): ax.set_xticklabels(x_labels, rotation=90, horizontalalignment='right', fontsize=font_size) ax.set_xlabel('Sample' if plot_samples else 'Group', - fontsize=font_size+2) + fontsize=font_size + 2) + + ax.set_ylabel('Intensity', fontsize=font_size + 2) + plot_title = 'Violinplot' if violinplot else 'Boxplot' + ax.set_title(f'{plot_title} of Intensity of {title_name}', + fontsize=font_size + 2, fontweight='bold') - ax.set_ylabel('Intensity', fontsize=font_size+2) - ax.set_title(f'Boxplot of Intensity of {title_name}', - fontsize=font_size+2, fontweight='bold') - if legend_col_num != 0: - # set legend for group, out of the box - plt.legend(bbox_to_anchor=(1.02, 1), loc='upper left', borderaxespad=0., - fontsize=font_size+2, ncol= (len(unique_groups)//30 + 1 ) if legend_col_num is None else legend_col_num) - + # Set legend for groups outside the plot + plt.legend(bbox_to_anchor=(1.02, 1), loc='upper left', borderaxespad=0., + fontsize=font_size + 2, ncol=(len(unique_groups) // 30 + 1) if legend_col_num is None else legend_col_num) else: - #hide the legend - ax.legend([],[], frameon=False) - - # set line if sub_meta is not None + # Hide legend + ax.legend([], [], frameon=False) + + # Add vertical lines to separate groups if sub_meta is not None if sub_meta not in ['None', None] and not plot_samples: for i, group in enumerate(df['Group'].unique()): if i != 0: ax.axvline(i - 0.5, linestyle='--', linewidth=1, color='grey', alpha=0.8) - - # set grid line for y axis is visible + + # Set grid line for y-axis ax.grid(True, axis='y') - # move the botton up + # Adjust layout plt.subplots_adjust(bottom=0.2) plt.tight_layout() plt.show() - # plt.close() return ax def plot_corr_sns( diff --git a/metax/utils/version.py b/metax/utils/version.py index 35786cc..7bdb37c 100644 --- a/metax/utils/version.py +++ b/metax/utils/version.py @@ -1,2 +1,2 @@ -__version__ = '1.119.3' +__version__ = '1.119.5' API_version = '4' \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5fdc7df..2f31c1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "MetaXTools" -version = "1.119.3" +version = "1.119.5" description = "MetaXTools is a novel tool for linking peptide sequences with taxonomic and functional information in Metaproteomics." readme = "README_PyPi.md" license = { text = "NorthOmics" } @@ -42,7 +42,7 @@ dependencies = [ "statsmodels", "seaborn>=0.13.2", "numba>=0.60.0", - "UpSetPlot>=0.9.0 + "UpSetPlot>=0.9.0" ] [project.scripts]