From 257e93bad4f427e7e1da1f51433864909024d2f7 Mon Sep 17 00:00:00 2001 From: Qing <44231502+byemaxx@users.noreply.github.com> Date: Wed, 31 Jul 2024 11:21:16 -0400 Subject: [PATCH 1/7] - New: Added a checkbox to enable user to plot 2D or 3D bar plot for the baisc plot part with sub meta. --- Docs/ChangeLog.md | 6 + metax/gui/main_gui.py | 6 +- metax/gui/metax_gui/main_window.ui | 677 +++++++++++++------------- metax/gui/metax_gui/ui_main_window.py | 524 ++++++++++---------- metax/taxafunc_ploter/bar_plot_js.py | 11 +- metax/utils/version.py | 2 +- 6 files changed, 627 insertions(+), 599 deletions(-) diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index 4d804d4..e1649b5 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,9 @@ +# Version: 1.109.6 +## Date: 2024-07-31 +### Changes: +- New: Added a checkbox to enable user to plot 2D or 3D bar plot for the baisc plot part with sub meta. + + # Version: 1.109.5 ## Date: 2024-07-25 ### Changes: diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index f575fa9..e3b1d83 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -760,8 +760,11 @@ def change_event_comboBox_3dbar_sub_meta(self): # when the sub_meta comboBox is not None, the mean plot is not available if self.comboBox_3dbar_sub_meta.currentText() != 'None': self.checkBox_basic_heatmap_plot_mean.setEnabled(False) + self.checkBox_basic_bar_3d_for_sub_meta.setEnabled(True) + else: self.checkBox_basic_heatmap_plot_mean.setEnabled(True) + self.checkBox_basic_bar_3d_for_sub_meta.setEnabled(False) # if self.checkBox_basic_heatmap_plot_mean.isChecked(): # self.comboBox_3dbar_sub_meta.setEnabled(False) @@ -3521,6 +3524,7 @@ def plot_basic_list(self, plot_type='heatmap'): show_legend = self.checkBox_basic_bar_show_legend.isChecked() plot_percent = self.checkBox_basic_bar_plot_percent.isChecked() sub_meta = self.comboBox_3dbar_sub_meta.currentText() + use_3d_for_sub_meta = self.checkBox_basic_bar_3d_for_sub_meta.isChecked() width = width*100 height = height*100 @@ -3537,7 +3541,7 @@ def plot_basic_list(self, plot_type='heatmap'): show_legend=show_legend, font_size=font_size, rename_sample=rename_sample, plot_mean = plot_mean, plot_percent = plot_percent, sub_meta = sub_meta, - show_all_labels = show_all_labels) + show_all_labels = show_all_labels, use_3d = use_3d_for_sub_meta) self.save_and_show_js_plot(pic, title) diff --git a/metax/gui/metax_gui/main_window.ui b/metax/gui/metax_gui/main_window.ui index adae270..6ebd1ba 100644 --- a/metax/gui/metax_gui/main_window.ui +++ b/metax/gui/metax_gui/main_window.ui @@ -46,7 +46,7 @@ Qt::LeftToRight - 6 + 3 false @@ -246,7 +246,7 @@ 0 0 528 - 482 + 486 @@ -1332,7 +1332,7 @@ QTabWidget::Triangular - 0 + 1 @@ -1405,31 +1405,21 @@ - - - - - 75 - true - - - - general - - - - - + + - + - + 0 0 + + + - Width + Font Size Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1437,31 +1427,32 @@ - - - - 0 - 0 - - + 1 + + 999 + 10 + + + + - + - + 0 0 - Height + Beta Diversity Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1469,64 +1460,184 @@ - - - - 0 - 0 - - - - 1 - - - 8 + + + true + + + braycurtis + + + + + jaccard + + + + + euclidean + + + + + manhattan + + + + + canberra + + + + + chebyshev + + + + + dice + + + + + hamming + + + + + yule + + - - + + - + - + 0 0 - - The number of columns in the legend, set 0 to hide - - Legend Cols - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Alpha Diversity - - - 0 + + + Plot Samples - - 1 + + + + + + true + + + shannon + + + + + simpson + + + + + ace + + + + + observed_otus + + + + + chao1 + + + + + fisher_alpha + + + + + dominance + + + + + menhinick + + + + + + + + + 0 + 0 + + + + false + + + + + + Plot Samples + + + + + + + + 75 + true + + + + general + + + + + + + Qt::Horizontal + + + + + - + - + 0 0 + + Transparency of labes + - Theme + Transparency Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1534,29 +1645,34 @@ - - + + false - - - - - - - - - + 0 0 + + 1.000000000000000 + + + 0.050000000000000 + + + 0.600000000000000 + + + + + - + Dots size for PCA and Beta Diversity - Font Size + Dot Size Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1564,16 +1680,44 @@ - + 1 - 999 + 1000 - + 10 + + 150 + + + + + + + + + + + Show All Labels + + + + + + + X + + + + + + + Y + @@ -1626,64 +1770,31 @@ - - - - Qt::Horizontal - - - - - - - - 75 - true - + + + + + 0 + 0 + - Scatter Plot + show Fliers - - - - - - false - - - - 0 - 0 - - - - Adjust label text to reduce overlap - - - Adjust Labels - - - - - - - + + - + - + 0 0 - - Transparency of labes - - Transparency + Width Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1691,34 +1802,31 @@ - - - false - + 0 0 - - 1.000000000000000 - - - 0.050000000000000 + + 1 - 0.600000000000000 + 10 - - - Dots size for PCA and Beta Diversity + + + + 0 + 0 + - Dot Size + Height Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1726,23 +1834,36 @@ - + + + + 0 + 0 + + 1 - - 1000 - - - 10 - - 150 + 8 + + + + + 0 + 0 + + + + Plot Samples + + + @@ -1768,26 +1889,39 @@ - - + + - + - + 0 0 + + The number of columns in the legend, set 0 to hide + - Cluster + Legend Cols - - true + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + 0 + + + 1 + + + + + 0 @@ -1797,33 +1931,38 @@ Theme + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + - + + + false + + - - + + - - - Show All Labels + + + false - - - - - - X + + + 0 + 0 + + + + Adjust label text to reduce overlap - - - - - Y + Adjust Labels @@ -1848,22 +1987,16 @@ - - - - - 0 - 0 - - - - false - - - + + + + + 75 + true + - Plot Samples + Sunburst @@ -1880,32 +2013,6 @@ - - - - - 0 - 0 - - - - Plot Samples - - - - - - - - 0 - 0 - - - - show Fliers - - - @@ -1925,151 +2032,44 @@ - - + + - + - + 0 0 - Alpha Diversity - - - - - - - Plot Samples + Cluster - - - - - + true - - - shannon - - - - - simpson - - - - - ace - - - - - observed_otus - - - - - chao1 - - - - - fisher_alpha - - - - - dominance - - - - - menhinick - - - - - - - + - + 0 0 - Beta Diversity - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Theme - - - true - - - - braycurtis - - - - - jaccard - - - - - euclidean - - - - - manhattan - - - - - canberra - - - - - chebyshev - - - - - dice - - - - - hamming - - - - - yule - - - + - - + + 75 @@ -2077,7 +2077,7 @@ - Sunburst + Scatter Plot @@ -2670,8 +2670,8 @@ 0 - 0 - 629 + -64 + 999 150 @@ -3150,6 +3150,13 @@ + + + + 3D for Sub Meta + + + @@ -8999,7 +9006,7 @@ 0 0 1016 - 89 + 93 @@ -9993,7 +10000,7 @@ 0 0 1122 - 23 + 21 diff --git a/metax/gui/metax_gui/ui_main_window.py b/metax/gui/metax_gui/ui_main_window.py index 686f77f..2143eae 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, 528, 482)) + self.page_2.setGeometry(QtCore.QRect(0, 0, 528, 486)) self.page_2.setObjectName("page_2") self.gridLayout_27 = QtWidgets.QGridLayout(self.page_2) self.gridLayout_27.setObjectName("gridLayout_27") @@ -710,6 +710,86 @@ def setupUi(self, metaX_main): self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.gridLayout_34 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents) self.gridLayout_34.setObjectName("gridLayout_34") + self.horizontalLayout_33 = QtWidgets.QHBoxLayout() + self.horizontalLayout_33.setObjectName("horizontalLayout_33") + self.label_107 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_107.sizePolicy().hasHeightForWidth()) + self.label_107.setSizePolicy(sizePolicy) + self.label_107.setToolTip("") + self.label_107.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.label_107.setObjectName("label_107") + self.horizontalLayout_33.addWidget(self.label_107) + self.spinBox_basic_pca_label_font_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents) + self.spinBox_basic_pca_label_font_size.setMinimum(1) + self.spinBox_basic_pca_label_font_size.setMaximum(999) + self.spinBox_basic_pca_label_font_size.setProperty("value", 10) + self.spinBox_basic_pca_label_font_size.setObjectName("spinBox_basic_pca_label_font_size") + self.horizontalLayout_33.addWidget(self.spinBox_basic_pca_label_font_size) + self.gridLayout_34.addLayout(self.horizontalLayout_33, 1, 1, 1, 1) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.label_118 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_118.sizePolicy().hasHeightForWidth()) + self.label_118.setSizePolicy(sizePolicy) + self.label_118.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.label_118.setObjectName("label_118") + self.horizontalLayout_4.addWidget(self.label_118) + self.comboBox_beta_div_method = QtWidgets.QComboBox(self.scrollAreaWidgetContents) + self.comboBox_beta_div_method.setEnabled(True) + self.comboBox_beta_div_method.setObjectName("comboBox_beta_div_method") + self.comboBox_beta_div_method.addItem("") + self.comboBox_beta_div_method.addItem("") + self.comboBox_beta_div_method.addItem("") + self.comboBox_beta_div_method.addItem("") + self.comboBox_beta_div_method.addItem("") + self.comboBox_beta_div_method.addItem("") + self.comboBox_beta_div_method.addItem("") + self.comboBox_beta_div_method.addItem("") + self.comboBox_beta_div_method.addItem("") + self.horizontalLayout_4.addWidget(self.comboBox_beta_div_method) + self.gridLayout_34.addLayout(self.horizontalLayout_4, 7, 2, 1, 1) + self.horizontalLayout_10 = QtWidgets.QHBoxLayout() + self.horizontalLayout_10.setObjectName("horizontalLayout_10") + self.label_117 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_117.sizePolicy().hasHeightForWidth()) + self.label_117.setSizePolicy(sizePolicy) + self.label_117.setObjectName("label_117") + self.horizontalLayout_10.addWidget(self.label_117) + self.checkBox_alpha_div_plot_all_samples = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + self.checkBox_alpha_div_plot_all_samples.setObjectName("checkBox_alpha_div_plot_all_samples") + self.horizontalLayout_10.addWidget(self.checkBox_alpha_div_plot_all_samples) + self.comboBox_alpha_div_method = QtWidgets.QComboBox(self.scrollAreaWidgetContents) + self.comboBox_alpha_div_method.setEnabled(True) + self.comboBox_alpha_div_method.setObjectName("comboBox_alpha_div_method") + self.comboBox_alpha_div_method.addItem("") + self.comboBox_alpha_div_method.addItem("") + self.comboBox_alpha_div_method.addItem("") + self.comboBox_alpha_div_method.addItem("") + self.comboBox_alpha_div_method.addItem("") + self.comboBox_alpha_div_method.addItem("") + self.comboBox_alpha_div_method.addItem("") + self.comboBox_alpha_div_method.addItem("") + self.horizontalLayout_10.addWidget(self.comboBox_alpha_div_method) + self.gridLayout_34.addLayout(self.horizontalLayout_10, 7, 1, 1, 1) + self.checkBox_basic_plot_number_plot_sample = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_basic_plot_number_plot_sample.sizePolicy().hasHeightForWidth()) + self.checkBox_basic_plot_number_plot_sample.setSizePolicy(sizePolicy) + self.checkBox_basic_plot_number_plot_sample.setAcceptDrops(False) + self.checkBox_basic_plot_number_plot_sample.setToolTip("") + self.checkBox_basic_plot_number_plot_sample.setObjectName("checkBox_basic_plot_number_plot_sample") + self.gridLayout_34.addWidget(self.checkBox_basic_plot_number_plot_sample, 5, 1, 1, 1) self.label_122 = QtWidgets.QLabel(self.scrollAreaWidgetContents) font = QtGui.QFont() font.setBold(True) @@ -717,6 +797,89 @@ 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.line_15 = QtWidgets.QFrame(self.scrollAreaWidgetContents) + self.line_15.setFrameShape(QtWidgets.QFrame.HLine) + self.line_15.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_15.setObjectName("line_15") + self.gridLayout_34.addWidget(self.line_15, 2, 1, 1, 2) + self.horizontalLayout_63 = QtWidgets.QHBoxLayout() + self.horizontalLayout_63.setObjectName("horizontalLayout_63") + self.label_116 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_116.sizePolicy().hasHeightForWidth()) + self.label_116.setSizePolicy(sizePolicy) + self.label_116.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.label_116.setObjectName("label_116") + self.horizontalLayout_63.addWidget(self.label_116) + self.doubleSpinBox_basic_pca_label_font_transparency = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents) + self.doubleSpinBox_basic_pca_label_font_transparency.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.doubleSpinBox_basic_pca_label_font_transparency.sizePolicy().hasHeightForWidth()) + self.doubleSpinBox_basic_pca_label_font_transparency.setSizePolicy(sizePolicy) + self.doubleSpinBox_basic_pca_label_font_transparency.setMaximum(1.0) + self.doubleSpinBox_basic_pca_label_font_transparency.setSingleStep(0.05) + self.doubleSpinBox_basic_pca_label_font_transparency.setProperty("value", 0.6) + self.doubleSpinBox_basic_pca_label_font_transparency.setObjectName("doubleSpinBox_basic_pca_label_font_transparency") + self.horizontalLayout_63.addWidget(self.doubleSpinBox_basic_pca_label_font_transparency) + self.label_160 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + self.label_160.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.label_160.setObjectName("label_160") + self.horizontalLayout_63.addWidget(self.label_160) + self.spinBox_basic_dot_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents) + self.spinBox_basic_dot_size.setMinimum(1) + self.spinBox_basic_dot_size.setMaximum(1000) + self.spinBox_basic_dot_size.setSingleStep(10) + self.spinBox_basic_dot_size.setProperty("value", 150) + self.spinBox_basic_dot_size.setObjectName("spinBox_basic_dot_size") + self.horizontalLayout_63.addWidget(self.spinBox_basic_dot_size) + self.gridLayout_34.addLayout(self.horizontalLayout_63, 3, 2, 1, 1) + self.horizontalLayout_5 = QtWidgets.QHBoxLayout() + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.label_129 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + self.label_129.setObjectName("label_129") + self.horizontalLayout_5.addWidget(self.label_129) + self.checkBox_corr_show_all_labels_x = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + self.checkBox_corr_show_all_labels_x.setObjectName("checkBox_corr_show_all_labels_x") + self.horizontalLayout_5.addWidget(self.checkBox_corr_show_all_labels_x) + self.checkBox_corr_show_all_labels_y = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + self.checkBox_corr_show_all_labels_y.setObjectName("checkBox_corr_show_all_labels_y") + self.horizontalLayout_5.addWidget(self.checkBox_corr_show_all_labels_y) + self.gridLayout_34.addLayout(self.horizontalLayout_5, 4, 2, 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) + self.checkBox_pca_if_show_group_name_in_label.setEnabled(True) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_pca_if_show_group_name_in_label.sizePolicy().hasHeightForWidth()) + self.checkBox_pca_if_show_group_name_in_label.setSizePolicy(sizePolicy) + self.checkBox_pca_if_show_group_name_in_label.setStatusTip("") + self.checkBox_pca_if_show_group_name_in_label.setChecked(True) + self.checkBox_pca_if_show_group_name_in_label.setObjectName("checkBox_pca_if_show_group_name_in_label") + self.horizontalLayout_34.addWidget(self.checkBox_pca_if_show_group_name_in_label) + self.checkBox_pca_if_show_lable = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_pca_if_show_lable.sizePolicy().hasHeightForWidth()) + self.checkBox_pca_if_show_lable.setSizePolicy(sizePolicy) + self.checkBox_pca_if_show_lable.setLayoutDirection(QtCore.Qt.LeftToRight) + self.checkBox_pca_if_show_lable.setObjectName("checkBox_pca_if_show_lable") + self.horizontalLayout_34.addWidget(self.checkBox_pca_if_show_lable) + self.gridLayout_34.addLayout(self.horizontalLayout_34, 1, 2, 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.horizontalLayout_32 = QtWidgets.QHBoxLayout() self.horizontalLayout_32.setObjectName("horizontalLayout_32") self.label_94 = QtWidgets.QLabel(self.scrollAreaWidgetContents) @@ -758,6 +921,27 @@ def setupUi(self, metaX_main): self.spinBox_basic_pca_height.setObjectName("spinBox_basic_pca_height") self.horizontalLayout_32.addWidget(self.spinBox_basic_pca_height) self.gridLayout_34.addLayout(self.horizontalLayout_32, 0, 1, 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.label_168 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_168.sizePolicy().hasHeightForWidth()) + self.label_168.setSizePolicy(sizePolicy) + self.label_168.setMinimumSize(QtCore.QSize(150, 0)) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_168.setFont(font) + self.label_168.setObjectName("label_168") + self.gridLayout_34.addWidget(self.label_168, 4, 0, 1, 1) self.horizontalLayout_25 = QtWidgets.QHBoxLayout() self.horizontalLayout_25.setObjectName("horizontalLayout_25") self.label_159 = QtWidgets.QLabel(self.scrollAreaWidgetContents) @@ -788,60 +972,6 @@ def setupUi(self, metaX_main): self.comboBox_basic_theme.setObjectName("comboBox_basic_theme") self.horizontalLayout_25.addWidget(self.comboBox_basic_theme) self.gridLayout_34.addLayout(self.horizontalLayout_25, 0, 2, 1, 1) - self.horizontalLayout_33 = QtWidgets.QHBoxLayout() - self.horizontalLayout_33.setObjectName("horizontalLayout_33") - self.label_107 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_107.sizePolicy().hasHeightForWidth()) - self.label_107.setSizePolicy(sizePolicy) - self.label_107.setToolTip("") - self.label_107.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) - self.label_107.setObjectName("label_107") - self.horizontalLayout_33.addWidget(self.label_107) - self.spinBox_basic_pca_label_font_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents) - self.spinBox_basic_pca_label_font_size.setMinimum(1) - self.spinBox_basic_pca_label_font_size.setMaximum(999) - self.spinBox_basic_pca_label_font_size.setProperty("value", 10) - self.spinBox_basic_pca_label_font_size.setObjectName("spinBox_basic_pca_label_font_size") - self.horizontalLayout_33.addWidget(self.spinBox_basic_pca_label_font_size) - self.gridLayout_34.addLayout(self.horizontalLayout_33, 1, 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) - self.checkBox_pca_if_show_group_name_in_label.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_pca_if_show_group_name_in_label.sizePolicy().hasHeightForWidth()) - self.checkBox_pca_if_show_group_name_in_label.setSizePolicy(sizePolicy) - self.checkBox_pca_if_show_group_name_in_label.setStatusTip("") - self.checkBox_pca_if_show_group_name_in_label.setChecked(True) - self.checkBox_pca_if_show_group_name_in_label.setObjectName("checkBox_pca_if_show_group_name_in_label") - self.horizontalLayout_34.addWidget(self.checkBox_pca_if_show_group_name_in_label) - self.checkBox_pca_if_show_lable = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_pca_if_show_lable.sizePolicy().hasHeightForWidth()) - self.checkBox_pca_if_show_lable.setSizePolicy(sizePolicy) - self.checkBox_pca_if_show_lable.setLayoutDirection(QtCore.Qt.LeftToRight) - self.checkBox_pca_if_show_lable.setObjectName("checkBox_pca_if_show_lable") - self.horizontalLayout_34.addWidget(self.checkBox_pca_if_show_lable) - self.gridLayout_34.addLayout(self.horizontalLayout_34, 1, 2, 1, 1) - self.line_15 = QtWidgets.QFrame(self.scrollAreaWidgetContents) - self.line_15.setFrameShape(QtWidgets.QFrame.HLine) - self.line_15.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_15.setObjectName("line_15") - self.gridLayout_34.addWidget(self.line_15, 2, 1, 1, 2) - self.label_179 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_179.setFont(font) - self.label_179.setObjectName("label_179") - self.gridLayout_34.addWidget(self.label_179, 3, 0, 1, 1) self.horizontalLayout_79 = QtWidgets.QHBoxLayout() self.horizontalLayout_79.setObjectName("horizontalLayout_79") self.checkBox_pca_if_adjust_pca_label = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) @@ -854,89 +984,6 @@ def setupUi(self, metaX_main): self.checkBox_pca_if_adjust_pca_label.setObjectName("checkBox_pca_if_adjust_pca_label") self.horizontalLayout_79.addWidget(self.checkBox_pca_if_adjust_pca_label) self.gridLayout_34.addLayout(self.horizontalLayout_79, 3, 1, 1, 1) - self.horizontalLayout_63 = QtWidgets.QHBoxLayout() - self.horizontalLayout_63.setObjectName("horizontalLayout_63") - self.label_116 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_116.sizePolicy().hasHeightForWidth()) - self.label_116.setSizePolicy(sizePolicy) - self.label_116.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) - self.label_116.setObjectName("label_116") - self.horizontalLayout_63.addWidget(self.label_116) - self.doubleSpinBox_basic_pca_label_font_transparency = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents) - self.doubleSpinBox_basic_pca_label_font_transparency.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.doubleSpinBox_basic_pca_label_font_transparency.sizePolicy().hasHeightForWidth()) - self.doubleSpinBox_basic_pca_label_font_transparency.setSizePolicy(sizePolicy) - self.doubleSpinBox_basic_pca_label_font_transparency.setMaximum(1.0) - self.doubleSpinBox_basic_pca_label_font_transparency.setSingleStep(0.05) - self.doubleSpinBox_basic_pca_label_font_transparency.setProperty("value", 0.6) - self.doubleSpinBox_basic_pca_label_font_transparency.setObjectName("doubleSpinBox_basic_pca_label_font_transparency") - self.horizontalLayout_63.addWidget(self.doubleSpinBox_basic_pca_label_font_transparency) - self.label_160 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - self.label_160.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) - self.label_160.setObjectName("label_160") - self.horizontalLayout_63.addWidget(self.label_160) - self.spinBox_basic_dot_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents) - self.spinBox_basic_dot_size.setMinimum(1) - self.spinBox_basic_dot_size.setMaximum(1000) - self.spinBox_basic_dot_size.setSingleStep(10) - self.spinBox_basic_dot_size.setProperty("value", 150) - self.spinBox_basic_dot_size.setObjectName("spinBox_basic_dot_size") - self.horizontalLayout_63.addWidget(self.spinBox_basic_dot_size) - self.gridLayout_34.addLayout(self.horizontalLayout_63, 3, 2, 1, 1) - self.label_168 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_168.sizePolicy().hasHeightForWidth()) - self.label_168.setSizePolicy(sizePolicy) - self.label_168.setMinimumSize(QtCore.QSize(150, 0)) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_168.setFont(font) - self.label_168.setObjectName("label_168") - self.gridLayout_34.addWidget(self.label_168, 4, 0, 1, 1) - self.horizontalLayout_3 = QtWidgets.QHBoxLayout() - self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.checkBox_corr_cluster = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_corr_cluster.sizePolicy().hasHeightForWidth()) - self.checkBox_corr_cluster.setSizePolicy(sizePolicy) - self.checkBox_corr_cluster.setChecked(True) - self.checkBox_corr_cluster.setObjectName("checkBox_corr_cluster") - self.horizontalLayout_3.addWidget(self.checkBox_corr_cluster) - self.label_192 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_192.sizePolicy().hasHeightForWidth()) - self.label_192.setSizePolicy(sizePolicy) - self.label_192.setObjectName("label_192") - self.horizontalLayout_3.addWidget(self.label_192) - self.comboBox_basic_corr_cmap = QtWidgets.QComboBox(self.scrollAreaWidgetContents) - self.comboBox_basic_corr_cmap.setObjectName("comboBox_basic_corr_cmap") - self.horizontalLayout_3.addWidget(self.comboBox_basic_corr_cmap) - self.gridLayout_34.addLayout(self.horizontalLayout_3, 4, 1, 1, 1) - self.horizontalLayout_5 = QtWidgets.QHBoxLayout() - self.horizontalLayout_5.setObjectName("horizontalLayout_5") - self.label_129 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - self.label_129.setObjectName("label_129") - self.horizontalLayout_5.addWidget(self.label_129) - self.checkBox_corr_show_all_labels_x = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) - self.checkBox_corr_show_all_labels_x.setObjectName("checkBox_corr_show_all_labels_x") - self.horizontalLayout_5.addWidget(self.checkBox_corr_show_all_labels_x) - self.checkBox_corr_show_all_labels_y = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) - self.checkBox_corr_show_all_labels_y.setObjectName("checkBox_corr_show_all_labels_y") - self.horizontalLayout_5.addWidget(self.checkBox_corr_show_all_labels_y) - self.gridLayout_34.addLayout(self.horizontalLayout_5, 4, 2, 1, 1) self.label_155 = QtWidgets.QLabel(self.scrollAreaWidgetContents) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) @@ -949,16 +996,13 @@ def setupUi(self, metaX_main): self.label_155.setFont(font) self.label_155.setObjectName("label_155") self.gridLayout_34.addWidget(self.label_155, 5, 0, 1, 1) - self.checkBox_basic_plot_number_plot_sample = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_basic_plot_number_plot_sample.sizePolicy().hasHeightForWidth()) - self.checkBox_basic_plot_number_plot_sample.setSizePolicy(sizePolicy) - self.checkBox_basic_plot_number_plot_sample.setAcceptDrops(False) - self.checkBox_basic_plot_number_plot_sample.setToolTip("") - self.checkBox_basic_plot_number_plot_sample.setObjectName("checkBox_basic_plot_number_plot_sample") - self.gridLayout_34.addWidget(self.checkBox_basic_plot_number_plot_sample, 5, 1, 1, 1) + self.label_137 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_137.setFont(font) + self.label_137.setObjectName("label_137") + self.gridLayout_34.addWidget(self.label_137, 8, 0, 1, 1) self.label_169 = QtWidgets.QLabel(self.scrollAreaWidgetContents) font = QtGui.QFont() font.setBold(True) @@ -966,22 +1010,6 @@ def setupUi(self, metaX_main): self.label_169.setFont(font) self.label_169.setObjectName("label_169") self.gridLayout_34.addWidget(self.label_169, 6, 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.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_167 = QtWidgets.QLabel(self.scrollAreaWidgetContents) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) @@ -994,64 +1022,36 @@ def setupUi(self, metaX_main): self.label_167.setFont(font) self.label_167.setObjectName("label_167") self.gridLayout_34.addWidget(self.label_167, 7, 0, 1, 1) - self.horizontalLayout_10 = QtWidgets.QHBoxLayout() - self.horizontalLayout_10.setObjectName("horizontalLayout_10") - self.label_117 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Maximum) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.checkBox_corr_cluster = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_117.sizePolicy().hasHeightForWidth()) - self.label_117.setSizePolicy(sizePolicy) - self.label_117.setObjectName("label_117") - self.horizontalLayout_10.addWidget(self.label_117) - self.checkBox_alpha_div_plot_all_samples = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) - self.checkBox_alpha_div_plot_all_samples.setObjectName("checkBox_alpha_div_plot_all_samples") - self.horizontalLayout_10.addWidget(self.checkBox_alpha_div_plot_all_samples) - self.comboBox_alpha_div_method = QtWidgets.QComboBox(self.scrollAreaWidgetContents) - self.comboBox_alpha_div_method.setEnabled(True) - self.comboBox_alpha_div_method.setObjectName("comboBox_alpha_div_method") - self.comboBox_alpha_div_method.addItem("") - self.comboBox_alpha_div_method.addItem("") - self.comboBox_alpha_div_method.addItem("") - self.comboBox_alpha_div_method.addItem("") - self.comboBox_alpha_div_method.addItem("") - self.comboBox_alpha_div_method.addItem("") - self.comboBox_alpha_div_method.addItem("") - self.comboBox_alpha_div_method.addItem("") - self.horizontalLayout_10.addWidget(self.comboBox_alpha_div_method) - self.gridLayout_34.addLayout(self.horizontalLayout_10, 7, 1, 1, 1) - self.horizontalLayout_4 = QtWidgets.QHBoxLayout() - self.horizontalLayout_4.setObjectName("horizontalLayout_4") - self.label_118 = QtWidgets.QLabel(self.scrollAreaWidgetContents) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.checkBox_corr_cluster.sizePolicy().hasHeightForWidth()) + self.checkBox_corr_cluster.setSizePolicy(sizePolicy) + self.checkBox_corr_cluster.setChecked(True) + self.checkBox_corr_cluster.setObjectName("checkBox_corr_cluster") + self.horizontalLayout_3.addWidget(self.checkBox_corr_cluster) + self.label_192 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_118.sizePolicy().hasHeightForWidth()) - self.label_118.setSizePolicy(sizePolicy) - self.label_118.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) - self.label_118.setObjectName("label_118") - self.horizontalLayout_4.addWidget(self.label_118) - self.comboBox_beta_div_method = QtWidgets.QComboBox(self.scrollAreaWidgetContents) - self.comboBox_beta_div_method.setEnabled(True) - self.comboBox_beta_div_method.setObjectName("comboBox_beta_div_method") - self.comboBox_beta_div_method.addItem("") - self.comboBox_beta_div_method.addItem("") - self.comboBox_beta_div_method.addItem("") - self.comboBox_beta_div_method.addItem("") - self.comboBox_beta_div_method.addItem("") - self.comboBox_beta_div_method.addItem("") - self.comboBox_beta_div_method.addItem("") - self.comboBox_beta_div_method.addItem("") - self.comboBox_beta_div_method.addItem("") - self.horizontalLayout_4.addWidget(self.comboBox_beta_div_method) - self.gridLayout_34.addLayout(self.horizontalLayout_4, 7, 2, 1, 1) - self.label_137 = QtWidgets.QLabel(self.scrollAreaWidgetContents) + sizePolicy.setHeightForWidth(self.label_192.sizePolicy().hasHeightForWidth()) + self.label_192.setSizePolicy(sizePolicy) + self.label_192.setObjectName("label_192") + self.horizontalLayout_3.addWidget(self.label_192) + self.comboBox_basic_corr_cmap = QtWidgets.QComboBox(self.scrollAreaWidgetContents) + self.comboBox_basic_corr_cmap.setObjectName("comboBox_basic_corr_cmap") + self.horizontalLayout_3.addWidget(self.comboBox_basic_corr_cmap) + self.gridLayout_34.addLayout(self.horizontalLayout_3, 4, 1, 1, 1) + self.label_179 = QtWidgets.QLabel(self.scrollAreaWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) - self.label_137.setFont(font) - self.label_137.setObjectName("label_137") - self.gridLayout_34.addWidget(self.label_137, 8, 0, 1, 1) + self.label_179.setFont(font) + self.label_179.setObjectName("label_179") + self.gridLayout_34.addWidget(self.label_179, 3, 0, 1, 1) self.horizontalLayout_20 = QtWidgets.QHBoxLayout() self.horizontalLayout_20.setObjectName("horizontalLayout_20") self.checkBox_sunburst_show_all_lables = QtWidgets.QCheckBox(self.scrollAreaWidgetContents) @@ -1370,7 +1370,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, 629, 150)) + self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, -64, 999, 150)) self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2") self.gridLayout_50 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_2) self.gridLayout_50.setObjectName("gridLayout_50") @@ -1638,6 +1638,9 @@ def setupUi(self, metaX_main): self.spinBox_basic_heatmap_label_font_size.setObjectName("spinBox_basic_heatmap_label_font_size") self.horizontalLayout_91.addWidget(self.spinBox_basic_heatmap_label_font_size) self.gridLayout_70.addLayout(self.horizontalLayout_91, 0, 2, 1, 1) + self.checkBox_basic_bar_3d_for_sub_meta = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_2) + self.checkBox_basic_bar_3d_for_sub_meta.setObjectName("checkBox_basic_bar_3d_for_sub_meta") + self.gridLayout_70.addWidget(self.checkBox_basic_bar_3d_for_sub_meta, 4, 3, 1, 1) self.gridLayout_50.addLayout(self.gridLayout_70, 0, 0, 1, 1) self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2) self.gridLayout_41.addWidget(self.scrollArea_2, 0, 0, 1, 1) @@ -4720,7 +4723,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, 1016, 89)) + self.scrollAreaWidgetContents_8.setGeometry(QtCore.QRect(0, 0, 1016, 93)) self.scrollAreaWidgetContents_8.setObjectName("scrollAreaWidgetContents_8") self.gridLayout_66 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_8) self.gridLayout_66.setObjectName("gridLayout_66") @@ -5231,7 +5234,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, 1122, 23)) + self.menuBar.setGeometry(QtCore.QRect(0, 0, 1122, 21)) self.menuBar.setObjectName("menuBar") self.menuTools = QtWidgets.QMenu(self.menuBar) self.menuTools.setObjectName("menuTools") @@ -5291,9 +5294,9 @@ def setupUi(self, metaX_main): self.retranslateUi(metaX_main) self.stackedWidget.setCurrentIndex(0) - self.tabWidget_TaxaFuncAnalyzer.setCurrentIndex(6) + self.tabWidget_TaxaFuncAnalyzer.setCurrentIndex(3) self.toolBox_2.setCurrentIndex(0) - self.tabWidget_4.setCurrentIndex(0) + self.tabWidget_4.setCurrentIndex(1) self.tabWidget_3.setCurrentIndex(1) self.tabWidget.setCurrentIndex(1) self.tabWidget_2.setCurrentIndex(1) @@ -5470,46 +5473,7 @@ def retranslateUi(self, metaX_main): self.tabWidget_TaxaFuncAnalyzer.setTabText(self.tabWidget_TaxaFuncAnalyzer.indexOf(self.tab_set_taxa_func), _translate("metaX_main", "Set TaxaFunc")) self.checkBox_show_basic_plot_settings.setText(_translate("metaX_main", "Show Plotting Parameter")) self.groupBox_basic_plot.setTitle(_translate("metaX_main", "Plotting Parameter")) - self.label_122.setText(_translate("metaX_main", "general")) - self.label_94.setText(_translate("metaX_main", "Width")) - self.label_101.setText(_translate("metaX_main", "Height")) - self.label_159.setToolTip(_translate("metaX_main", "The number of columns in the legend, set 0 to hide")) - self.label_159.setText(_translate("metaX_main", "Legend Cols")) - self.label_151.setText(_translate("metaX_main", "Theme")) self.label_107.setText(_translate("metaX_main", "Font Size")) - 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")) - self.checkBox_pca_if_show_lable.setText(_translate("metaX_main", "Show Labels")) - self.label_179.setText(_translate("metaX_main", "Scatter Plot")) - self.checkBox_pca_if_adjust_pca_label.setToolTip(_translate("metaX_main", "Adjust label text to reduce overlap")) - self.checkBox_pca_if_adjust_pca_label.setText(_translate("metaX_main", "Adjust Labels")) - self.label_116.setToolTip(_translate("metaX_main", "Transparency of labes")) - self.label_116.setText(_translate("metaX_main", "Transparency")) - self.label_160.setToolTip(_translate("metaX_main", "Dots size for PCA and Beta Diversity")) - self.label_160.setText(_translate("metaX_main", "Dot Size")) - self.label_168.setText(_translate("metaX_main", "Correlation Heatmap")) - self.checkBox_corr_cluster.setText(_translate("metaX_main", "Cluster")) - self.label_192.setText(_translate("metaX_main", "Theme")) - self.label_129.setText(_translate("metaX_main", "Show All Labels")) - self.checkBox_corr_show_all_labels_x.setText(_translate("metaX_main", "X")) - self.checkBox_corr_show_all_labels_y.setText(_translate("metaX_main", "Y")) - self.label_155.setText(_translate("metaX_main", "Bar Plot")) - self.checkBox_basic_plot_number_plot_sample.setText(_translate("metaX_main", "Plot Samples")) - self.label_169.setText(_translate("metaX_main", "Box Plot")) - self.checkBox_box_plot_samples.setText(_translate("metaX_main", "Plot Samples")) - self.checkBox_box_if_show_fliers.setText(_translate("metaX_main", "show Fliers")) - self.label_167.setText(_translate("metaX_main", "Diversity")) - self.label_117.setText(_translate("metaX_main", "Alpha Diversity")) - self.checkBox_alpha_div_plot_all_samples.setText(_translate("metaX_main", "Plot Samples")) - self.comboBox_alpha_div_method.setItemText(0, _translate("metaX_main", "shannon")) - self.comboBox_alpha_div_method.setItemText(1, _translate("metaX_main", "simpson")) - self.comboBox_alpha_div_method.setItemText(2, _translate("metaX_main", "ace")) - self.comboBox_alpha_div_method.setItemText(3, _translate("metaX_main", "observed_otus")) - self.comboBox_alpha_div_method.setItemText(4, _translate("metaX_main", "chao1")) - self.comboBox_alpha_div_method.setItemText(5, _translate("metaX_main", "fisher_alpha")) - self.comboBox_alpha_div_method.setItemText(6, _translate("metaX_main", "dominance")) - self.comboBox_alpha_div_method.setItemText(7, _translate("metaX_main", "menhinick")) self.label_118.setText(_translate("metaX_main", "Beta Diversity")) self.comboBox_beta_div_method.setItemText(0, _translate("metaX_main", "braycurtis")) self.comboBox_beta_div_method.setItemText(1, _translate("metaX_main", "jaccard")) @@ -5520,7 +5484,46 @@ def retranslateUi(self, metaX_main): self.comboBox_beta_div_method.setItemText(6, _translate("metaX_main", "dice")) self.comboBox_beta_div_method.setItemText(7, _translate("metaX_main", "hamming")) self.comboBox_beta_div_method.setItemText(8, _translate("metaX_main", "yule")) + self.label_117.setText(_translate("metaX_main", "Alpha Diversity")) + self.checkBox_alpha_div_plot_all_samples.setText(_translate("metaX_main", "Plot Samples")) + self.comboBox_alpha_div_method.setItemText(0, _translate("metaX_main", "shannon")) + self.comboBox_alpha_div_method.setItemText(1, _translate("metaX_main", "simpson")) + self.comboBox_alpha_div_method.setItemText(2, _translate("metaX_main", "ace")) + self.comboBox_alpha_div_method.setItemText(3, _translate("metaX_main", "observed_otus")) + self.comboBox_alpha_div_method.setItemText(4, _translate("metaX_main", "chao1")) + self.comboBox_alpha_div_method.setItemText(5, _translate("metaX_main", "fisher_alpha")) + self.comboBox_alpha_div_method.setItemText(6, _translate("metaX_main", "dominance")) + self.comboBox_alpha_div_method.setItemText(7, _translate("metaX_main", "menhinick")) + self.checkBox_basic_plot_number_plot_sample.setText(_translate("metaX_main", "Plot Samples")) + self.label_122.setText(_translate("metaX_main", "general")) + self.label_116.setToolTip(_translate("metaX_main", "Transparency of labes")) + self.label_116.setText(_translate("metaX_main", "Transparency")) + self.label_160.setToolTip(_translate("metaX_main", "Dots size for PCA and Beta Diversity")) + self.label_160.setText(_translate("metaX_main", "Dot Size")) + self.label_129.setText(_translate("metaX_main", "Show All Labels")) + self.checkBox_corr_show_all_labels_x.setText(_translate("metaX_main", "X")) + self.checkBox_corr_show_all_labels_y.setText(_translate("metaX_main", "Y")) + 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")) + self.checkBox_pca_if_show_lable.setText(_translate("metaX_main", "Show Labels")) + self.checkBox_box_if_show_fliers.setText(_translate("metaX_main", "show Fliers")) + self.label_94.setText(_translate("metaX_main", "Width")) + self.label_101.setText(_translate("metaX_main", "Height")) + self.checkBox_box_plot_samples.setText(_translate("metaX_main", "Plot Samples")) + self.label_168.setText(_translate("metaX_main", "Correlation Heatmap")) + self.label_159.setToolTip(_translate("metaX_main", "The number of columns in the legend, set 0 to hide")) + self.label_159.setText(_translate("metaX_main", "Legend Cols")) + self.label_151.setText(_translate("metaX_main", "Theme")) + self.checkBox_pca_if_adjust_pca_label.setToolTip(_translate("metaX_main", "Adjust label text to reduce overlap")) + self.checkBox_pca_if_adjust_pca_label.setText(_translate("metaX_main", "Adjust Labels")) + self.label_155.setText(_translate("metaX_main", "Bar Plot")) self.label_137.setText(_translate("metaX_main", "Sunburst")) + self.label_169.setText(_translate("metaX_main", "Box Plot")) + self.label_167.setText(_translate("metaX_main", "Diversity")) + self.checkBox_corr_cluster.setText(_translate("metaX_main", "Cluster")) + self.label_192.setText(_translate("metaX_main", "Theme")) + self.label_179.setText(_translate("metaX_main", "Scatter Plot")) self.checkBox_sunburst_show_all_lables.setText(_translate("metaX_main", "Show All Lables for Sunburst")) self.checkBox_basic_in_condtion.setText(_translate("metaX_main", "In Condition")) self.radioButton_basic_pca_group.setText(_translate("metaX_main", "Groups")) @@ -5592,6 +5595,7 @@ def retranslateUi(self, metaX_main): self.checkBox_basic_hetatmap_rename_taxa.setToolTip(_translate("metaX_main", "Only show the last level of name")) self.checkBox_basic_hetatmap_rename_taxa.setText(_translate("metaX_main", "Taxa")) self.label_108.setText(_translate("metaX_main", "Label Font Size")) + self.checkBox_basic_bar_3d_for_sub_meta.setText(_translate("metaX_main", "3D for Sub Meta")) self.label_34.setText(_translate("metaX_main", "List for Plotting")) self.pushButton_basic_heatmap_add_top.setToolTip(_translate("metaX_main", "Add conditionally filtered items to the drawing box")) self.pushButton_basic_heatmap_add_top.setText(_translate("metaX_main", "Add Top to List")) diff --git a/metax/taxafunc_ploter/bar_plot_js.py b/metax/taxafunc_ploter/bar_plot_js.py index 29a0566..7c41c1b 100644 --- a/metax/taxafunc_ploter/bar_plot_js.py +++ b/metax/taxafunc_ploter/bar_plot_js.py @@ -49,7 +49,7 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None, show_legend:bool=True, font_size:int=10, rename_sample:bool=True, plot_mean:bool=False, plot_percent:bool=False, sub_meta:str="None", - show_all_labels:tuple = (False, False) + show_all_labels:tuple = (False, False), use_3d:bool=False ): if df is None: df = self.tfa.GetMatrix.get_intensity_matrix(taxon_name=taxon_name, func_name=func_name, peptide_seq=peptide_seq, sample_list= sample_list) @@ -64,6 +64,11 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None, rename_sample = False + if use_3d: + if sub_meta == "None": + use_3d = False + print('sub_meta must be provided for 3D bar plot, use 2D bar plot instead') + # rename taxa if rename_taxa: df = self.rename_taxa(df) @@ -157,7 +162,9 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None, } - if sub_meta == "None": + if not use_3d: + if sub_meta != "None": + df, _ = self.tfa.BasicStats.get_combined_sub_meta_df(df=df, sub_meta=sub_meta, rename_sample=rename_sample, plot_mean=plot_mean) colors = self.get_distinct_colors(col_num, convert=True) c = ( diff --git a/metax/utils/version.py b/metax/utils/version.py index 23c4656..857f153 100644 --- a/metax/utils/version.py +++ b/metax/utils/version.py @@ -1,2 +1,2 @@ -__version__ = '1.109.5' +__version__ = '1.109.6' API_version = '2' \ No newline at end of file From 3fbd8ef5e7ca0ce18eff53fba8ab5a7e6a10cf98 Mon Sep 17 00:00:00 2001 From: Qing <44231502+byemaxx@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:42:53 -0400 Subject: [PATCH 2/7] - Change: Optimized the Sankey plot. --- Docs/ChangeLog.md | 6 +++++ metax/taxafunc_ploter/sankey_plot.py | 37 +++++++++++++++++++++------- metax/utils/version.py | 2 +- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index e1649b5..6e8506d 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,9 @@ +# Version: 1.109.6 +## Date: 2024-07-31 +### Changes: +- Change: Optimized the Sankey plot. + + # Version: 1.109.6 ## Date: 2024-07-31 ### Changes: diff --git a/metax/taxafunc_ploter/sankey_plot.py b/metax/taxafunc_ploter/sankey_plot.py index 96143bb..e54f247 100644 --- a/metax/taxafunc_ploter/sankey_plot.py +++ b/metax/taxafunc_ploter/sankey_plot.py @@ -166,17 +166,15 @@ def df_to_sankey_df(self, df, value_col='value'): def create_nodes_links(self, df, value_col='value'): - lis = df.columns.tolist()[:-1] lis1 = lis[:-1] lis2 = lis[1:] df2 = pd.DataFrame() for i in zip(lis1, lis2): - dfi = df.pivot_table(value_col, index=list(i), - aggfunc='sum').reset_index() + dfi = df.pivot_table(value_col, index=list(i), aggfunc='sum').reset_index() dfi.columns = [0, 1, 2] - df2 = pd.concat([df2, dfi]) # Use pd.concat instead of append + df2 = pd.concat([df2, dfi]) nodes = [] ln = df2.iloc[:, 0].to_list() + df2.iloc[:, 1].to_list() @@ -191,6 +189,27 @@ def create_nodes_links(self, df, value_col='value'): dic = {'source': i[0], 'target': i[1], 'value': i[2]} links.append(dic) print(f'Number of links: {len(links)}') + + # Get 20 distinct colors + colors = GetDistinctColors().get_distinct_colors(20, convert=True) + + # Assign colors to nodes ensuring adjacent nodes do not have the same color + node_colors = {} + for idx, node in enumerate(nodes): + available_colors = colors[:] + for link in links: + if link['source'] == node['name'] and link['target'] in node_colors: + if node_colors[link['target']] in available_colors: + available_colors.remove(node_colors[link['target']]) + if link['target'] == node['name'] and link['source'] in node_colors: + if node_colors[link['source']] in available_colors: + available_colors.remove(node_colors[link['source']]) + if not available_colors: + available_colors = colors[:] + chosen_color = available_colors[idx % len(available_colors)] + node_colors[node['name']] = chosen_color + node['itemStyle'] = {'color': chosen_color} + return nodes, links @@ -202,7 +221,6 @@ def __plot_sankey(self,link_nodes_dict, width, height, title, subtitle=''): pic = Sankey(init_opts=opts.InitOpts(width=f"{width*100}px", height=f"{height*100}px", theme=self.theme)) - pic.set_colors(GetDistinctColors().get_distinct_colors(20, convert=True)) for key, value in link_nodes_dict.items(): nodes = value[0] @@ -212,15 +230,16 @@ def __plot_sankey(self,link_nodes_dict, width, height, title, subtitle=''): f'{key} ({num})', nodes=nodes, links=links, - node_align='left', + node_align='justify', layout_iterations=50, + node_width=25, emphasis_opts=opts.EmphasisOpts(focus='adjacency'), linestyle_opt=opts.LineStyleOpts( - curve=0.5, opacity=0.2, color="source"), - label_opts=opts.LabelOpts(position='right', font_size=self.font_size), + curve=0.5, opacity=0.3, color="gray"), + label_opts=opts.LabelOpts(position='right', font_size=self.font_size, color='whithe' if self.theme == 'dark' else 'black'), + itemstyle_opts=opts.ItemStyleOpts(border_width=1, border_color="black", opacity=0.7), ) - pic.set_global_opts( legend_opts=opts.LegendOpts(selected_mode='single', is_show=self.show_legend, type_="scroll",page_icon_size=8, diff --git a/metax/utils/version.py b/metax/utils/version.py index 857f153..0b190a9 100644 --- a/metax/utils/version.py +++ b/metax/utils/version.py @@ -1,2 +1,2 @@ -__version__ = '1.109.6' +__version__ = '1.109.7' API_version = '2' \ No newline at end of file From 2ac1064ef366f9e4cca9c9c9c44e21003fbf5db9 Mon Sep 17 00:00:00 2001 From: Qing <44231502+byemaxx@users.noreply.github.com> Date: Thu, 1 Aug 2024 12:00:18 -0400 Subject: [PATCH 3/7] Optimized the volcano plot --- Docs/ChangeLog.md | 5 + metax/gui/main_gui.py | 30 +- metax/gui/metax_gui/main_window.ui | 485 ++++++++++++----------- metax/gui/metax_gui/setting_window.ui | 14 +- metax/gui/metax_gui/ui_main_window.py | 340 ++++++++-------- metax/gui/metax_gui/ui_setting_window.py | 9 +- metax/taxafunc_ploter/volcano_plot.py | 94 +++-- metax/taxafunc_ploter/volcano_plot_js.py | 10 +- pyproject.toml | 2 +- 9 files changed, 534 insertions(+), 455 deletions(-) diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index 6e8506d..80233c6 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,8 @@ +# Version: 1.109.7 +## Date: 2024-07-31 +### Changes: +- Change: Optimized the volcano plot. + # Version: 1.109.6 ## Date: 2024-07-31 ### Changes: diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index e3b1d83..f84e114 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -65,7 +65,8 @@ from metax.utils.metax_updater import Updater from metax.taxafunc_ploter.heatmap_plot import HeatmapPlot from metax.taxafunc_ploter.basic_plot import BasicPlot - from metax.taxafunc_ploter.volcano_plot_js import VolcanoPlot + from metax.taxafunc_ploter.volcano_plot_js import VolcanoPlotJS + from metax.taxafunc_ploter.volcano_plot import VolcanoPlot from metax.taxafunc_ploter.tukey_plot import TukeyPlot from metax.taxafunc_ploter.bar_plot_js import BarPlot_js from metax.taxafunc_ploter.sankey_plot import SankeyPlot @@ -107,7 +108,8 @@ from ..utils.metax_updater import Updater from ..taxafunc_ploter.heatmap_plot import HeatmapPlot from ..taxafunc_ploter.basic_plot import BasicPlot - from ..taxafunc_ploter.volcano_plot_js import VolcanoPlot + from ..taxafunc_ploter.volcano_plot_js import VolcanoPlotJS + from ..taxafunc_ploter.volcano_plot import VolcanoPlot from ..taxafunc_ploter.tukey_plot import TukeyPlot from ..taxafunc_ploter.bar_plot_js import BarPlot_js from ..taxafunc_ploter.sankey_plot import SankeyPlot @@ -4915,7 +4917,9 @@ def plot_deseq2_volcano(self): group1 = self.comboBox_deseq2_group1.currentText() group2 = self.comboBox_deseq2_group2.currentText() title_name = f'{group1} vs {group2} of {table_name.split("(")[1].split(")")[0]}' - font_size = self.spinBox_seqeq2_font_size.value() + font_size = self.spinBox_deseq2_font_size.value() + dot_size = self.spinBox_deseq2_dot_size.value() + plot_js = self.checkBox_deseq2_js_volcano.isChecked() if log2fc_min > log2fc_max: QMessageBox.warning(self.MainWindow, 'Error', 'log2fc_min must be less than log2fc_max!') @@ -4929,12 +4933,18 @@ def plot_deseq2_volcano(self): # VolcanoPlot().plot_volcano(df, padj = pvalue, log2fc = log2fc, title_name='2 groups', width=width, height=height) try: df = self.table_dict[table_name] - pic = VolcanoPlot(theme=self.html_theme).plot_volcano_js(df, pvalue = pvalue, p_type = p_type, - log2fc_min = log2fc_min, log2fc_max=log2fc_max, - title_name=title_name, font_size = font_size, - width=width, height=height) - - self.save_and_show_js_plot(pic, f'volcano plot of {title_name.split(" (")[0]}') + if plot_js: + pic = VolcanoPlotJS(theme=self.html_theme).plot_volcano_js(df, pvalue = pvalue, p_type = p_type, + log2fc_min = log2fc_min, log2fc_max=log2fc_max, + title_name=title_name, font_size = font_size, + width=width, height=height, dot_size=dot_size) + + self.save_and_show_js_plot(pic, f'volcano plot of {title_name.split(" (")[0]}') + else: + pic = VolcanoPlot().plot_volcano(df, pvalue = pvalue, p_type = p_type, + log2fc_min = log2fc_min, log2fc_max=log2fc_max, + title_name=title_name, font_size = font_size, + width=width, height=height, dot_size=dot_size) except Exception as e: error_message = traceback.format_exc() @@ -5048,7 +5058,7 @@ def deseq2_plot_sankey(self): width = self.spinBox_fc_plot_width.value() height = self.spinBox_fc_plot_height.value() - font_size = self.spinBox_seqeq2_font_size.value() + font_size = self.spinBox_deseq2_font_size.value() if log2fc_min > log2fc_max: QMessageBox.warning(self.MainWindow, 'Error', 'log2fc_min must be less than log2fc_max!') diff --git a/metax/gui/metax_gui/main_window.ui b/metax/gui/metax_gui/main_window.ui index 6ebd1ba..324e91e 100644 --- a/metax/gui/metax_gui/main_window.ui +++ b/metax/gui/metax_gui/main_window.ui @@ -46,7 +46,7 @@ Qt::LeftToRight - 3 + 4 false @@ -1400,7 +1400,7 @@ 0 0 - 999 + 660 232 @@ -2670,7 +2670,7 @@ 0 - -64 + 0 999 150 @@ -3545,7 +3545,7 @@ QTabWidget::Triangular - 1 + 3 @@ -4074,10 +4074,16 @@ DESeq2 - - - - Qt::Horizontal + + + + + 0 + 0 + + + + Groups @@ -4109,25 +4115,31 @@ - - + + - + - + 0 0 + + Qt::RightToLeft + - Group 1 + In Condition - + + + false + - + 0 0 @@ -4135,20 +4147,41 @@ - + + + + + false + + + + 0 + 0 + + + + + + + + + + + + - + 0 0 - Group 2 + Group 1 - + 0 @@ -4157,82 +4190,29 @@ - - - - - - - 0 - 0 - - - - Table - - - - - - - - 0 - 0 - - - - Groups - - - - - - + - + 0 0 - - Qt::RightToLeft - - In Condition + Group 2 - - - false - + - + 0 0 - - - - - - false - - - - 0 - 0 - - - - - - @@ -4302,6 +4282,26 @@ + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + Table + + + @@ -4326,6 +4326,45 @@ Plot + + + + false + + + + 0 + 0 + + + + Plot Sankey + + + + + + + Show Plotting Parameter + + + + + + + false + + + + 0 + 0 + + + + Plot Volcano + + + @@ -4356,39 +4395,7 @@ - - - - false - - - - 0 - 0 - - - - Plot Volcano - - - - - - - false - - - - 0 - 0 - - - - Plot Sankey - - - - + @@ -4410,62 +4417,44 @@ 0 0 - 403 - 66 + 996 + 70 - - + + - + 0 0 - - Qt::LeftToRight - - Width - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 1 - - - 99 - - - 1 - - - 10 + Max Log2FC - - + + 0 0 - - Height - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + + + padj + + + + + pvalue + + @@ -4484,45 +4473,23 @@ - - - - - 0 - 0 - + + + + Font Size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - padj - - - - - pvalue - - - - - - - 0 - 0 - - + + 1 - - 99 - - - 1 - - 8 + 12 @@ -4535,25 +4502,15 @@ - Log2FC Range - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Font Size + Mini Log2FC Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 @@ -4561,41 +4518,41 @@ - 1 + 4 - + 1.000000000000000 + + 0.010000000000000 + + + 0.050000000000000 + - - + + 1 + + 999 + - 12 + 15 - - - - - 0 - 0 - - + + - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Dot Size - - + + 0 @@ -4606,12 +4563,12 @@ 1 - 20.000000000000000 + 1.000000000000000 - - + + 0 @@ -4619,16 +4576,97 @@ - 4 + 1 - - 1.000000000000000 + + 20.000000000000000 - - 0.010000000000000 + + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + Width + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 1 + + + 99 + + + 1 + + + 10 + + + + + + + + 0 + 0 + + + + Height + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + 1 + + + 99 + + + 1 + + + 8 + + + + + + + + + Interactive Volcano - - 0.050000000000000 + + true @@ -4641,13 +4679,6 @@ - - - - Show Plotting Parameter - - - diff --git a/metax/gui/metax_gui/setting_window.ui b/metax/gui/metax_gui/setting_window.ui index 5221958..931b586 100644 --- a/metax/gui/metax_gui/setting_window.ui +++ b/metax/gui/metax_gui/setting_window.ui @@ -17,7 +17,7 @@ - 2 + 0 @@ -159,7 +159,7 @@ 100000 - 10 + 50 500 @@ -316,7 +316,7 @@ 1.000000000000000 - 0.100000000000000 + 0.010000000000000 0.200000000000000 @@ -673,6 +673,14 @@ + + + 0 + 0 + 748 + 340 + + Others diff --git a/metax/gui/metax_gui/ui_main_window.py b/metax/gui/metax_gui/ui_main_window.py index 2143eae..e2fc9d6 100644 --- a/metax/gui/metax_gui/ui_main_window.py +++ b/metax/gui/metax_gui/ui_main_window.py @@ -706,7 +706,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, 999, 232)) + self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 660, 232)) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.gridLayout_34 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents) self.gridLayout_34.setObjectName("gridLayout_34") @@ -1370,7 +1370,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, -64, 999, 150)) + self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 999, 150)) self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2") self.gridLayout_50 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_2) self.gridLayout_50.setObjectName("gridLayout_50") @@ -2158,11 +2158,14 @@ def setupUi(self, metaX_main): self.tab_19.setObjectName("tab_19") self.gridLayout_16 = QtWidgets.QGridLayout(self.tab_19) self.gridLayout_16.setObjectName("gridLayout_16") - self.line = QtWidgets.QFrame(self.tab_19) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout_16.addWidget(self.line, 1, 0, 1, 3) + self.label_166 = QtWidgets.QLabel(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_166.sizePolicy().hasHeightForWidth()) + self.label_166.setSizePolicy(sizePolicy) + self.label_166.setObjectName("label_166") + self.gridLayout_16.addWidget(self.label_166, 3, 0, 1, 1) self.pushButton_deseq2 = QtWidgets.QPushButton(self.tab_19) self.pushButton_deseq2.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) @@ -2174,6 +2177,39 @@ def setupUi(self, metaX_main): self.pushButton_deseq2.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.pushButton_deseq2.setObjectName("pushButton_deseq2") self.gridLayout_16.addWidget(self.pushButton_deseq2, 5, 0, 1, 3) + self.horizontalLayout_40 = QtWidgets.QHBoxLayout() + self.horizontalLayout_40.setObjectName("horizontalLayout_40") + self.checkBox_deseq2_comparing_in_condition = QtWidgets.QCheckBox(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_deseq2_comparing_in_condition.sizePolicy().hasHeightForWidth()) + self.checkBox_deseq2_comparing_in_condition.setSizePolicy(sizePolicy) + self.checkBox_deseq2_comparing_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) + self.checkBox_deseq2_comparing_in_condition.setObjectName("checkBox_deseq2_comparing_in_condition") + self.horizontalLayout_40.addWidget(self.checkBox_deseq2_comparing_in_condition) + self.comboBox_deseq2_condition_meta = QtWidgets.QComboBox(self.tab_19) + self.comboBox_deseq2_condition_meta.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_condition_meta.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_condition_meta.setSizePolicy(sizePolicy) + self.comboBox_deseq2_condition_meta.setObjectName("comboBox_deseq2_condition_meta") + self.horizontalLayout_40.addWidget(self.comboBox_deseq2_condition_meta) + self.horizontalLayout_75 = QtWidgets.QHBoxLayout() + self.horizontalLayout_75.setObjectName("horizontalLayout_75") + self.comboBox_deseq2_condition_group = QtWidgets.QComboBox(self.tab_19) + self.comboBox_deseq2_condition_group.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_condition_group.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_condition_group.setSizePolicy(sizePolicy) + self.comboBox_deseq2_condition_group.setObjectName("comboBox_deseq2_condition_group") + self.horizontalLayout_75.addWidget(self.comboBox_deseq2_condition_group) + self.horizontalLayout_40.addLayout(self.horizontalLayout_75) + self.gridLayout_16.addLayout(self.horizontalLayout_40, 0, 2, 1, 1) self.horizontalLayout_22 = QtWidgets.QHBoxLayout() self.horizontalLayout_22.setObjectName("horizontalLayout_22") self.label_2 = QtWidgets.QLabel(self.tab_19) @@ -2209,55 +2245,6 @@ def setupUi(self, metaX_main): self.comboBox_deseq2_group2.setObjectName("comboBox_deseq2_group2") self.horizontalLayout_22.addWidget(self.comboBox_deseq2_group2) self.gridLayout_16.addLayout(self.horizontalLayout_22, 3, 1, 1, 2) - self.label_4 = QtWidgets.QLabel(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) - self.label_4.setSizePolicy(sizePolicy) - self.label_4.setObjectName("label_4") - self.gridLayout_16.addWidget(self.label_4, 0, 0, 1, 1) - self.label_166 = QtWidgets.QLabel(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_166.sizePolicy().hasHeightForWidth()) - self.label_166.setSizePolicy(sizePolicy) - self.label_166.setObjectName("label_166") - self.gridLayout_16.addWidget(self.label_166, 3, 0, 1, 1) - self.horizontalLayout_40 = QtWidgets.QHBoxLayout() - self.horizontalLayout_40.setObjectName("horizontalLayout_40") - self.checkBox_deseq2_comparing_in_condition = QtWidgets.QCheckBox(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_deseq2_comparing_in_condition.sizePolicy().hasHeightForWidth()) - self.checkBox_deseq2_comparing_in_condition.setSizePolicy(sizePolicy) - self.checkBox_deseq2_comparing_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) - self.checkBox_deseq2_comparing_in_condition.setObjectName("checkBox_deseq2_comparing_in_condition") - self.horizontalLayout_40.addWidget(self.checkBox_deseq2_comparing_in_condition) - self.comboBox_deseq2_condition_meta = QtWidgets.QComboBox(self.tab_19) - self.comboBox_deseq2_condition_meta.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_condition_meta.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_condition_meta.setSizePolicy(sizePolicy) - self.comboBox_deseq2_condition_meta.setObjectName("comboBox_deseq2_condition_meta") - self.horizontalLayout_40.addWidget(self.comboBox_deseq2_condition_meta) - self.horizontalLayout_75 = QtWidgets.QHBoxLayout() - self.horizontalLayout_75.setObjectName("horizontalLayout_75") - self.comboBox_deseq2_condition_group = QtWidgets.QComboBox(self.tab_19) - self.comboBox_deseq2_condition_group.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_condition_group.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_condition_group.setSizePolicy(sizePolicy) - self.comboBox_deseq2_condition_group.setObjectName("comboBox_deseq2_condition_group") - self.horizontalLayout_75.addWidget(self.comboBox_deseq2_condition_group) - self.horizontalLayout_40.addLayout(self.horizontalLayout_75) - self.gridLayout_16.addLayout(self.horizontalLayout_40, 0, 2, 1, 1) self.line_14 = QtWidgets.QFrame(self.tab_19) self.line_14.setFrameShape(QtWidgets.QFrame.HLine) self.line_14.setFrameShadow(QtWidgets.QFrame.Sunken) @@ -2295,6 +2282,19 @@ def setupUi(self, metaX_main): self.comboBox_deseq2_meta.setObjectName("comboBox_deseq2_meta") self.horizontalLayout_61.addWidget(self.comboBox_deseq2_meta) self.gridLayout_16.addLayout(self.horizontalLayout_61, 0, 1, 1, 1) + self.line = QtWidgets.QFrame(self.tab_19) + self.line.setFrameShape(QtWidgets.QFrame.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line.setObjectName("line") + self.gridLayout_16.addWidget(self.line, 1, 0, 1, 3) + self.label_4 = QtWidgets.QLabel(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) + self.label_4.setSizePolicy(sizePolicy) + self.label_4.setObjectName("label_4") + self.gridLayout_16.addWidget(self.label_4, 0, 0, 1, 1) self.groupBox = QtWidgets.QGroupBox(self.tab_19) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) @@ -2306,6 +2306,27 @@ def setupUi(self, metaX_main): self.groupBox.setObjectName("groupBox") self.gridLayout_55 = QtWidgets.QGridLayout(self.groupBox) self.gridLayout_55.setObjectName("gridLayout_55") + self.pushButton_deseq2_plot_sankey = QtWidgets.QPushButton(self.groupBox) + self.pushButton_deseq2_plot_sankey.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_deseq2_plot_sankey.sizePolicy().hasHeightForWidth()) + self.pushButton_deseq2_plot_sankey.setSizePolicy(sizePolicy) + self.pushButton_deseq2_plot_sankey.setObjectName("pushButton_deseq2_plot_sankey") + self.gridLayout_55.addWidget(self.pushButton_deseq2_plot_sankey, 1, 1, 1, 1) + self.checkBox_3 = QtWidgets.QCheckBox(self.groupBox) + self.checkBox_3.setObjectName("checkBox_3") + self.gridLayout_55.addWidget(self.checkBox_3, 1, 0, 1, 1) + self.pushButton_deseq2_plot_vocano = QtWidgets.QPushButton(self.groupBox) + self.pushButton_deseq2_plot_vocano.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_deseq2_plot_vocano.sizePolicy().hasHeightForWidth()) + self.pushButton_deseq2_plot_vocano.setSizePolicy(sizePolicy) + self.pushButton_deseq2_plot_vocano.setObjectName("pushButton_deseq2_plot_vocano") + self.gridLayout_55.addWidget(self.pushButton_deseq2_plot_vocano, 0, 1, 1, 1) self.horizontalLayout_92 = QtWidgets.QHBoxLayout() self.horizontalLayout_92.setObjectName("horizontalLayout_92") self.label_64 = QtWidgets.QLabel(self.groupBox) @@ -2326,24 +2347,6 @@ def setupUi(self, metaX_main): self.comboBox_deseq2_tables.setObjectName("comboBox_deseq2_tables") self.horizontalLayout_92.addWidget(self.comboBox_deseq2_tables) self.gridLayout_55.addLayout(self.horizontalLayout_92, 0, 0, 1, 1) - self.pushButton_deseq2_plot_vocano = QtWidgets.QPushButton(self.groupBox) - self.pushButton_deseq2_plot_vocano.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_deseq2_plot_vocano.sizePolicy().hasHeightForWidth()) - self.pushButton_deseq2_plot_vocano.setSizePolicy(sizePolicy) - self.pushButton_deseq2_plot_vocano.setObjectName("pushButton_deseq2_plot_vocano") - self.gridLayout_55.addWidget(self.pushButton_deseq2_plot_vocano, 0, 1, 1, 1) - self.pushButton_deseq2_plot_sankey = QtWidgets.QPushButton(self.groupBox) - self.pushButton_deseq2_plot_sankey.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_deseq2_plot_sankey.sizePolicy().hasHeightForWidth()) - self.pushButton_deseq2_plot_sankey.setSizePolicy(sizePolicy) - self.pushButton_deseq2_plot_sankey.setObjectName("pushButton_deseq2_plot_sankey") - self.gridLayout_55.addWidget(self.pushButton_deseq2_plot_sankey, 1, 1, 1, 1) self.groupBox_deseq2_plot_settings = QtWidgets.QGroupBox(self.groupBox) self.groupBox_deseq2_plot_settings.setMaximumSize(QtCore.QSize(16777215, 220)) self.groupBox_deseq2_plot_settings.setObjectName("groupBox_deseq2_plot_settings") @@ -2353,47 +2356,20 @@ 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, 403, 66)) + self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 996, 70)) self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4") self.gridLayout_68 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_4) self.gridLayout_68.setObjectName("gridLayout_68") self.gridLayout_53 = QtWidgets.QGridLayout() self.gridLayout_53.setObjectName("gridLayout_53") - self.label_16 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_16.sizePolicy().hasHeightForWidth()) - self.label_16.setSizePolicy(sizePolicy) - self.label_16.setLayoutDirection(QtCore.Qt.LeftToRight) - self.label_16.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_16.setObjectName("label_16") - self.gridLayout_53.addWidget(self.label_16, 1, 0, 1, 1) - self.spinBox_fc_plot_width = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) - self.spinBox_fc_plot_width.setMinimum(1) - self.spinBox_fc_plot_width.setMaximum(99) - self.spinBox_fc_plot_width.setSingleStep(1) - self.spinBox_fc_plot_width.setProperty("value", 10) - self.spinBox_fc_plot_width.setObjectName("spinBox_fc_plot_width") - self.gridLayout_53.addWidget(self.spinBox_fc_plot_width, 1, 1, 1, 1) - self.label_17 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_17.sizePolicy().hasHeightForWidth()) - self.label_17.setSizePolicy(sizePolicy) - self.label_17.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_17.setObjectName("label_17") - self.gridLayout_53.addWidget(self.label_17, 1, 2, 1, 1) - self.label_14 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + self.label_63 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_14.sizePolicy().hasHeightForWidth()) - self.label_14.setSizePolicy(sizePolicy) - self.label_14.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_14.setObjectName("label_14") - self.gridLayout_53.addWidget(self.label_14, 0, 0, 1, 1) + sizePolicy.setHeightForWidth(self.label_63.sizePolicy().hasHeightForWidth()) + self.label_63.setSizePolicy(sizePolicy) + self.label_63.setObjectName("label_63") + self.gridLayout_53.addWidget(self.label_63, 0, 6, 1, 1) self.comboBox_deseq2_p_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -2404,18 +2380,24 @@ def setupUi(self, metaX_main): self.comboBox_deseq2_p_type.addItem("") self.comboBox_deseq2_p_type.addItem("") self.gridLayout_53.addWidget(self.comboBox_deseq2_p_type, 0, 1, 1, 1) - self.spinBox_fc_plot_height = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + self.label_14 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_fc_plot_height.sizePolicy().hasHeightForWidth()) - self.spinBox_fc_plot_height.setSizePolicy(sizePolicy) - self.spinBox_fc_plot_height.setMinimum(1) - self.spinBox_fc_plot_height.setMaximum(99) - self.spinBox_fc_plot_height.setSingleStep(1) - self.spinBox_fc_plot_height.setProperty("value", 8) - self.spinBox_fc_plot_height.setObjectName("spinBox_fc_plot_height") - self.gridLayout_53.addWidget(self.spinBox_fc_plot_height, 1, 3, 1, 1) + sizePolicy.setHeightForWidth(self.label_14.sizePolicy().hasHeightForWidth()) + self.label_14.setSizePolicy(sizePolicy) + self.label_14.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_14.setObjectName("label_14") + self.gridLayout_53.addWidget(self.label_14, 0, 0, 1, 1) + self.label_156 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + self.label_156.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_156.setObjectName("label_156") + self.gridLayout_53.addWidget(self.label_156, 1, 4, 1, 1) + self.spinBox_deseq2_font_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) + self.spinBox_deseq2_font_size.setMinimum(1) + self.spinBox_deseq2_font_size.setProperty("value", 12) + self.spinBox_deseq2_font_size.setObjectName("spinBox_deseq2_font_size") + self.gridLayout_53.addWidget(self.spinBox_deseq2_font_size, 1, 5, 1, 1) self.label_71 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) @@ -2425,10 +2407,26 @@ def setupUi(self, metaX_main): self.label_71.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_71.setObjectName("label_71") self.gridLayout_53.addWidget(self.label_71, 0, 4, 1, 1) - self.label_156 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - self.label_156.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_156.setObjectName("label_156") - self.gridLayout_53.addWidget(self.label_156, 1, 4, 1, 1) + self.doubleSpinBox_deseq2_pvalue = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.doubleSpinBox_deseq2_pvalue.sizePolicy().hasHeightForWidth()) + self.doubleSpinBox_deseq2_pvalue.setSizePolicy(sizePolicy) + self.doubleSpinBox_deseq2_pvalue.setDecimals(4) + self.doubleSpinBox_deseq2_pvalue.setMaximum(1.0) + self.doubleSpinBox_deseq2_pvalue.setSingleStep(0.01) + self.doubleSpinBox_deseq2_pvalue.setProperty("value", 0.05) + self.doubleSpinBox_deseq2_pvalue.setObjectName("doubleSpinBox_deseq2_pvalue") + self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_pvalue, 0, 2, 1, 2) + self.spinBox_deseq2_dot_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) + self.spinBox_deseq2_dot_size.setMinimum(1) + self.spinBox_deseq2_dot_size.setProperty("value", 15) + self.spinBox_deseq2_dot_size.setObjectName("spinBox_deseq2_dot_size") + self.gridLayout_53.addWidget(self.spinBox_deseq2_dot_size, 1, 7, 1, 1) + self.label_193 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + self.label_193.setObjectName("label_193") + self.gridLayout_53.addWidget(self.label_193, 1, 6, 1, 1) self.doubleSpinBox_deseq2_log2fc_min = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -2439,20 +2437,6 @@ def setupUi(self, metaX_main): self.doubleSpinBox_deseq2_log2fc_min.setProperty("value", 1.0) self.doubleSpinBox_deseq2_log2fc_min.setObjectName("doubleSpinBox_deseq2_log2fc_min") self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_log2fc_min, 0, 5, 1, 1) - self.spinBox_seqeq2_font_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) - self.spinBox_seqeq2_font_size.setMinimum(1) - self.spinBox_seqeq2_font_size.setProperty("value", 12) - self.spinBox_seqeq2_font_size.setObjectName("spinBox_seqeq2_font_size") - self.gridLayout_53.addWidget(self.spinBox_seqeq2_font_size, 1, 5, 1, 1) - self.label_63 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_63.sizePolicy().hasHeightForWidth()) - self.label_63.setSizePolicy(sizePolicy) - self.label_63.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_63.setObjectName("label_63") - self.gridLayout_53.addWidget(self.label_63, 0, 6, 1, 1) self.doubleSpinBox_deseq2_log2fc_max = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -2463,25 +2447,55 @@ def setupUi(self, metaX_main): self.doubleSpinBox_deseq2_log2fc_max.setProperty("value", 20.0) self.doubleSpinBox_deseq2_log2fc_max.setObjectName("doubleSpinBox_deseq2_log2fc_max") self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_log2fc_max, 0, 7, 1, 1) - self.doubleSpinBox_deseq2_pvalue = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) + self.horizontalLayout_14 = QtWidgets.QHBoxLayout() + self.horizontalLayout_14.setObjectName("horizontalLayout_14") + self.label_16 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_16.sizePolicy().hasHeightForWidth()) + self.label_16.setSizePolicy(sizePolicy) + self.label_16.setLayoutDirection(QtCore.Qt.LeftToRight) + self.label_16.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_16.setObjectName("label_16") + self.horizontalLayout_14.addWidget(self.label_16) + self.spinBox_fc_plot_width = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) + self.spinBox_fc_plot_width.setMinimum(1) + self.spinBox_fc_plot_width.setMaximum(99) + self.spinBox_fc_plot_width.setSingleStep(1) + self.spinBox_fc_plot_width.setProperty("value", 10) + self.spinBox_fc_plot_width.setObjectName("spinBox_fc_plot_width") + self.horizontalLayout_14.addWidget(self.spinBox_fc_plot_width) + self.label_17 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_17.sizePolicy().hasHeightForWidth()) + self.label_17.setSizePolicy(sizePolicy) + self.label_17.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_17.setObjectName("label_17") + self.horizontalLayout_14.addWidget(self.label_17) + self.spinBox_fc_plot_height = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.doubleSpinBox_deseq2_pvalue.sizePolicy().hasHeightForWidth()) - self.doubleSpinBox_deseq2_pvalue.setSizePolicy(sizePolicy) - self.doubleSpinBox_deseq2_pvalue.setDecimals(4) - self.doubleSpinBox_deseq2_pvalue.setMaximum(1.0) - self.doubleSpinBox_deseq2_pvalue.setSingleStep(0.01) - self.doubleSpinBox_deseq2_pvalue.setProperty("value", 0.05) - self.doubleSpinBox_deseq2_pvalue.setObjectName("doubleSpinBox_deseq2_pvalue") - self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_pvalue, 0, 2, 1, 2) + sizePolicy.setHeightForWidth(self.spinBox_fc_plot_height.sizePolicy().hasHeightForWidth()) + self.spinBox_fc_plot_height.setSizePolicy(sizePolicy) + self.spinBox_fc_plot_height.setMinimum(1) + self.spinBox_fc_plot_height.setMaximum(99) + self.spinBox_fc_plot_height.setSingleStep(1) + self.spinBox_fc_plot_height.setProperty("value", 8) + self.spinBox_fc_plot_height.setObjectName("spinBox_fc_plot_height") + self.horizontalLayout_14.addWidget(self.spinBox_fc_plot_height) + self.gridLayout_53.addLayout(self.horizontalLayout_14, 1, 2, 1, 2) + self.checkBox_deseq2_js_volcano = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_4) + self.checkBox_deseq2_js_volcano.setChecked(True) + self.checkBox_deseq2_js_volcano.setObjectName("checkBox_deseq2_js_volcano") + self.gridLayout_53.addWidget(self.checkBox_deseq2_js_volcano, 1, 0, 1, 2) self.gridLayout_68.addLayout(self.gridLayout_53, 0, 0, 1, 1) self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_4) self.gridLayout_48.addWidget(self.scrollArea_3, 0, 0, 1, 1) - self.gridLayout_55.addWidget(self.groupBox_deseq2_plot_settings, 2, 0, 1, 2) - self.checkBox_3 = QtWidgets.QCheckBox(self.groupBox) - self.checkBox_3.setObjectName("checkBox_3") - self.gridLayout_55.addWidget(self.checkBox_3, 1, 0, 1, 1) + self.gridLayout_55.addWidget(self.groupBox_deseq2_plot_settings, 5, 0, 1, 2) self.gridLayout_16.addWidget(self.groupBox, 6, 0, 1, 3) self.tabWidget_3.addTab(self.tab_19, "") self.tab_4 = QtWidgets.QWidget() @@ -5294,10 +5308,10 @@ def setupUi(self, metaX_main): self.retranslateUi(metaX_main) self.stackedWidget.setCurrentIndex(0) - self.tabWidget_TaxaFuncAnalyzer.setCurrentIndex(3) + self.tabWidget_TaxaFuncAnalyzer.setCurrentIndex(4) self.toolBox_2.setCurrentIndex(0) self.tabWidget_4.setCurrentIndex(1) - self.tabWidget_3.setCurrentIndex(1) + self.tabWidget_3.setCurrentIndex(3) self.tabWidget.setCurrentIndex(1) self.tabWidget_2.setCurrentIndex(1) self.tabWidget_6.setCurrentIndex(1) @@ -5664,31 +5678,33 @@ def retranslateUi(self, metaX_main): self.checkBox_comparing_group_control_in_condition.setText(_translate("metaX_main", "Comparing in Each Condition")) self.label_140.setText(_translate("metaX_main", " By:")) self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_16), _translate("metaX_main", "Group-Control TEST ")) + self.label_166.setText(_translate("metaX_main", "Groups")) self.pushButton_deseq2.setText(_translate("metaX_main", "Run DESeq2")) + self.checkBox_deseq2_comparing_in_condition.setText(_translate("metaX_main", "In Condition")) self.label_2.setText(_translate("metaX_main", "Group 1")) self.label_3.setText(_translate("metaX_main", "Group 2")) - self.label_4.setText(_translate("metaX_main", "Table")) - self.label_166.setText(_translate("metaX_main", "Groups")) - self.checkBox_deseq2_comparing_in_condition.setText(_translate("metaX_main", "In Condition")) self.comboBox_table_for_deseq2.setItemText(0, _translate("metaX_main", "Taxa-Functions")) self.comboBox_table_for_deseq2.setItemText(1, _translate("metaX_main", "Taxa")) self.comboBox_table_for_deseq2.setItemText(2, _translate("metaX_main", "Functions")) self.comboBox_table_for_deseq2.setItemText(3, _translate("metaX_main", "Peptides")) self.label_147.setText(_translate("metaX_main", "Meta")) + self.label_4.setText(_translate("metaX_main", "Table")) self.groupBox.setTitle(_translate("metaX_main", "Plot")) - self.label_64.setText(_translate("metaX_main", "Tables")) - self.pushButton_deseq2_plot_vocano.setText(_translate("metaX_main", "Plot Volcano")) self.pushButton_deseq2_plot_sankey.setText(_translate("metaX_main", "Plot Sankey")) + self.checkBox_3.setText(_translate("metaX_main", "Show Plotting Parameter")) + self.pushButton_deseq2_plot_vocano.setText(_translate("metaX_main", "Plot Volcano")) + self.label_64.setText(_translate("metaX_main", "Tables")) self.groupBox_deseq2_plot_settings.setTitle(_translate("metaX_main", "Plotting Parameter")) - self.label_16.setText(_translate("metaX_main", "Width")) - self.label_17.setText(_translate("metaX_main", "Height")) - self.label_14.setText(_translate("metaX_main", "Threshold")) + self.label_63.setText(_translate("metaX_main", "Max Log2FC")) self.comboBox_deseq2_p_type.setItemText(0, _translate("metaX_main", "padj")) self.comboBox_deseq2_p_type.setItemText(1, _translate("metaX_main", "pvalue")) - self.label_71.setText(_translate("metaX_main", "Log2FC Range")) + self.label_14.setText(_translate("metaX_main", "Threshold")) self.label_156.setText(_translate("metaX_main", "Font Size")) - self.label_63.setText(_translate("metaX_main", "-")) - self.checkBox_3.setText(_translate("metaX_main", "Show Plotting Parameter")) + self.label_71.setText(_translate("metaX_main", "Mini Log2FC")) + self.label_193.setText(_translate("metaX_main", "Dot Size")) + self.label_16.setText(_translate("metaX_main", "Width")) + self.label_17.setText(_translate("metaX_main", "Height")) + self.checkBox_deseq2_js_volcano.setText(_translate("metaX_main", "Interactive Volcano")) self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_19), _translate("metaX_main", "DESeq2")) self.label_55.setText(_translate("metaX_main", "Taxon")) self.label_tukey_func_num.setText(_translate("metaX_main", "Linked Number: -")) diff --git a/metax/gui/metax_gui/ui_setting_window.py b/metax/gui/metax_gui/ui_setting_window.py index 395abc1..ad1cf70 100644 --- a/metax/gui/metax_gui/ui_setting_window.py +++ b/metax/gui/metax_gui/ui_setting_window.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'c:\Users\Qing\OneDrive - University of Ottawa\code\TaxaFunc\MetaX\utils\MetaX_GUI\Setting.ui' +# Form implementation generated from reading ui file 'c:\Users\Qing\OneDrive - University of Ottawa\code\TaxaFunc\MetaX\metax\gui\metax_gui\setting_window.ui' # # Created by: PyQt5 UI code generator 5.15.9 # @@ -83,7 +83,7 @@ def setupUi(self, Settings): self.gridLayout_7.addWidget(self.label_18, 2, 0, 1, 1) self.spinBox_tf_link_net_repulsion = QtWidgets.QSpinBox(self.page_2) self.spinBox_tf_link_net_repulsion.setMaximum(100000) - self.spinBox_tf_link_net_repulsion.setSingleStep(10) + self.spinBox_tf_link_net_repulsion.setSingleStep(50) self.spinBox_tf_link_net_repulsion.setProperty("value", 500) self.spinBox_tf_link_net_repulsion.setObjectName("spinBox_tf_link_net_repulsion") self.gridLayout_7.addWidget(self.spinBox_tf_link_net_repulsion, 1, 1, 1, 1) @@ -145,7 +145,7 @@ def setupUi(self, Settings): self.gridLayout_7.addWidget(self.label_19, 1, 2, 1, 1) self.doubleSpinBox_tf_link_net_gravity = QtWidgets.QDoubleSpinBox(self.page_2) self.doubleSpinBox_tf_link_net_gravity.setMaximum(1.0) - self.doubleSpinBox_tf_link_net_gravity.setSingleStep(0.1) + self.doubleSpinBox_tf_link_net_gravity.setSingleStep(0.01) self.doubleSpinBox_tf_link_net_gravity.setProperty("value", 0.2) self.doubleSpinBox_tf_link_net_gravity.setObjectName("doubleSpinBox_tf_link_net_gravity") self.gridLayout_7.addWidget(self.doubleSpinBox_tf_link_net_gravity, 1, 3, 1, 1) @@ -275,6 +275,7 @@ def setupUi(self, Settings): self.gridLayout_4.addWidget(self.label, 1, 0, 1, 1) self.toolBox.addItem(self.page_2, "") self.page_3 = QtWidgets.QWidget() + self.page_3.setGeometry(QtCore.QRect(0, 0, 748, 340)) self.page_3.setObjectName("page_3") self.gridLayout_11 = QtWidgets.QGridLayout(self.page_3) self.gridLayout_11.setObjectName("gridLayout_11") @@ -296,7 +297,7 @@ def setupUi(self, Settings): self.gridLayout.addWidget(self.toolBox, 0, 0, 1, 1) self.retranslateUi(Settings) - self.toolBox.setCurrentIndex(2) + self.toolBox.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(Settings) def retranslateUi(self, Settings): diff --git a/metax/taxafunc_ploter/volcano_plot.py b/metax/taxafunc_ploter/volcano_plot.py index f8ed13f..118d7a6 100644 --- a/metax/taxafunc_ploter/volcano_plot.py +++ b/metax/taxafunc_ploter/volcano_plot.py @@ -2,58 +2,66 @@ import numpy as np import matplotlib.pyplot as plt +class VolcanoPlot: + def plot_volcano(self, df_fc, pvalue: float = 0.05, p_type='padj', log2fc_min: float = 1, log2fc_max: float = 10, + title_name='2 groups',font_size:int=12, width=8, height=6, dot_size=15): + + def color_mapping(type_value): + if type_value == 'up': + return "#d23918" + elif type_value == 'down': + return "#68945c" + elif type_value == 'ultra-up': + return "#663d74" + elif type_value == 'ultra-down': + return "#206864" + else: # normal + return "#6b798e" -class VolcanoPlot(): + df = df_fc.copy() - # EXAMPLE: fc_df = sw.call_deseq2(sw.func_taxa_df, ['NDC', 'KES']) - # plot_volcano(fc_df, 0.01, 1, 'NDC VS KES', (8, 6)) + df['type'] = 'normal' + df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] >= log2fc_min) & (df['log2FoldChange'] < log2fc_max), 'type'] = 'up' + df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] >= log2fc_max), 'type'] = 'ultra-up' + df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] <= -log2fc_min) & (df['log2FoldChange'] > -log2fc_max), 'type'] = 'down' + df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] <= -log2fc_max), 'type'] = 'ultra-down' - def plot_volcano(self, df_fc, padj=0.05, log2fc=1, title_name='2 groups', width=8, height=6): - df = df_fc.copy() - # 计算不同类型的样本数并生成新的图例标签 - count_up = len(df[(df['padj'] < padj) & ( - df['log2FoldChange'] > log2fc)]) - count_down = len( - df[(df['padj'] < padj) & (df['log2FoldChange'] < -log2fc)]) - df.loc[(df['padj'] < padj) & ( - df['log2FoldChange'] > log2fc), 'type'] = 'up' - df.loc[(df['padj'] < padj) & ( - df['log2FoldChange'] < -log2fc), 'type'] = 'down' - df.loc[~df.index.isin(df[(df['padj'] < padj) & ((df['log2FoldChange'] > log2fc) | ( - df['log2FoldChange'] < -log2fc))].index), 'type'] = 'normal' - count_normal = len(df[df['type'] == 'normal']) - - # 生成图例标签和相应的句柄,并按照指定顺序排列 + # count the number of each type + count_dict = {type_name: len(df[df['type'] == type_name]) for type_name in ['up', 'down', 'ultra-up', 'ultra-down', 'normal']} + print(count_dict) + + # create handles and labels for legend handles = [] labels = [] - for t in ['up', 'down', 'normal']: - if t == 'up': - h = plt.scatter([], [], s=50, color='#d23918', - alpha=0.6, linewidth=0.5, edgecolor='black') - elif t == 'down': - h = plt.scatter([], [], s=50, color='#68945c', - alpha=0.6, linewidth=0.5, edgecolor='black') - else: - h = plt.scatter([], [], s=50, color='#6b798e', - alpha=0.6, linewidth=0.5, edgecolor='black') + for t in ['up', 'down', 'ultra-up', 'ultra-down', 'normal']: + if count_dict[t] == 0: + continue + h = plt.scatter([], [], s=150, color=color_mapping(t), alpha=0.8, linewidth=0.5, edgecolor='black') handles.append(h) - labels.append(f'{t} ({locals()[f"count_{t}"]})') + labels.append(f'{t} ({count_dict[t]})') - # 关闭当前空图 + # close the previous plot plt.close() - # 绘制火山图 - plt.figure(figsize=( width, height)) - fig = sns.scatterplot(x=df['log2FoldChange'], y=-np.log10(df['padj']), s=50, hue=df['type'], alpha=0.6, - palette={'up': '#d23918', 'down': '#68945c', 'normal': '#6b798e'}, linewidth=0.5, edgecolor='black') - - # 设置标题、坐标轴标签和图例 - fig.set_title( - f'Volcano plot of {title_name} (padj < {padj}, log2FoldChange > {log2fc})') - fig.set_xlabel('log2FoldChange') - fig.set_ylabel('-log10(padj)') - fig.legend(handles=handles, labels=labels, loc='upper right') + # create the volcano plot + plt.figure(figsize=(width, height)) + fig = sns.scatterplot(x=df['log2FoldChange'], y=-np.log10(df[p_type]), s=dot_size*10, hue=df['type'], alpha=0.8, + palette={'up': '#d23918', 'down': '#68945c', 'ultra-up': '#663d74', 'ultra-down': '#206864', 'normal': '#6b798e'}, linewidth=0.5, edgecolor='black') + plt.axhline(y=-np.log10(pvalue), linestyle='--', color='grey', linewidth=1) # padj line + plt.axvline(x=-log2fc_min, linestyle='--', color='grey', linewidth=1) # log2FoldChange line + plt.axvline(x=log2fc_min, linestyle='--', color='grey', linewidth=1) # log2FoldChange line + + # set the title and labels + fig.set_title(f'Volcano plot of {title_name} (padj < {pvalue}, |log2FoldChange| > {log2fc_min})', fontsize=font_size) + fig.set_xlabel('log2FoldChange', fontsize=font_size) + fig.set_ylabel('-log10(padj)', fontsize=font_size) + fig.legend(handles=handles, labels=labels, loc='upper right', fontsize=font_size- 2 if font_size > 2 else 2) + sns.despine(trim=True) + plt.show() return fig - +# Usage +# vp = VolcanoPlot() +# vp.plot_volcano(df_fc=df_fc, pvalue=0.05, p_type='padj', log2fc_min=1, log2fc_max=10, title_name='OTFs: PBS vs CHO', font_size=15, +# width=12, height=8, dot_size=150) diff --git a/metax/taxafunc_ploter/volcano_plot_js.py b/metax/taxafunc_ploter/volcano_plot_js.py index d3b1ead..dcefee9 100644 --- a/metax/taxafunc_ploter/volcano_plot_js.py +++ b/metax/taxafunc_ploter/volcano_plot_js.py @@ -4,7 +4,7 @@ import numpy as np -class VolcanoPlot(): +class VolcanoPlotJS(): def __init__(self, theme='white'): self.theme = theme @@ -13,7 +13,7 @@ def __init__(self, theme='white'): def plot_volcano_js(self, df_fc, pvalue:float=0.05, p_type ='padj', log2fc_min:float=1, log2fc_max:float = 10, title_name:str='2 groups', font_size:int=12, - width:int=12, height:int=8): + width:int=12, height:int=8, dot_size:int=15): df = df_fc.copy() @@ -54,7 +54,7 @@ def color_mapping(type_value): elif type_value == 'ultra-down': return "#206864" else: # normal - return "#9aa7b1" + return "#6b798e" # create a list of dict for each type Scatter_up = df[df['type'] == 'up'].apply(lambda p: {'name': p['label'], 'value': [p['log2FoldChange'], p[p_type]]}, axis=1) @@ -113,8 +113,8 @@ def color_mapping(type_value): f"{type_name.title()} ({count_dict[type_name]})", scatter_data.tolist(), label_opts=opts.LabelOpts(is_show=False), - itemstyle_opts=opts.ItemStyleOpts(color=color_mapping(color_name)), - symbol_size=font_size, + itemstyle_opts=opts.ItemStyleOpts(color=color_mapping(color_name), opacity=0.8, border_width=0.5, border_color='black'), + symbol_size=dot_size, ) diff --git a/pyproject.toml b/pyproject.toml index 50689c4..0f180b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "MetaXTools" -version = "1.109.5" +version = "1.109.7" description = "MetaXTools is a novel tool for linking peptide sequences with taxonomic and functional information in Metaproteomics." readme = "README_PyPi.md" license = { text = "NorthOmics" } From c4387541d82764bdfeebea4d31dd1ea1f466afb1 Mon Sep 17 00:00:00 2001 From: Qing <44231502+byemaxx@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:39:41 -0400 Subject: [PATCH 4/7] - Fix: Fixed title of the static volcano plot. - New: added theme option for the static volcano plot. --- Docs/ChangeLog.md | 7 + metax/gui/main_gui.py | 7 +- metax/gui/metax_gui/main_window.ui | 3004 +++++++++++++------------ metax/gui/metax_gui/ui_main_window.py | 2190 +++++++++--------- metax/taxafunc_ploter/volcano_plot.py | 96 +- metax/utils/version.py | 2 +- pyproject.toml | 2 +- 7 files changed, 2676 insertions(+), 2632 deletions(-) diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index 80233c6..1cb7e38 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,10 @@ +# Version: 1.109.8 +## Date: 2024-08-1 +### Changes: +- Fix: Fixed title of the static volcano plot. +- New: added theme option for the static volcano plot. + + # Version: 1.109.7 ## Date: 2024-07-31 ### Changes: diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index f84e114..5ab5f22 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -1490,6 +1490,7 @@ def add_theme_to_combobox(self): self.comboBox_basic_theme.addItems(mat_style_list) self.comboBox_data_overiew_theme.addItems(mat_style_list) + self.comboBox_deseq2_volcano_sns_theme.addItems(mat_style_list) def check_update(self, show_message=False, manual_check_trigger=True): @@ -4941,10 +4942,12 @@ def plot_deseq2_volcano(self): self.save_and_show_js_plot(pic, f'volcano plot of {title_name.split(" (")[0]}') else: - pic = VolcanoPlot().plot_volcano(df, pvalue = pvalue, p_type = p_type, + theme = self.comboBox_deseq2_volcano_sns_theme.currentText() + VolcanoPlot().plot_volcano(df, pvalue = pvalue, p_type = p_type, log2fc_min = log2fc_min, log2fc_max=log2fc_max, title_name=title_name, font_size = font_size, - width=width, height=height, dot_size=dot_size) + width=width, height=height, dot_size=dot_size, + theme = theme) except Exception as e: error_message = traceback.format_exc() diff --git a/metax/gui/metax_gui/main_window.ui b/metax/gui/metax_gui/main_window.ui index 324e91e..011bfd9 100644 --- a/metax/gui/metax_gui/main_window.ui +++ b/metax/gui/metax_gui/main_window.ui @@ -3539,1513 +3539,139 @@ Cross Test - - - - QTabWidget::Triangular - - - 3 + + + + Plot - - - T-TEST - - - - - - - - - 0 - 0 - - - - Table - - - - - - - - Taxa-Functions - - - - - Taxa - - - - - Functions + + + + + + + + + + 0 + 0 + - - - peptides + Table - - - - Significant Taxa-Func + + + + + + + 0 + 0 + - - - - - - - - 0 - 0 - - - - Meta - - - Qt::AlignCenter - - - - - - - - - - - 0 - 0 - - - - Qt::RightToLeft - - - In Condition - - - - - - - false - - - - - - - - - false + + + - - - - - - - - - - false - - - - 0 - 0 - - - - Run T-Test - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - - - - + + + + + + + + + false + + + + 0 + 0 + + + + + 16777215 + 30 + + + + Get Top Table + + + + + + + false + + + + 0 + 0 + + + + + 16777215 + 50 + + + + Plot Top Heatmap + + + false + + + + + + + Show Plotting Parameter + + + + + + + + + + 16777215 + 220 + + + + Plotting Parameter + + + + - + 0 0 - - Group 2 + + + 16777215 + 16777215 + - - - - - - - 0 - 0 - - - - Group 1 - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - - - ANOVA TEST - - - - - - false - - - - 0 - 0 - - - - Run ANOVA Test - - - - - - - Qt::Horizontal - - - - - - - - - - 0 - 0 - - - - Table - - - - - - - - Taxa-Functions - - - - - Taxa - - - - - Functions - - - - - peptides - - - - - Significant Taxa-Func - - - - - - - - - 0 - 0 - - - - Meta - - - - - - - - - - Qt::RightToLeft - - - In Condition - - - - - - - false - - - - - - - - - false - - - - - - - - - - - - - - - 0 - 0 - - - - Groups (Default all) - - - - - - - Qt::Horizontal - - - - - - - - Group-Control TEST - - - - - - Qt::Horizontal - - - - - - - false - - - Run Dunnett's TEST - - - - - - - - - - 0 - 0 - - - - Table + + true - - - - - - - Taxa-Functions - - - - - Taxa - - - - - Functions - - - - - peptides - - - - - - - - - 0 - 0 - - - - Meta - - - - - - - - - - Qt::RightToLeft - - - In Condition - - - - - - - false - - - - - - - - - false - - - - - - - - - - - Qt::Horizontal - - - - - - - false - - - Run Deseq2 - - - - - - - - - - - - - 0 - 0 - - - - Groups (Default all) - - - - - - - - - - Control Group - - - - - - - - 0 - 0 - - - - Comparing in Each Condition - - - - - - - - - - 0 - 0 - - - - By: - - - - - - - false - - - - - - - - - - - - DESeq2 - - - - - - - 0 - 0 - - - - Groups - - - - - - - false - - - - 0 - 0 - - - - - 33 - 0 - - - - - 16777215 - 16777215 - - - - Run DESeq2 - - - - - - - - - - 0 - 0 - - - - Qt::RightToLeft - - - In Condition - - - - - - - false - - - - 0 - 0 - - - - - - - - - - false - - - - 0 - 0 - - - - - - - - - - - - - - - 0 - 0 - - - - Group 1 - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Group 2 - - - - - - - - 0 - 0 - - - - - - - - - - Qt::Horizontal - - - - - - - - - - 0 - 0 - - - - - Taxa-Functions - - - - - Taxa - - - - - Functions - - - - - Peptides - - - - - - - - - 0 - 0 - - - - Meta - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Table - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 400 - - - - Plot - - - - - - false - - - - 0 - 0 - - - - Plot Sankey - - - - - - - Show Plotting Parameter - - - - - - - false - - - - 0 - 0 - - - - Plot Volcano - - - - - - - - - - 0 - 0 - - - - Tables - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - - - - 16777215 - 220 - - - - Plotting Parameter - - - - - - true - - - - - 0 - 0 - 996 - 70 - - - - - - - - - - 0 - 0 - - - - Max Log2FC - - - - - - - - 0 - 0 - - - - - padj - - - - - pvalue - - - - - - - - - 0 - 0 - - - - Threshold - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Font Size - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 1 - - - 12 - - - - - - - - 0 - 0 - - - - Mini Log2FC - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - 4 - - - 1.000000000000000 - - - 0.010000000000000 - - - 0.050000000000000 - - - - - - - 1 - - - 999 - - - 15 - - - - - - - Dot Size - - - - - - - - 0 - 0 - - - - 1 - - - 1.000000000000000 - - - - - - - - 0 - 0 - - - - 1 - - - 20.000000000000000 - - - - - - - - - - 0 - 0 - - - - Qt::LeftToRight - - - Width - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 1 - - - 99 - - - 1 - - - 10 - - - - - - - - 0 - 0 - - - - Height - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - 1 - - - 99 - - - 1 - - - 8 - - - - - - - - - Interactive Volcano - - - true - - - - - - - - - - - - - - - - - - - - TUKEY TEST - - - - - - - 0 - 0 - - - - Taxon - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Linked Number: - - - - - - - - false - - - Show Linked Func Only - - - - - - - false - - - Restore both lists to their original full items - - - Reset Funtion & Taxa Filter - - - - - - - Stats for - - - - - - - - 0 - 0 - - - - true - - - - - - - - 0 - 0 - - - - Function - - - - - - - - Sum All - - - - - Each Item - - - - - - - - false - - - - 0 - 0 - - - - Show Linked Taxa Only - - - - - - - false - - - Plot TUKEY - - - - - - - - 0 - 0 - - - - Linked Number: - - - - - - - - - 0 - 0 - - - - true - - - - - - - false - - - Run TUKEY Test - - - - - - - - - - 0 - 0 - - - - Meta - - - - - - - - - - Qt::RightToLeft - - - In Condition - - - - - - - false - - - - - - - - - false - - - - - - - - - - - Qt::Horizontal - - - - - - - - - - - Plot - - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 30 - - - - Get Top Table - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 50 - - - - Plot Top Heatmap - - - false - - - - - - - Show Plotting Parameter - - - - - - - - - - 0 - 0 - - - - Table - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - - - - 16777215 - 220 - - - - Plotting Parameter - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - true - - - - - 0 - 0 - 1003 - 124 - + + + + 0 + 0 + 1003 + 124 + @@ -5993,9 +4619,1393 @@ - - - + + + + + + + + + QTabWidget::Triangular + + + 3 + + + + T-TEST + + + + + + + + + 0 + 0 + + + + Table + + + + + + + + Taxa-Functions + + + + + Taxa + + + + + Functions + + + + + peptides + + + + + Significant Taxa-Func + + + + + + + + + 0 + 0 + + + + Meta + + + Qt::AlignCenter + + + + + + + + + + + 0 + 0 + + + + Qt::RightToLeft + + + In Condition + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + 0 + 0 + + + + Run T-Test + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + Group 2 + + + + + + + + 0 + 0 + + + + Group 1 + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + + + ANOVA TEST + + + + + + false + + + + 0 + 0 + + + + Run ANOVA Test + + + + + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + Table + + + + + + + + Taxa-Functions + + + + + Taxa + + + + + Functions + + + + + peptides + + + + + Significant Taxa-Func + + + + + + + + + 0 + 0 + + + + Meta + + + + + + + + + + Qt::RightToLeft + + + In Condition + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + 0 + 0 + + + + Groups (Default all) + + + + + + + Qt::Horizontal + + + + + + + + Group-Control TEST + + + + + + Qt::Horizontal + + + + + + + false + + + Run Dunnett's TEST + + + + + + + + + + 0 + 0 + + + + Table + + + + + + + + Taxa-Functions + + + + + Taxa + + + + + Functions + + + + + peptides + + + + + + + + + 0 + 0 + + + + Meta + + + + + + + + + + Qt::RightToLeft + + + In Condition + + + + + + + false + + + + + + + + + false + + + + + + + + + + + Qt::Horizontal + + + + + + + false + + + Run Deseq2 + + + + + + + + + + + + + 0 + 0 + + + + Groups (Default all) + + + + + + + + + + Control Group + + + + + + + + 0 + 0 + + + + Comparing in Each Condition + + + + + + + + + + 0 + 0 + + + + By: + + + + + + + false + + + + + + + + + + + + DESeq2 + + + + + + + 0 + 0 + + + + Groups + + + + + + + false + + + + 0 + 0 + + + + + 33 + 0 + + + + + 16777215 + 16777215 + + + + Run DESeq2 + + + + + + + + + + 0 + 0 + + + + Qt::RightToLeft + + + In Condition + + + + + + + false + + + + 0 + 0 + + + + + + + + + + false + + + + 0 + 0 + + + + + + + + + + + + + + + 0 + 0 + + + + Group 1 + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Group 2 + + + + + + + + 0 + 0 + + + + + + + + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + + Taxa-Functions + + + + + Taxa + + + + + Functions + + + + + Peptides + + + + + + + + + 0 + 0 + + + + Meta + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + Table + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 400 + + + + Plot + + + + + + false + + + + 0 + 0 + + + + Plot Sankey + + + + + + + Show Plotting Parameter + + + + + + + false + + + + 0 + 0 + + + + Plot Volcano + + + + + + + + + + 0 + 0 + + + + Tables + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + + + + 16777215 + 220 + + + + Plotting Parameter + + + + + + true + + + + + 0 + -17 + 979 + 94 + + + + + + + + + 1 + + + 12 + + + + + + + + 0 + 0 + + + + 4 + + + 1.000000000000000 + + + 0.010000000000000 + + + 0.050000000000000 + + + + + + + + 0 + 0 + + + + Mini Log2FC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + 0 + 0 + + + + Qt::LeftToRight + + + Width + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 1 + + + 99 + + + 1 + + + 10 + + + + + + + + 0 + 0 + + + + Height + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + 1 + + + 99 + + + 1 + + + 8 + + + + + + + + + + 0 + 0 + + + + + padj + + + + + pvalue + + + + + + + + + 0 + 0 + + + + Threshold + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 1 + + + 999 + + + 15 + + + + + + + + 0 + 0 + + + + Max Log2FC + + + + + + + + 0 + 0 + + + + 1 + + + 20.000000000000000 + + + + + + + Font Size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Dot Size + + + + + + + + 0 + 0 + + + + 1 + + + 1.000000000000000 + + + + + + + Interactive Volcano + + + true + + + + + + + Themes for static volcano + + + + + + + + + + + + + + + + + + + + + + + TUKEY TEST + + + + + + + 0 + 0 + + + + Taxon + + + + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + Linked Number: - + + + + + + + false + + + Show Linked Func Only + + + + + + + false + + + Restore both lists to their original full items + + + Reset Funtion & Taxa Filter + + + + + + + Stats for + + + + + + + + 0 + 0 + + + + true + + + + + + + + 0 + 0 + + + + Function + + + + + + + + Sum All + + + + + Each Item + + + + + + + + false + + + + 0 + 0 + + + + Show Linked Taxa Only + + + + + + + false + + + Plot TUKEY + + + + + + + + 0 + 0 + + + + Linked Number: - + + + + + + + + 0 + 0 + + + + true + + + + + + + false + + + Run TUKEY Test + + + + + + + + + + 0 + 0 + + + + Meta + + + + + + + + + + Qt::RightToLeft + + + In Condition + + + + + + + false + + + + + + + + + false + + + + + + + + + + + Qt::Horizontal + + + + + diff --git a/metax/gui/metax_gui/ui_main_window.py b/metax/gui/metax_gui/ui_main_window.py index e2fc9d6..804aa5f 100644 --- a/metax/gui/metax_gui/ui_main_window.py +++ b/metax/gui/metax_gui/ui_main_window.py @@ -1851,1249 +1851,1256 @@ def setupUi(self, metaX_main): self.tab_2.setObjectName("tab_2") self.gridLayout_9 = QtWidgets.QGridLayout(self.tab_2) self.gridLayout_9.setObjectName("gridLayout_9") - self.tabWidget_3 = QtWidgets.QTabWidget(self.tab_2) - self.tabWidget_3.setTabShape(QtWidgets.QTabWidget.Triangular) - self.tabWidget_3.setObjectName("tabWidget_3") - self.tab_3 = QtWidgets.QWidget() - self.tab_3.setObjectName("tab_3") - self.gridLayout_13 = QtWidgets.QGridLayout(self.tab_3) - self.gridLayout_13.setObjectName("gridLayout_13") - self.horizontalLayout_38 = QtWidgets.QHBoxLayout() - self.horizontalLayout_38.setObjectName("horizontalLayout_38") - self.label_36 = QtWidgets.QLabel(self.tab_3) + self.groupBox_cross_heatmap_plot = QtWidgets.QGroupBox(self.tab_2) + self.groupBox_cross_heatmap_plot.setObjectName("groupBox_cross_heatmap_plot") + self.gridLayout_75 = QtWidgets.QGridLayout(self.groupBox_cross_heatmap_plot) + self.gridLayout_75.setObjectName("gridLayout_75") + self.gridLayout_46 = QtWidgets.QGridLayout() + self.gridLayout_46.setObjectName("gridLayout_46") + self.horizontalLayout_13 = QtWidgets.QHBoxLayout() + self.horizontalLayout_13.setObjectName("horizontalLayout_13") + self.label_56 = QtWidgets.QLabel(self.groupBox_cross_heatmap_plot) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_36.sizePolicy().hasHeightForWidth()) - self.label_36.setSizePolicy(sizePolicy) - self.label_36.setObjectName("label_36") - self.horizontalLayout_38.addWidget(self.label_36) - self.comboBox_table_for_ttest = QtWidgets.QComboBox(self.tab_3) - self.comboBox_table_for_ttest.setObjectName("comboBox_table_for_ttest") - self.comboBox_table_for_ttest.addItem("") - self.comboBox_table_for_ttest.addItem("") - self.comboBox_table_for_ttest.addItem("") - self.comboBox_table_for_ttest.addItem("") - self.comboBox_table_for_ttest.addItem("") - self.horizontalLayout_38.addWidget(self.comboBox_table_for_ttest) - self.label_103 = QtWidgets.QLabel(self.tab_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_56.sizePolicy().hasHeightForWidth()) + self.label_56.setSizePolicy(sizePolicy) + self.label_56.setObjectName("label_56") + self.horizontalLayout_13.addWidget(self.label_56) + self.comboBox_top_heatmap_table = QtWidgets.QComboBox(self.groupBox_cross_heatmap_plot) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_103.sizePolicy().hasHeightForWidth()) - self.label_103.setSizePolicy(sizePolicy) - self.label_103.setAlignment(QtCore.Qt.AlignCenter) - self.label_103.setObjectName("label_103") - self.horizontalLayout_38.addWidget(self.label_103) - self.comboBox_ttest_meta = QtWidgets.QComboBox(self.tab_3) - self.comboBox_ttest_meta.setObjectName("comboBox_ttest_meta") - self.horizontalLayout_38.addWidget(self.comboBox_ttest_meta) - self.checkBox_ttest_in_condition = QtWidgets.QCheckBox(self.tab_3) + sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_table.sizePolicy().hasHeightForWidth()) + self.comboBox_top_heatmap_table.setSizePolicy(sizePolicy) + self.comboBox_top_heatmap_table.setObjectName("comboBox_top_heatmap_table") + self.comboBox_top_heatmap_table.addItem("") + self.comboBox_top_heatmap_table.setItemText(0, "") + self.horizontalLayout_13.addWidget(self.comboBox_top_heatmap_table) + self.gridLayout_46.addLayout(self.horizontalLayout_13, 0, 0, 1, 1) + self.pushButton_get_top_cross_table = QtWidgets.QPushButton(self.groupBox_cross_heatmap_plot) + self.pushButton_get_top_cross_table.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_ttest_in_condition.sizePolicy().hasHeightForWidth()) - self.checkBox_ttest_in_condition.setSizePolicy(sizePolicy) - self.checkBox_ttest_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) - self.checkBox_ttest_in_condition.setObjectName("checkBox_ttest_in_condition") - self.horizontalLayout_38.addWidget(self.checkBox_ttest_in_condition) - self.comboBox_ttest_condition_meta = QtWidgets.QComboBox(self.tab_3) - self.comboBox_ttest_condition_meta.setEnabled(False) - self.comboBox_ttest_condition_meta.setObjectName("comboBox_ttest_condition_meta") - self.horizontalLayout_38.addWidget(self.comboBox_ttest_condition_meta) - self.horizontalLayout_70 = QtWidgets.QHBoxLayout() - self.horizontalLayout_70.setObjectName("horizontalLayout_70") - self.comboBox_ttest_condition_group = QtWidgets.QComboBox(self.tab_3) - self.comboBox_ttest_condition_group.setEnabled(False) - self.comboBox_ttest_condition_group.setObjectName("comboBox_ttest_condition_group") - self.horizontalLayout_70.addWidget(self.comboBox_ttest_condition_group) - self.horizontalLayout_38.addLayout(self.horizontalLayout_70) - self.gridLayout_13.addLayout(self.horizontalLayout_38, 2, 0, 1, 2) - self.pushButton_ttest = QtWidgets.QPushButton(self.tab_3) - self.pushButton_ttest.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.pushButton_get_top_cross_table.sizePolicy().hasHeightForWidth()) + self.pushButton_get_top_cross_table.setSizePolicy(sizePolicy) + self.pushButton_get_top_cross_table.setMaximumSize(QtCore.QSize(16777215, 30)) + self.pushButton_get_top_cross_table.setObjectName("pushButton_get_top_cross_table") + self.gridLayout_46.addWidget(self.pushButton_get_top_cross_table, 1, 1, 1, 1) + self.pushButton_plot_top_heatmap = QtWidgets.QPushButton(self.groupBox_cross_heatmap_plot) + self.pushButton_plot_top_heatmap.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_ttest.sizePolicy().hasHeightForWidth()) - self.pushButton_ttest.setSizePolicy(sizePolicy) - self.pushButton_ttest.setObjectName("pushButton_ttest") - self.gridLayout_13.addWidget(self.pushButton_ttest, 9, 0, 1, 2) - self.line_22 = QtWidgets.QFrame(self.tab_3) - self.line_22.setFrameShape(QtWidgets.QFrame.HLine) - self.line_22.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_22.setObjectName("line_22") - self.gridLayout_13.addWidget(self.line_22, 8, 0, 1, 2) - self.line_21 = QtWidgets.QFrame(self.tab_3) - self.line_21.setFrameShape(QtWidgets.QFrame.HLine) - self.line_21.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_21.setObjectName("line_21") - self.gridLayout_13.addWidget(self.line_21, 3, 0, 1, 2) - self.gridLayout_64 = QtWidgets.QGridLayout() - self.gridLayout_64.setObjectName("gridLayout_64") - self.label_52 = QtWidgets.QLabel(self.tab_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.pushButton_plot_top_heatmap.sizePolicy().hasHeightForWidth()) + self.pushButton_plot_top_heatmap.setSizePolicy(sizePolicy) + self.pushButton_plot_top_heatmap.setMaximumSize(QtCore.QSize(16777215, 50)) + self.pushButton_plot_top_heatmap.setAutoDefault(False) + self.pushButton_plot_top_heatmap.setObjectName("pushButton_plot_top_heatmap") + self.gridLayout_46.addWidget(self.pushButton_plot_top_heatmap, 0, 1, 1, 1) + self.checkBox_2 = QtWidgets.QCheckBox(self.groupBox_cross_heatmap_plot) + self.checkBox_2.setObjectName("checkBox_2") + self.gridLayout_46.addWidget(self.checkBox_2, 1, 0, 1, 1) + self.gridLayout_75.addLayout(self.gridLayout_46, 0, 0, 1, 1) + self.groupBox_cross_heatmap_settings = QtWidgets.QGroupBox(self.groupBox_cross_heatmap_plot) + self.groupBox_cross_heatmap_settings.setMaximumSize(QtCore.QSize(16777215, 220)) + self.groupBox_cross_heatmap_settings.setObjectName("groupBox_cross_heatmap_settings") + self.gridLayout_52 = QtWidgets.QGridLayout(self.groupBox_cross_heatmap_settings) + self.gridLayout_52.setObjectName("gridLayout_52") + self.scrollArea_cross_heatmap_settings = QtWidgets.QScrollArea(self.groupBox_cross_heatmap_settings) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_52.sizePolicy().hasHeightForWidth()) - self.label_52.setSizePolicy(sizePolicy) - self.label_52.setObjectName("label_52") - self.gridLayout_64.addWidget(self.label_52, 0, 1, 1, 1) - self.label_42 = QtWidgets.QLabel(self.tab_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.scrollArea_cross_heatmap_settings.sizePolicy().hasHeightForWidth()) + self.scrollArea_cross_heatmap_settings.setSizePolicy(sizePolicy) + self.scrollArea_cross_heatmap_settings.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.scrollArea_cross_heatmap_settings.setWidgetResizable(True) + self.scrollArea_cross_heatmap_settings.setObjectName("scrollArea_cross_heatmap_settings") + self.scrollAreaWidgetContents_3 = QtWidgets.QWidget() + self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 1003, 124)) + self.scrollAreaWidgetContents_3.setObjectName("scrollAreaWidgetContents_3") + self.gridLayout_38 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_3) + self.gridLayout_38.setObjectName("gridLayout_38") + self.gridLayout_51 = QtWidgets.QGridLayout() + self.gridLayout_51.setObjectName("gridLayout_51") + self.label_131 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_42.sizePolicy().hasHeightForWidth()) - self.label_42.setSizePolicy(sizePolicy) - self.label_42.setObjectName("label_42") - self.gridLayout_64.addWidget(self.label_42, 0, 0, 1, 1) - self.comboBox_ttest_group1 = QtWidgets.QComboBox(self.tab_3) + sizePolicy.setHeightForWidth(self.label_131.sizePolicy().hasHeightForWidth()) + self.label_131.setSizePolicy(sizePolicy) + self.label_131.setMinimumSize(QtCore.QSize(0, 0)) + self.label_131.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_131.setObjectName("label_131") + self.gridLayout_51.addWidget(self.label_131, 0, 5, 1, 1) + self.horizontalLayout_17 = QtWidgets.QHBoxLayout() + self.horizontalLayout_17.setObjectName("horizontalLayout_17") + self.checkBox_top_heatmap_rename_taxa = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_ttest_group1.sizePolicy().hasHeightForWidth()) - self.comboBox_ttest_group1.setSizePolicy(sizePolicy) - self.comboBox_ttest_group1.setObjectName("comboBox_ttest_group1") - self.gridLayout_64.addWidget(self.comboBox_ttest_group1, 1, 0, 1, 1) - self.comboBox_ttest_group2 = QtWidgets.QComboBox(self.tab_3) + sizePolicy.setHeightForWidth(self.checkBox_top_heatmap_rename_taxa.sizePolicy().hasHeightForWidth()) + self.checkBox_top_heatmap_rename_taxa.setSizePolicy(sizePolicy) + self.checkBox_top_heatmap_rename_taxa.setLayoutDirection(QtCore.Qt.LeftToRight) + self.checkBox_top_heatmap_rename_taxa.setChecked(True) + self.checkBox_top_heatmap_rename_taxa.setObjectName("checkBox_top_heatmap_rename_taxa") + self.horizontalLayout_17.addWidget(self.checkBox_top_heatmap_rename_taxa) + self.checkBox_top_heatmap_rename_sample = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_ttest_group2.sizePolicy().hasHeightForWidth()) - self.comboBox_ttest_group2.setSizePolicy(sizePolicy) - self.comboBox_ttest_group2.setObjectName("comboBox_ttest_group2") - self.gridLayout_64.addWidget(self.comboBox_ttest_group2, 1, 1, 1, 1) - self.gridLayout_13.addLayout(self.gridLayout_64, 5, 0, 1, 2) - self.tabWidget_3.addTab(self.tab_3, "") - self.tab_7 = QtWidgets.QWidget() - self.tab_7.setObjectName("tab_7") - self.gridLayout_11 = QtWidgets.QGridLayout(self.tab_7) - self.gridLayout_11.setObjectName("gridLayout_11") - self.pushButton_anova_test = QtWidgets.QPushButton(self.tab_7) - self.pushButton_anova_test.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.checkBox_top_heatmap_rename_sample.sizePolicy().hasHeightForWidth()) + self.checkBox_top_heatmap_rename_sample.setSizePolicy(sizePolicy) + self.checkBox_top_heatmap_rename_sample.setLayoutDirection(QtCore.Qt.LeftToRight) + self.checkBox_top_heatmap_rename_sample.setChecked(True) + self.checkBox_top_heatmap_rename_sample.setObjectName("checkBox_top_heatmap_rename_sample") + self.horizontalLayout_17.addWidget(self.checkBox_top_heatmap_rename_sample) + self.gridLayout_51.addLayout(self.horizontalLayout_17, 1, 6, 1, 1) + self.horizontalLayout_19 = QtWidgets.QHBoxLayout() + self.horizontalLayout_19.setObjectName("horizontalLayout_19") + self.label_62 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_anova_test.sizePolicy().hasHeightForWidth()) - self.pushButton_anova_test.setSizePolicy(sizePolicy) - self.pushButton_anova_test.setObjectName("pushButton_anova_test") - self.gridLayout_11.addWidget(self.pushButton_anova_test, 8, 0, 1, 2) - self.line_24 = QtWidgets.QFrame(self.tab_7) - self.line_24.setFrameShape(QtWidgets.QFrame.HLine) - self.line_24.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_24.setObjectName("line_24") - self.gridLayout_11.addWidget(self.line_24, 7, 0, 1, 2) - self.horizontalLayout_37 = QtWidgets.QHBoxLayout() - self.horizontalLayout_37.setObjectName("horizontalLayout_37") - self.label_37 = QtWidgets.QLabel(self.tab_7) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.label_62.sizePolicy().hasHeightForWidth()) + self.label_62.setSizePolicy(sizePolicy) + self.label_62.setMinimumSize(QtCore.QSize(0, 0)) + self.label_62.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_62.setObjectName("label_62") + self.horizontalLayout_19.addWidget(self.label_62) + self.comboBox_top_heatmap_scale = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_37.sizePolicy().hasHeightForWidth()) - self.label_37.setSizePolicy(sizePolicy) - self.label_37.setObjectName("label_37") - self.horizontalLayout_37.addWidget(self.label_37) - self.comboBox_table_for_anova = QtWidgets.QComboBox(self.tab_7) - self.comboBox_table_for_anova.setObjectName("comboBox_table_for_anova") - self.comboBox_table_for_anova.addItem("") - self.comboBox_table_for_anova.addItem("") - self.comboBox_table_for_anova.addItem("") - self.comboBox_table_for_anova.addItem("") - self.comboBox_table_for_anova.addItem("") - self.horizontalLayout_37.addWidget(self.comboBox_table_for_anova) - self.label_104 = QtWidgets.QLabel(self.tab_7) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_scale.sizePolicy().hasHeightForWidth()) + self.comboBox_top_heatmap_scale.setSizePolicy(sizePolicy) + self.comboBox_top_heatmap_scale.setMinimumSize(QtCore.QSize(0, 0)) + self.comboBox_top_heatmap_scale.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.comboBox_top_heatmap_scale.setObjectName("comboBox_top_heatmap_scale") + self.comboBox_top_heatmap_scale.addItem("") + self.comboBox_top_heatmap_scale.addItem("") + self.comboBox_top_heatmap_scale.addItem("") + self.horizontalLayout_19.addWidget(self.comboBox_top_heatmap_scale) + self.gridLayout_51.addLayout(self.horizontalLayout_19, 1, 1, 1, 1) + self.horizontalLayout_21 = QtWidgets.QHBoxLayout() + self.horizontalLayout_21.setObjectName("horizontalLayout_21") + self.label_38 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_104.sizePolicy().hasHeightForWidth()) - self.label_104.setSizePolicy(sizePolicy) - self.label_104.setObjectName("label_104") - self.horizontalLayout_37.addWidget(self.label_104) - self.comboBox_anova_meta = QtWidgets.QComboBox(self.tab_7) - self.comboBox_anova_meta.setObjectName("comboBox_anova_meta") - self.horizontalLayout_37.addWidget(self.comboBox_anova_meta) - self.checkBox_anova_in_condition = QtWidgets.QCheckBox(self.tab_7) - self.checkBox_anova_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) - self.checkBox_anova_in_condition.setObjectName("checkBox_anova_in_condition") - self.horizontalLayout_37.addWidget(self.checkBox_anova_in_condition) - self.comboBox_anova_condition_meta = QtWidgets.QComboBox(self.tab_7) - self.comboBox_anova_condition_meta.setEnabled(False) - self.comboBox_anova_condition_meta.setObjectName("comboBox_anova_condition_meta") - self.horizontalLayout_37.addWidget(self.comboBox_anova_condition_meta) - self.horizontalLayout_71 = QtWidgets.QHBoxLayout() - self.horizontalLayout_71.setObjectName("horizontalLayout_71") - self.comboBox_anova_condition_group = QtWidgets.QComboBox(self.tab_7) - self.comboBox_anova_condition_group.setEnabled(False) - self.comboBox_anova_condition_group.setObjectName("comboBox_anova_condition_group") - self.horizontalLayout_71.addWidget(self.comboBox_anova_condition_group) - self.horizontalLayout_37.addLayout(self.horizontalLayout_71) - self.gridLayout_11.addLayout(self.horizontalLayout_37, 1, 0, 1, 2) - self.horizontalLayout_anova_group = QtWidgets.QHBoxLayout() - self.horizontalLayout_anova_group.setObjectName("horizontalLayout_anova_group") - self.gridLayout_11.addLayout(self.horizontalLayout_anova_group, 3, 1, 1, 1) - self.label_53 = QtWidgets.QLabel(self.tab_7) + sizePolicy.setHeightForWidth(self.label_38.sizePolicy().hasHeightForWidth()) + self.label_38.setSizePolicy(sizePolicy) + self.label_38.setMinimumSize(QtCore.QSize(0, 0)) + self.label_38.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_38.setObjectName("label_38") + self.horizontalLayout_21.addWidget(self.label_38) + self.comboBox_top_heatmap_cmap = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_53.sizePolicy().hasHeightForWidth()) - self.label_53.setSizePolicy(sizePolicy) - self.label_53.setObjectName("label_53") - self.gridLayout_11.addWidget(self.label_53, 3, 0, 1, 1) - self.line_23 = QtWidgets.QFrame(self.tab_7) - self.line_23.setFrameShape(QtWidgets.QFrame.HLine) - self.line_23.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_23.setObjectName("line_23") - self.gridLayout_11.addWidget(self.line_23, 2, 0, 1, 2) - self.tabWidget_3.addTab(self.tab_7, "") - self.tab_16 = QtWidgets.QWidget() - self.tab_16.setObjectName("tab_16") - self.gridLayout_33 = QtWidgets.QGridLayout(self.tab_16) - self.gridLayout_33.setObjectName("gridLayout_33") - self.line_25 = QtWidgets.QFrame(self.tab_16) - self.line_25.setFrameShape(QtWidgets.QFrame.HLine) - self.line_25.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_25.setObjectName("line_25") - self.gridLayout_33.addWidget(self.line_25, 3, 1, 1, 2) - self.pushButton_dunnett_test = QtWidgets.QPushButton(self.tab_16) - self.pushButton_dunnett_test.setEnabled(False) - self.pushButton_dunnett_test.setObjectName("pushButton_dunnett_test") - self.gridLayout_33.addWidget(self.pushButton_dunnett_test, 10, 1, 1, 2) - self.horizontalLayout_39 = QtWidgets.QHBoxLayout() - self.horizontalLayout_39.setObjectName("horizontalLayout_39") - self.label_112 = QtWidgets.QLabel(self.tab_16) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_112.sizePolicy().hasHeightForWidth()) - self.label_112.setSizePolicy(sizePolicy) - self.label_112.setObjectName("label_112") - self.horizontalLayout_39.addWidget(self.label_112) - self.comboBox_table_for_dunnett = QtWidgets.QComboBox(self.tab_16) - self.comboBox_table_for_dunnett.setObjectName("comboBox_table_for_dunnett") - self.comboBox_table_for_dunnett.addItem("") - self.comboBox_table_for_dunnett.addItem("") - self.comboBox_table_for_dunnett.addItem("") - self.comboBox_table_for_dunnett.addItem("") - self.horizontalLayout_39.addWidget(self.comboBox_table_for_dunnett) - self.label_113 = QtWidgets.QLabel(self.tab_16) + sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_cmap.sizePolicy().hasHeightForWidth()) + self.comboBox_top_heatmap_cmap.setSizePolicy(sizePolicy) + self.comboBox_top_heatmap_cmap.setMinimumSize(QtCore.QSize(0, 0)) + self.comboBox_top_heatmap_cmap.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.comboBox_top_heatmap_cmap.setObjectName("comboBox_top_heatmap_cmap") + self.horizontalLayout_21.addWidget(self.comboBox_top_heatmap_cmap) + self.gridLayout_51.addLayout(self.horizontalLayout_21, 1, 2, 1, 1) + self.label_153 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + self.label_153.setMinimumSize(QtCore.QSize(0, 0)) + self.label_153.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_153.setObjectName("label_153") + self.gridLayout_51.addWidget(self.label_153, 1, 5, 1, 1) + self.horizontalLayout_23 = QtWidgets.QHBoxLayout() + self.horizontalLayout_23.setObjectName("horizontalLayout_23") + self.label_109 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_113.sizePolicy().hasHeightForWidth()) - self.label_113.setSizePolicy(sizePolicy) - self.label_113.setObjectName("label_113") - self.horizontalLayout_39.addWidget(self.label_113) - self.comboBox_dunnett_meta = QtWidgets.QComboBox(self.tab_16) - self.comboBox_dunnett_meta.setObjectName("comboBox_dunnett_meta") - self.horizontalLayout_39.addWidget(self.comboBox_dunnett_meta) - self.checkBox_group_control_in_condition = QtWidgets.QCheckBox(self.tab_16) - self.checkBox_group_control_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) - self.checkBox_group_control_in_condition.setObjectName("checkBox_group_control_in_condition") - self.horizontalLayout_39.addWidget(self.checkBox_group_control_in_condition) - self.comboBox_group_control_condition_meta = QtWidgets.QComboBox(self.tab_16) - self.comboBox_group_control_condition_meta.setEnabled(False) - self.comboBox_group_control_condition_meta.setObjectName("comboBox_group_control_condition_meta") - self.horizontalLayout_39.addWidget(self.comboBox_group_control_condition_meta) - self.horizontalLayout_73 = QtWidgets.QHBoxLayout() - self.horizontalLayout_73.setObjectName("horizontalLayout_73") - self.comboBox_group_control_condition_group = QtWidgets.QComboBox(self.tab_16) - self.comboBox_group_control_condition_group.setEnabled(False) - self.comboBox_group_control_condition_group.setObjectName("comboBox_group_control_condition_group") - self.horizontalLayout_73.addWidget(self.comboBox_group_control_condition_group) - self.horizontalLayout_39.addLayout(self.horizontalLayout_73) - self.gridLayout_33.addLayout(self.horizontalLayout_39, 1, 1, 1, 2) - self.line_26 = QtWidgets.QFrame(self.tab_16) - self.line_26.setFrameShape(QtWidgets.QFrame.HLine) - self.line_26.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_26.setObjectName("line_26") - self.gridLayout_33.addWidget(self.line_26, 9, 1, 1, 2) - self.pushButton_multi_deseq2 = QtWidgets.QPushButton(self.tab_16) - self.pushButton_multi_deseq2.setEnabled(False) - self.pushButton_multi_deseq2.setObjectName("pushButton_multi_deseq2") - self.gridLayout_33.addWidget(self.pushButton_multi_deseq2, 11, 1, 1, 2) - self.gridLayout_72 = QtWidgets.QGridLayout() - self.gridLayout_72.setObjectName("gridLayout_72") - self.horizontalLayout_dunnett_group = QtWidgets.QHBoxLayout() - self.horizontalLayout_dunnett_group.setObjectName("horizontalLayout_dunnett_group") - self.gridLayout_72.addLayout(self.horizontalLayout_dunnett_group, 1, 1, 1, 1) - self.label_114 = QtWidgets.QLabel(self.tab_16) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_114.sizePolicy().hasHeightForWidth()) - self.label_114.setSizePolicy(sizePolicy) - self.label_114.setObjectName("label_114") - self.gridLayout_72.addWidget(self.label_114, 0, 1, 1, 1) - self.comboBox_dunnett_control_group = QtWidgets.QComboBox(self.tab_16) - self.comboBox_dunnett_control_group.setObjectName("comboBox_dunnett_control_group") - self.gridLayout_72.addWidget(self.comboBox_dunnett_control_group, 1, 0, 1, 1) - self.label_115 = QtWidgets.QLabel(self.tab_16) - self.label_115.setObjectName("label_115") - self.gridLayout_72.addWidget(self.label_115, 0, 0, 1, 1) - self.checkBox_comparing_group_control_in_condition = QtWidgets.QCheckBox(self.tab_16) + sizePolicy.setHeightForWidth(self.label_109.sizePolicy().hasHeightForWidth()) + self.label_109.setSizePolicy(sizePolicy) + self.label_109.setMinimumSize(QtCore.QSize(0, 0)) + self.label_109.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_109.setObjectName("label_109") + self.horizontalLayout_23.addWidget(self.label_109) + self.spinBox_top_heatmap_label_font_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_comparing_group_control_in_condition.sizePolicy().hasHeightForWidth()) - self.checkBox_comparing_group_control_in_condition.setSizePolicy(sizePolicy) - self.checkBox_comparing_group_control_in_condition.setObjectName("checkBox_comparing_group_control_in_condition") - self.gridLayout_72.addWidget(self.checkBox_comparing_group_control_in_condition, 2, 0, 1, 1) - self.horizontalLayout_24 = QtWidgets.QHBoxLayout() - self.horizontalLayout_24.setObjectName("horizontalLayout_24") - self.label_140 = QtWidgets.QLabel(self.tab_16) + sizePolicy.setHeightForWidth(self.spinBox_top_heatmap_label_font_size.sizePolicy().hasHeightForWidth()) + self.spinBox_top_heatmap_label_font_size.setSizePolicy(sizePolicy) + self.spinBox_top_heatmap_label_font_size.setMinimumSize(QtCore.QSize(0, 0)) + self.spinBox_top_heatmap_label_font_size.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.spinBox_top_heatmap_label_font_size.setMinimum(1) + self.spinBox_top_heatmap_label_font_size.setMaximum(999) + self.spinBox_top_heatmap_label_font_size.setSingleStep(1) + self.spinBox_top_heatmap_label_font_size.setProperty("value", 10) + self.spinBox_top_heatmap_label_font_size.setObjectName("spinBox_top_heatmap_label_font_size") + self.horizontalLayout_23.addWidget(self.spinBox_top_heatmap_label_font_size) + self.gridLayout_51.addLayout(self.horizontalLayout_23, 0, 3, 1, 1) + self.horizontalLayout_18 = QtWidgets.QHBoxLayout() + self.horizontalLayout_18.setObjectName("horizontalLayout_18") + self.label_60 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_140.sizePolicy().hasHeightForWidth()) - self.label_140.setSizePolicy(sizePolicy) - self.label_140.setObjectName("label_140") - self.horizontalLayout_24.addWidget(self.label_140) - self.comboBox_group_control_comparing_each_condition_meta = QtWidgets.QComboBox(self.tab_16) - self.comboBox_group_control_comparing_each_condition_meta.setEnabled(False) - self.comboBox_group_control_comparing_each_condition_meta.setObjectName("comboBox_group_control_comparing_each_condition_meta") - self.horizontalLayout_24.addWidget(self.comboBox_group_control_comparing_each_condition_meta) - self.gridLayout_72.addLayout(self.horizontalLayout_24, 2, 1, 1, 1) - self.gridLayout_33.addLayout(self.gridLayout_72, 4, 1, 1, 2) - self.tabWidget_3.addTab(self.tab_16, "") - self.tab_19 = QtWidgets.QWidget() - self.tab_19.setObjectName("tab_19") - self.gridLayout_16 = QtWidgets.QGridLayout(self.tab_19) - self.gridLayout_16.setObjectName("gridLayout_16") - self.label_166 = QtWidgets.QLabel(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_166.sizePolicy().hasHeightForWidth()) - self.label_166.setSizePolicy(sizePolicy) - self.label_166.setObjectName("label_166") - self.gridLayout_16.addWidget(self.label_166, 3, 0, 1, 1) - self.pushButton_deseq2 = QtWidgets.QPushButton(self.tab_19) - self.pushButton_deseq2.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) + sizePolicy.setHeightForWidth(self.label_60.sizePolicy().hasHeightForWidth()) + self.label_60.setSizePolicy(sizePolicy) + self.label_60.setMinimumSize(QtCore.QSize(0, 0)) + self.label_60.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_60.setObjectName("label_60") + self.horizontalLayout_18.addWidget(self.label_60) + self.spinBox_top_heatmap_length = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_deseq2.sizePolicy().hasHeightForWidth()) - self.pushButton_deseq2.setSizePolicy(sizePolicy) - self.pushButton_deseq2.setMinimumSize(QtCore.QSize(33, 0)) - self.pushButton_deseq2.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.pushButton_deseq2.setObjectName("pushButton_deseq2") - self.gridLayout_16.addWidget(self.pushButton_deseq2, 5, 0, 1, 3) - self.horizontalLayout_40 = QtWidgets.QHBoxLayout() - self.horizontalLayout_40.setObjectName("horizontalLayout_40") - self.checkBox_deseq2_comparing_in_condition = QtWidgets.QCheckBox(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.spinBox_top_heatmap_length.sizePolicy().hasHeightForWidth()) + self.spinBox_top_heatmap_length.setSizePolicy(sizePolicy) + self.spinBox_top_heatmap_length.setMinimumSize(QtCore.QSize(0, 0)) + self.spinBox_top_heatmap_length.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.spinBox_top_heatmap_length.setMinimum(1) + self.spinBox_top_heatmap_length.setMaximum(9999) + self.spinBox_top_heatmap_length.setProperty("value", 9) + self.spinBox_top_heatmap_length.setObjectName("spinBox_top_heatmap_length") + self.horizontalLayout_18.addWidget(self.spinBox_top_heatmap_length) + self.gridLayout_51.addLayout(self.horizontalLayout_18, 0, 2, 1, 1) + self.horizontalLayout_15 = QtWidgets.QHBoxLayout() + self.horizontalLayout_15.setObjectName("horizontalLayout_15") + self.checkBox_top_heatmap_show_all_labels_x = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_deseq2_comparing_in_condition.sizePolicy().hasHeightForWidth()) - self.checkBox_deseq2_comparing_in_condition.setSizePolicy(sizePolicy) - self.checkBox_deseq2_comparing_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) - self.checkBox_deseq2_comparing_in_condition.setObjectName("checkBox_deseq2_comparing_in_condition") - self.horizontalLayout_40.addWidget(self.checkBox_deseq2_comparing_in_condition) - self.comboBox_deseq2_condition_meta = QtWidgets.QComboBox(self.tab_19) - self.comboBox_deseq2_condition_meta.setEnabled(False) + sizePolicy.setHeightForWidth(self.checkBox_top_heatmap_show_all_labels_x.sizePolicy().hasHeightForWidth()) + self.checkBox_top_heatmap_show_all_labels_x.setSizePolicy(sizePolicy) + self.checkBox_top_heatmap_show_all_labels_x.setLayoutDirection(QtCore.Qt.LeftToRight) + self.checkBox_top_heatmap_show_all_labels_x.setObjectName("checkBox_top_heatmap_show_all_labels_x") + self.horizontalLayout_15.addWidget(self.checkBox_top_heatmap_show_all_labels_x) + self.checkBox_top_heatmap_show_all_labels_y = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_condition_meta.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_condition_meta.setSizePolicy(sizePolicy) - self.comboBox_deseq2_condition_meta.setObjectName("comboBox_deseq2_condition_meta") - self.horizontalLayout_40.addWidget(self.comboBox_deseq2_condition_meta) - self.horizontalLayout_75 = QtWidgets.QHBoxLayout() - self.horizontalLayout_75.setObjectName("horizontalLayout_75") - self.comboBox_deseq2_condition_group = QtWidgets.QComboBox(self.tab_19) - self.comboBox_deseq2_condition_group.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.checkBox_top_heatmap_show_all_labels_y.sizePolicy().hasHeightForWidth()) + self.checkBox_top_heatmap_show_all_labels_y.setSizePolicy(sizePolicy) + self.checkBox_top_heatmap_show_all_labels_y.setLayoutDirection(QtCore.Qt.LeftToRight) + self.checkBox_top_heatmap_show_all_labels_y.setObjectName("checkBox_top_heatmap_show_all_labels_y") + self.horizontalLayout_15.addWidget(self.checkBox_top_heatmap_show_all_labels_y) + self.gridLayout_51.addLayout(self.horizontalLayout_15, 0, 6, 1, 1) + self.label_181 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_condition_group.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_condition_group.setSizePolicy(sizePolicy) - self.comboBox_deseq2_condition_group.setObjectName("comboBox_deseq2_condition_group") - self.horizontalLayout_75.addWidget(self.comboBox_deseq2_condition_group) - self.horizontalLayout_40.addLayout(self.horizontalLayout_75) - self.gridLayout_16.addLayout(self.horizontalLayout_40, 0, 2, 1, 1) - self.horizontalLayout_22 = QtWidgets.QHBoxLayout() - self.horizontalLayout_22.setObjectName("horizontalLayout_22") - self.label_2 = QtWidgets.QLabel(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_181.sizePolicy().hasHeightForWidth()) + self.label_181.setSizePolicy(sizePolicy) + self.label_181.setMinimumSize(QtCore.QSize(0, 0)) + self.label_181.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_181.setFont(font) + self.label_181.setObjectName("label_181") + self.gridLayout_51.addWidget(self.label_181, 3, 0, 1, 1) + self.label_182 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + self.label_182.setMinimumSize(QtCore.QSize(0, 0)) + self.label_182.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_182.setFont(font) + self.label_182.setObjectName("label_182") + self.gridLayout_51.addWidget(self.label_182, 0, 0, 1, 1) + self.horizontalLayout_16 = QtWidgets.QHBoxLayout() + self.horizontalLayout_16.setObjectName("horizontalLayout_16") + self.label_59 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) - self.label_2.setSizePolicy(sizePolicy) - self.label_2.setObjectName("label_2") - self.horizontalLayout_22.addWidget(self.label_2) - self.comboBox_deseq2_group1 = QtWidgets.QComboBox(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_59.sizePolicy().hasHeightForWidth()) + self.label_59.setSizePolicy(sizePolicy) + self.label_59.setMinimumSize(QtCore.QSize(0, 0)) + self.label_59.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_59.setObjectName("label_59") + self.horizontalLayout_16.addWidget(self.label_59) + self.spinBox_top_heatmap_width = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_group1.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_group1.setSizePolicy(sizePolicy) - self.comboBox_deseq2_group1.setObjectName("comboBox_deseq2_group1") - self.horizontalLayout_22.addWidget(self.comboBox_deseq2_group1) - self.label_3 = QtWidgets.QLabel(self.tab_19) + sizePolicy.setHeightForWidth(self.spinBox_top_heatmap_width.sizePolicy().hasHeightForWidth()) + self.spinBox_top_heatmap_width.setSizePolicy(sizePolicy) + self.spinBox_top_heatmap_width.setMinimumSize(QtCore.QSize(0, 0)) + self.spinBox_top_heatmap_width.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.spinBox_top_heatmap_width.setMinimum(1) + self.spinBox_top_heatmap_width.setMaximum(9999) + self.spinBox_top_heatmap_width.setSingleStep(1) + self.spinBox_top_heatmap_width.setProperty("value", 16) + self.spinBox_top_heatmap_width.setObjectName("spinBox_top_heatmap_width") + self.horizontalLayout_16.addWidget(self.spinBox_top_heatmap_width) + self.gridLayout_51.addLayout(self.horizontalLayout_16, 0, 1, 1, 1) + self.horizontalLayout_86 = QtWidgets.QHBoxLayout() + self.horizontalLayout_86.setObjectName("horizontalLayout_86") + self.label_57 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) - self.label_3.setSizePolicy(sizePolicy) - self.label_3.setObjectName("label_3") - self.horizontalLayout_22.addWidget(self.label_3) - self.comboBox_deseq2_group2 = QtWidgets.QComboBox(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_57.sizePolicy().hasHeightForWidth()) + self.label_57.setSizePolicy(sizePolicy) + self.label_57.setMinimumSize(QtCore.QSize(0, 0)) + self.label_57.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_57.setObjectName("label_57") + self.horizontalLayout_86.addWidget(self.label_57) + self.comboBox_top_heatmap_sort_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_group2.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_group2.setSizePolicy(sizePolicy) - self.comboBox_deseq2_group2.setObjectName("comboBox_deseq2_group2") - self.horizontalLayout_22.addWidget(self.comboBox_deseq2_group2) - self.gridLayout_16.addLayout(self.horizontalLayout_22, 3, 1, 1, 2) - self.line_14 = QtWidgets.QFrame(self.tab_19) - self.line_14.setFrameShape(QtWidgets.QFrame.HLine) - self.line_14.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_14.setObjectName("line_14") - self.gridLayout_16.addWidget(self.line_14, 4, 0, 1, 3) - self.horizontalLayout_61 = QtWidgets.QHBoxLayout() - self.horizontalLayout_61.setObjectName("horizontalLayout_61") - self.comboBox_table_for_deseq2 = QtWidgets.QComboBox(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_sort_type.sizePolicy().hasHeightForWidth()) + self.comboBox_top_heatmap_sort_type.setSizePolicy(sizePolicy) + self.comboBox_top_heatmap_sort_type.setMinimumSize(QtCore.QSize(0, 0)) + self.comboBox_top_heatmap_sort_type.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.comboBox_top_heatmap_sort_type.setObjectName("comboBox_top_heatmap_sort_type") + self.comboBox_top_heatmap_sort_type.addItem("") + self.comboBox_top_heatmap_sort_type.addItem("") + self.comboBox_top_heatmap_sort_type.addItem("") + self.horizontalLayout_86.addWidget(self.comboBox_top_heatmap_sort_type) + self.gridLayout_51.addLayout(self.horizontalLayout_86, 1, 3, 1, 1) + self.label_180 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_table_for_deseq2.sizePolicy().hasHeightForWidth()) - self.comboBox_table_for_deseq2.setSizePolicy(sizePolicy) - self.comboBox_table_for_deseq2.setObjectName("comboBox_table_for_deseq2") - self.comboBox_table_for_deseq2.addItem("") - self.comboBox_table_for_deseq2.addItem("") - self.comboBox_table_for_deseq2.addItem("") - self.comboBox_table_for_deseq2.addItem("") - self.horizontalLayout_61.addWidget(self.comboBox_table_for_deseq2) - self.label_147 = QtWidgets.QLabel(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.label_180.sizePolicy().hasHeightForWidth()) + self.label_180.setSizePolicy(sizePolicy) + self.label_180.setMinimumSize(QtCore.QSize(0, 0)) + self.label_180.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_180.setFont(font) + self.label_180.setObjectName("label_180") + self.gridLayout_51.addWidget(self.label_180, 2, 0, 1, 1) + self.horizontalLayout_93 = QtWidgets.QHBoxLayout() + self.horizontalLayout_93.setObjectName("horizontalLayout_93") + self.label_30 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + self.label_30.setObjectName("label_30") + self.horizontalLayout_93.addWidget(self.label_30) + self.doubleSpinBox_top_heatmap_pvalue = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.doubleSpinBox_top_heatmap_pvalue.sizePolicy().hasHeightForWidth()) + self.doubleSpinBox_top_heatmap_pvalue.setSizePolicy(sizePolicy) + self.doubleSpinBox_top_heatmap_pvalue.setMinimumSize(QtCore.QSize(0, 0)) + self.doubleSpinBox_top_heatmap_pvalue.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.doubleSpinBox_top_heatmap_pvalue.setDecimals(4) + self.doubleSpinBox_top_heatmap_pvalue.setMaximum(1.0) + self.doubleSpinBox_top_heatmap_pvalue.setSingleStep(0.01) + self.doubleSpinBox_top_heatmap_pvalue.setProperty("value", 0.05) + self.doubleSpinBox_top_heatmap_pvalue.setObjectName("doubleSpinBox_top_heatmap_pvalue") + self.horizontalLayout_93.addWidget(self.doubleSpinBox_top_heatmap_pvalue) + self.gridLayout_51.addLayout(self.horizontalLayout_93, 1, 4, 1, 1) + self.horizontalLayout_84 = QtWidgets.QHBoxLayout() + self.horizontalLayout_84.setObjectName("horizontalLayout_84") + self.checkBox_cross_heatmap_row_cluster = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_147.sizePolicy().hasHeightForWidth()) - self.label_147.setSizePolicy(sizePolicy) - self.label_147.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_147.setObjectName("label_147") - self.horizontalLayout_61.addWidget(self.label_147) - self.comboBox_deseq2_meta = QtWidgets.QComboBox(self.tab_19) + sizePolicy.setHeightForWidth(self.checkBox_cross_heatmap_row_cluster.sizePolicy().hasHeightForWidth()) + self.checkBox_cross_heatmap_row_cluster.setSizePolicy(sizePolicy) + self.checkBox_cross_heatmap_row_cluster.setMinimumSize(QtCore.QSize(0, 0)) + self.checkBox_cross_heatmap_row_cluster.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.checkBox_cross_heatmap_row_cluster.setChecked(True) + self.checkBox_cross_heatmap_row_cluster.setObjectName("checkBox_cross_heatmap_row_cluster") + self.horizontalLayout_84.addWidget(self.checkBox_cross_heatmap_row_cluster) + self.checkBox_cross_heatmap_col_cluster = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_meta.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_meta.setSizePolicy(sizePolicy) - self.comboBox_deseq2_meta.setObjectName("comboBox_deseq2_meta") - self.horizontalLayout_61.addWidget(self.comboBox_deseq2_meta) - self.gridLayout_16.addLayout(self.horizontalLayout_61, 0, 1, 1, 1) - self.line = QtWidgets.QFrame(self.tab_19) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout_16.addWidget(self.line, 1, 0, 1, 3) - self.label_4 = QtWidgets.QLabel(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.checkBox_cross_heatmap_col_cluster.sizePolicy().hasHeightForWidth()) + self.checkBox_cross_heatmap_col_cluster.setSizePolicy(sizePolicy) + self.checkBox_cross_heatmap_col_cluster.setMinimumSize(QtCore.QSize(0, 0)) + self.checkBox_cross_heatmap_col_cluster.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.checkBox_cross_heatmap_col_cluster.setChecked(True) + self.checkBox_cross_heatmap_col_cluster.setObjectName("checkBox_cross_heatmap_col_cluster") + self.horizontalLayout_84.addWidget(self.checkBox_cross_heatmap_col_cluster) + self.gridLayout_51.addLayout(self.horizontalLayout_84, 0, 4, 1, 1) + self.label_138 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) - self.label_4.setSizePolicy(sizePolicy) - self.label_4.setObjectName("label_4") - self.gridLayout_16.addWidget(self.label_4, 0, 0, 1, 1) - self.groupBox = QtWidgets.QGroupBox(self.tab_19) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) + sizePolicy.setHeightForWidth(self.label_138.sizePolicy().hasHeightForWidth()) + self.label_138.setSizePolicy(sizePolicy) + self.label_138.setMinimumSize(QtCore.QSize(0, 0)) + self.label_138.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_138.setObjectName("label_138") + self.gridLayout_51.addWidget(self.label_138, 3, 1, 1, 1) + self.horizontalLayout_12 = QtWidgets.QHBoxLayout() + self.horizontalLayout_12.setObjectName("horizontalLayout_12") + self.doubleSpinBox_mini_log2fc_heatmap = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_3) + self.doubleSpinBox_mini_log2fc_heatmap.setEnabled(False) + self.doubleSpinBox_mini_log2fc_heatmap.setMinimumSize(QtCore.QSize(0, 0)) + self.doubleSpinBox_mini_log2fc_heatmap.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.doubleSpinBox_mini_log2fc_heatmap.setProperty("showGroupSeparator", False) + self.doubleSpinBox_mini_log2fc_heatmap.setDecimals(3) + self.doubleSpinBox_mini_log2fc_heatmap.setMinimum(0.0) + self.doubleSpinBox_mini_log2fc_heatmap.setProperty("value", 1.0) + self.doubleSpinBox_mini_log2fc_heatmap.setObjectName("doubleSpinBox_mini_log2fc_heatmap") + self.horizontalLayout_12.addWidget(self.doubleSpinBox_mini_log2fc_heatmap) + self.label_139 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) - self.groupBox.setSizePolicy(sizePolicy) - self.groupBox.setMinimumSize(QtCore.QSize(0, 0)) - self.groupBox.setMaximumSize(QtCore.QSize(16777215, 400)) - self.groupBox.setObjectName("groupBox") - self.gridLayout_55 = QtWidgets.QGridLayout(self.groupBox) - self.gridLayout_55.setObjectName("gridLayout_55") - self.pushButton_deseq2_plot_sankey = QtWidgets.QPushButton(self.groupBox) - self.pushButton_deseq2_plot_sankey.setEnabled(False) + sizePolicy.setHeightForWidth(self.label_139.sizePolicy().hasHeightForWidth()) + self.label_139.setSizePolicy(sizePolicy) + self.label_139.setMinimumSize(QtCore.QSize(0, 0)) + self.label_139.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_139.setObjectName("label_139") + self.horizontalLayout_12.addWidget(self.label_139) + self.doubleSpinBox_max_log2fc_heatmap = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_3) + self.doubleSpinBox_max_log2fc_heatmap.setEnabled(False) + self.doubleSpinBox_max_log2fc_heatmap.setMinimumSize(QtCore.QSize(0, 0)) + self.doubleSpinBox_max_log2fc_heatmap.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.doubleSpinBox_max_log2fc_heatmap.setDecimals(3) + self.doubleSpinBox_max_log2fc_heatmap.setProperty("value", 30.0) + self.doubleSpinBox_max_log2fc_heatmap.setObjectName("doubleSpinBox_max_log2fc_heatmap") + self.horizontalLayout_12.addWidget(self.doubleSpinBox_max_log2fc_heatmap) + self.gridLayout_51.addLayout(self.horizontalLayout_12, 3, 2, 1, 1) + self.spinBox_top_heatmap_number = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_deseq2_plot_sankey.sizePolicy().hasHeightForWidth()) - self.pushButton_deseq2_plot_sankey.setSizePolicy(sizePolicy) - self.pushButton_deseq2_plot_sankey.setObjectName("pushButton_deseq2_plot_sankey") - self.gridLayout_55.addWidget(self.pushButton_deseq2_plot_sankey, 1, 1, 1, 1) - self.checkBox_3 = QtWidgets.QCheckBox(self.groupBox) - self.checkBox_3.setObjectName("checkBox_3") - self.gridLayout_55.addWidget(self.checkBox_3, 1, 0, 1, 1) - self.pushButton_deseq2_plot_vocano = QtWidgets.QPushButton(self.groupBox) - self.pushButton_deseq2_plot_vocano.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.spinBox_top_heatmap_number.sizePolicy().hasHeightForWidth()) + self.spinBox_top_heatmap_number.setSizePolicy(sizePolicy) + self.spinBox_top_heatmap_number.setMinimumSize(QtCore.QSize(0, 0)) + self.spinBox_top_heatmap_number.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.spinBox_top_heatmap_number.setMinimum(1) + self.spinBox_top_heatmap_number.setMaximum(9999) + self.spinBox_top_heatmap_number.setProperty("value", 100) + self.spinBox_top_heatmap_number.setObjectName("spinBox_top_heatmap_number") + self.gridLayout_51.addWidget(self.spinBox_top_heatmap_number, 2, 2, 1, 1) + self.label_58 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_deseq2_plot_vocano.sizePolicy().hasHeightForWidth()) - self.pushButton_deseq2_plot_vocano.setSizePolicy(sizePolicy) - self.pushButton_deseq2_plot_vocano.setObjectName("pushButton_deseq2_plot_vocano") - self.gridLayout_55.addWidget(self.pushButton_deseq2_plot_vocano, 0, 1, 1, 1) - self.horizontalLayout_92 = QtWidgets.QHBoxLayout() - self.horizontalLayout_92.setObjectName("horizontalLayout_92") - self.label_64 = QtWidgets.QLabel(self.groupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_58.sizePolicy().hasHeightForWidth()) + self.label_58.setSizePolicy(sizePolicy) + self.label_58.setMinimumSize(QtCore.QSize(0, 0)) + self.label_58.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_58.setObjectName("label_58") + self.gridLayout_51.addWidget(self.label_58, 2, 1, 1, 1) + self.label_141 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_64.sizePolicy().hasHeightForWidth()) - self.label_64.setSizePolicy(sizePolicy) - self.label_64.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_64.setObjectName("label_64") - self.horizontalLayout_92.addWidget(self.label_64) - self.comboBox_deseq2_tables = QtWidgets.QComboBox(self.groupBox) + sizePolicy.setHeightForWidth(self.label_141.sizePolicy().hasHeightForWidth()) + self.label_141.setSizePolicy(sizePolicy) + self.label_141.setMinimumSize(QtCore.QSize(0, 0)) + self.label_141.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_141.setObjectName("label_141") + self.gridLayout_51.addWidget(self.label_141, 3, 3, 1, 1) + self.comboBox_cross_3_level_plot_df_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) + self.comboBox_cross_3_level_plot_df_type.setEnabled(False) + self.comboBox_cross_3_level_plot_df_type.setMinimumSize(QtCore.QSize(0, 0)) + self.comboBox_cross_3_level_plot_df_type.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.comboBox_cross_3_level_plot_df_type.setObjectName("comboBox_cross_3_level_plot_df_type") + self.comboBox_cross_3_level_plot_df_type.addItem("") + self.comboBox_cross_3_level_plot_df_type.addItem("") + self.comboBox_cross_3_level_plot_df_type.addItem("") + self.gridLayout_51.addWidget(self.comboBox_cross_3_level_plot_df_type, 3, 4, 1, 1) + self.checkBox_cross_3_level_plot_remove_zero_col = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_tables.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_tables.setSizePolicy(sizePolicy) - self.comboBox_deseq2_tables.setObjectName("comboBox_deseq2_tables") - self.horizontalLayout_92.addWidget(self.comboBox_deseq2_tables) - self.gridLayout_55.addLayout(self.horizontalLayout_92, 0, 0, 1, 1) - self.groupBox_deseq2_plot_settings = QtWidgets.QGroupBox(self.groupBox) - self.groupBox_deseq2_plot_settings.setMaximumSize(QtCore.QSize(16777215, 220)) - self.groupBox_deseq2_plot_settings.setObjectName("groupBox_deseq2_plot_settings") - self.gridLayout_48 = QtWidgets.QGridLayout(self.groupBox_deseq2_plot_settings) - self.gridLayout_48.setObjectName("gridLayout_48") - self.scrollArea_3 = QtWidgets.QScrollArea(self.groupBox_deseq2_plot_settings) - self.scrollArea_3.setWidgetResizable(True) - self.scrollArea_3.setObjectName("scrollArea_3") - self.scrollAreaWidgetContents_4 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 996, 70)) - self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4") - self.gridLayout_68 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_4) - self.gridLayout_68.setObjectName("gridLayout_68") - self.gridLayout_53 = QtWidgets.QGridLayout() - self.gridLayout_53.setObjectName("gridLayout_53") - self.label_63 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.checkBox_cross_3_level_plot_remove_zero_col.sizePolicy().hasHeightForWidth()) + self.checkBox_cross_3_level_plot_remove_zero_col.setSizePolicy(sizePolicy) + self.checkBox_cross_3_level_plot_remove_zero_col.setMinimumSize(QtCore.QSize(0, 0)) + self.checkBox_cross_3_level_plot_remove_zero_col.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.checkBox_cross_3_level_plot_remove_zero_col.setChecked(True) + self.checkBox_cross_3_level_plot_remove_zero_col.setObjectName("checkBox_cross_3_level_plot_remove_zero_col") + self.gridLayout_51.addWidget(self.checkBox_cross_3_level_plot_remove_zero_col, 3, 5, 1, 1) + self.gridLayout_38.addLayout(self.gridLayout_51, 0, 1, 1, 1) + self.scrollArea_cross_heatmap_settings.setWidget(self.scrollAreaWidgetContents_3) + self.gridLayout_52.addWidget(self.scrollArea_cross_heatmap_settings, 0, 0, 1, 1) + 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) + self.tabWidget_3.setTabShape(QtWidgets.QTabWidget.Triangular) + self.tabWidget_3.setObjectName("tabWidget_3") + self.tab_3 = QtWidgets.QWidget() + self.tab_3.setObjectName("tab_3") + self.gridLayout_13 = QtWidgets.QGridLayout(self.tab_3) + self.gridLayout_13.setObjectName("gridLayout_13") + self.horizontalLayout_38 = QtWidgets.QHBoxLayout() + self.horizontalLayout_38.setObjectName("horizontalLayout_38") + self.label_36 = QtWidgets.QLabel(self.tab_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_63.sizePolicy().hasHeightForWidth()) - self.label_63.setSizePolicy(sizePolicy) - self.label_63.setObjectName("label_63") - self.gridLayout_53.addWidget(self.label_63, 0, 6, 1, 1) - self.comboBox_deseq2_p_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_36.sizePolicy().hasHeightForWidth()) + self.label_36.setSizePolicy(sizePolicy) + self.label_36.setObjectName("label_36") + self.horizontalLayout_38.addWidget(self.label_36) + self.comboBox_table_for_ttest = QtWidgets.QComboBox(self.tab_3) + self.comboBox_table_for_ttest.setObjectName("comboBox_table_for_ttest") + self.comboBox_table_for_ttest.addItem("") + self.comboBox_table_for_ttest.addItem("") + self.comboBox_table_for_ttest.addItem("") + self.comboBox_table_for_ttest.addItem("") + self.comboBox_table_for_ttest.addItem("") + self.horizontalLayout_38.addWidget(self.comboBox_table_for_ttest) + self.label_103 = QtWidgets.QLabel(self.tab_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_deseq2_p_type.sizePolicy().hasHeightForWidth()) - self.comboBox_deseq2_p_type.setSizePolicy(sizePolicy) - self.comboBox_deseq2_p_type.setObjectName("comboBox_deseq2_p_type") - self.comboBox_deseq2_p_type.addItem("") - self.comboBox_deseq2_p_type.addItem("") - self.gridLayout_53.addWidget(self.comboBox_deseq2_p_type, 0, 1, 1, 1) - self.label_14 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_103.sizePolicy().hasHeightForWidth()) + self.label_103.setSizePolicy(sizePolicy) + self.label_103.setAlignment(QtCore.Qt.AlignCenter) + self.label_103.setObjectName("label_103") + self.horizontalLayout_38.addWidget(self.label_103) + self.comboBox_ttest_meta = QtWidgets.QComboBox(self.tab_3) + self.comboBox_ttest_meta.setObjectName("comboBox_ttest_meta") + self.horizontalLayout_38.addWidget(self.comboBox_ttest_meta) + self.checkBox_ttest_in_condition = QtWidgets.QCheckBox(self.tab_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_14.sizePolicy().hasHeightForWidth()) - self.label_14.setSizePolicy(sizePolicy) - self.label_14.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_14.setObjectName("label_14") - self.gridLayout_53.addWidget(self.label_14, 0, 0, 1, 1) - self.label_156 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - self.label_156.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_156.setObjectName("label_156") - self.gridLayout_53.addWidget(self.label_156, 1, 4, 1, 1) - self.spinBox_deseq2_font_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) - self.spinBox_deseq2_font_size.setMinimum(1) - self.spinBox_deseq2_font_size.setProperty("value", 12) - self.spinBox_deseq2_font_size.setObjectName("spinBox_deseq2_font_size") - self.gridLayout_53.addWidget(self.spinBox_deseq2_font_size, 1, 5, 1, 1) - self.label_71 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) + sizePolicy.setHeightForWidth(self.checkBox_ttest_in_condition.sizePolicy().hasHeightForWidth()) + self.checkBox_ttest_in_condition.setSizePolicy(sizePolicy) + self.checkBox_ttest_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) + self.checkBox_ttest_in_condition.setObjectName("checkBox_ttest_in_condition") + self.horizontalLayout_38.addWidget(self.checkBox_ttest_in_condition) + self.comboBox_ttest_condition_meta = QtWidgets.QComboBox(self.tab_3) + self.comboBox_ttest_condition_meta.setEnabled(False) + self.comboBox_ttest_condition_meta.setObjectName("comboBox_ttest_condition_meta") + self.horizontalLayout_38.addWidget(self.comboBox_ttest_condition_meta) + self.horizontalLayout_70 = QtWidgets.QHBoxLayout() + self.horizontalLayout_70.setObjectName("horizontalLayout_70") + self.comboBox_ttest_condition_group = QtWidgets.QComboBox(self.tab_3) + self.comboBox_ttest_condition_group.setEnabled(False) + self.comboBox_ttest_condition_group.setObjectName("comboBox_ttest_condition_group") + self.horizontalLayout_70.addWidget(self.comboBox_ttest_condition_group) + self.horizontalLayout_38.addLayout(self.horizontalLayout_70) + self.gridLayout_13.addLayout(self.horizontalLayout_38, 2, 0, 1, 2) + self.pushButton_ttest = QtWidgets.QPushButton(self.tab_3) + self.pushButton_ttest.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_71.sizePolicy().hasHeightForWidth()) - self.label_71.setSizePolicy(sizePolicy) - self.label_71.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_71.setObjectName("label_71") - self.gridLayout_53.addWidget(self.label_71, 0, 4, 1, 1) - self.doubleSpinBox_deseq2_pvalue = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) + sizePolicy.setHeightForWidth(self.pushButton_ttest.sizePolicy().hasHeightForWidth()) + self.pushButton_ttest.setSizePolicy(sizePolicy) + self.pushButton_ttest.setObjectName("pushButton_ttest") + self.gridLayout_13.addWidget(self.pushButton_ttest, 9, 0, 1, 2) + self.line_22 = QtWidgets.QFrame(self.tab_3) + self.line_22.setFrameShape(QtWidgets.QFrame.HLine) + self.line_22.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_22.setObjectName("line_22") + self.gridLayout_13.addWidget(self.line_22, 8, 0, 1, 2) + self.line_21 = QtWidgets.QFrame(self.tab_3) + self.line_21.setFrameShape(QtWidgets.QFrame.HLine) + self.line_21.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_21.setObjectName("line_21") + self.gridLayout_13.addWidget(self.line_21, 3, 0, 1, 2) + self.gridLayout_64 = QtWidgets.QGridLayout() + self.gridLayout_64.setObjectName("gridLayout_64") + self.label_52 = QtWidgets.QLabel(self.tab_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.doubleSpinBox_deseq2_pvalue.sizePolicy().hasHeightForWidth()) - self.doubleSpinBox_deseq2_pvalue.setSizePolicy(sizePolicy) - self.doubleSpinBox_deseq2_pvalue.setDecimals(4) - self.doubleSpinBox_deseq2_pvalue.setMaximum(1.0) - self.doubleSpinBox_deseq2_pvalue.setSingleStep(0.01) - self.doubleSpinBox_deseq2_pvalue.setProperty("value", 0.05) - self.doubleSpinBox_deseq2_pvalue.setObjectName("doubleSpinBox_deseq2_pvalue") - self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_pvalue, 0, 2, 1, 2) - self.spinBox_deseq2_dot_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) - self.spinBox_deseq2_dot_size.setMinimum(1) - self.spinBox_deseq2_dot_size.setProperty("value", 15) - self.spinBox_deseq2_dot_size.setObjectName("spinBox_deseq2_dot_size") - self.gridLayout_53.addWidget(self.spinBox_deseq2_dot_size, 1, 7, 1, 1) - self.label_193 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - self.label_193.setObjectName("label_193") - self.gridLayout_53.addWidget(self.label_193, 1, 6, 1, 1) - self.doubleSpinBox_deseq2_log2fc_min = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) + sizePolicy.setHeightForWidth(self.label_52.sizePolicy().hasHeightForWidth()) + self.label_52.setSizePolicy(sizePolicy) + self.label_52.setObjectName("label_52") + self.gridLayout_64.addWidget(self.label_52, 0, 1, 1, 1) + self.label_42 = QtWidgets.QLabel(self.tab_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.doubleSpinBox_deseq2_log2fc_min.sizePolicy().hasHeightForWidth()) - self.doubleSpinBox_deseq2_log2fc_min.setSizePolicy(sizePolicy) - self.doubleSpinBox_deseq2_log2fc_min.setDecimals(1) - self.doubleSpinBox_deseq2_log2fc_min.setProperty("value", 1.0) - self.doubleSpinBox_deseq2_log2fc_min.setObjectName("doubleSpinBox_deseq2_log2fc_min") - self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_log2fc_min, 0, 5, 1, 1) - self.doubleSpinBox_deseq2_log2fc_max = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) + sizePolicy.setHeightForWidth(self.label_42.sizePolicy().hasHeightForWidth()) + self.label_42.setSizePolicy(sizePolicy) + self.label_42.setObjectName("label_42") + self.gridLayout_64.addWidget(self.label_42, 0, 0, 1, 1) + self.comboBox_ttest_group1 = QtWidgets.QComboBox(self.tab_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.doubleSpinBox_deseq2_log2fc_max.sizePolicy().hasHeightForWidth()) - self.doubleSpinBox_deseq2_log2fc_max.setSizePolicy(sizePolicy) - self.doubleSpinBox_deseq2_log2fc_max.setDecimals(1) - self.doubleSpinBox_deseq2_log2fc_max.setProperty("value", 20.0) - self.doubleSpinBox_deseq2_log2fc_max.setObjectName("doubleSpinBox_deseq2_log2fc_max") - self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_log2fc_max, 0, 7, 1, 1) - self.horizontalLayout_14 = QtWidgets.QHBoxLayout() - self.horizontalLayout_14.setObjectName("horizontalLayout_14") - self.label_16 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.comboBox_ttest_group1.sizePolicy().hasHeightForWidth()) + self.comboBox_ttest_group1.setSizePolicy(sizePolicy) + self.comboBox_ttest_group1.setObjectName("comboBox_ttest_group1") + self.gridLayout_64.addWidget(self.comboBox_ttest_group1, 1, 0, 1, 1) + self.comboBox_ttest_group2 = QtWidgets.QComboBox(self.tab_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_16.sizePolicy().hasHeightForWidth()) - self.label_16.setSizePolicy(sizePolicy) - self.label_16.setLayoutDirection(QtCore.Qt.LeftToRight) - self.label_16.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_16.setObjectName("label_16") - self.horizontalLayout_14.addWidget(self.label_16) - self.spinBox_fc_plot_width = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) - self.spinBox_fc_plot_width.setMinimum(1) - self.spinBox_fc_plot_width.setMaximum(99) - self.spinBox_fc_plot_width.setSingleStep(1) - self.spinBox_fc_plot_width.setProperty("value", 10) - self.spinBox_fc_plot_width.setObjectName("spinBox_fc_plot_width") - self.horizontalLayout_14.addWidget(self.spinBox_fc_plot_width) - self.label_17 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.comboBox_ttest_group2.sizePolicy().hasHeightForWidth()) + self.comboBox_ttest_group2.setSizePolicy(sizePolicy) + self.comboBox_ttest_group2.setObjectName("comboBox_ttest_group2") + self.gridLayout_64.addWidget(self.comboBox_ttest_group2, 1, 1, 1, 1) + self.gridLayout_13.addLayout(self.gridLayout_64, 5, 0, 1, 2) + self.tabWidget_3.addTab(self.tab_3, "") + self.tab_7 = QtWidgets.QWidget() + self.tab_7.setObjectName("tab_7") + self.gridLayout_11 = QtWidgets.QGridLayout(self.tab_7) + self.gridLayout_11.setObjectName("gridLayout_11") + self.pushButton_anova_test = QtWidgets.QPushButton(self.tab_7) + self.pushButton_anova_test.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_17.sizePolicy().hasHeightForWidth()) - self.label_17.setSizePolicy(sizePolicy) - self.label_17.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_17.setObjectName("label_17") - self.horizontalLayout_14.addWidget(self.label_17) - self.spinBox_fc_plot_height = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.pushButton_anova_test.sizePolicy().hasHeightForWidth()) + self.pushButton_anova_test.setSizePolicy(sizePolicy) + self.pushButton_anova_test.setObjectName("pushButton_anova_test") + self.gridLayout_11.addWidget(self.pushButton_anova_test, 8, 0, 1, 2) + self.line_24 = QtWidgets.QFrame(self.tab_7) + self.line_24.setFrameShape(QtWidgets.QFrame.HLine) + self.line_24.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_24.setObjectName("line_24") + self.gridLayout_11.addWidget(self.line_24, 7, 0, 1, 2) + self.horizontalLayout_37 = QtWidgets.QHBoxLayout() + self.horizontalLayout_37.setObjectName("horizontalLayout_37") + self.label_37 = QtWidgets.QLabel(self.tab_7) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_fc_plot_height.sizePolicy().hasHeightForWidth()) - self.spinBox_fc_plot_height.setSizePolicy(sizePolicy) - self.spinBox_fc_plot_height.setMinimum(1) - self.spinBox_fc_plot_height.setMaximum(99) - self.spinBox_fc_plot_height.setSingleStep(1) - self.spinBox_fc_plot_height.setProperty("value", 8) - self.spinBox_fc_plot_height.setObjectName("spinBox_fc_plot_height") - self.horizontalLayout_14.addWidget(self.spinBox_fc_plot_height) - self.gridLayout_53.addLayout(self.horizontalLayout_14, 1, 2, 1, 2) - self.checkBox_deseq2_js_volcano = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_4) - self.checkBox_deseq2_js_volcano.setChecked(True) - self.checkBox_deseq2_js_volcano.setObjectName("checkBox_deseq2_js_volcano") - self.gridLayout_53.addWidget(self.checkBox_deseq2_js_volcano, 1, 0, 1, 2) - self.gridLayout_68.addLayout(self.gridLayout_53, 0, 0, 1, 1) - self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_4) - self.gridLayout_48.addWidget(self.scrollArea_3, 0, 0, 1, 1) - self.gridLayout_55.addWidget(self.groupBox_deseq2_plot_settings, 5, 0, 1, 2) - self.gridLayout_16.addWidget(self.groupBox, 6, 0, 1, 3) - self.tabWidget_3.addTab(self.tab_19, "") - self.tab_4 = QtWidgets.QWidget() - self.tab_4.setObjectName("tab_4") - self.gridLayout_10 = QtWidgets.QGridLayout(self.tab_4) - self.gridLayout_10.setObjectName("gridLayout_10") - self.label_55 = QtWidgets.QLabel(self.tab_4) + sizePolicy.setHeightForWidth(self.label_37.sizePolicy().hasHeightForWidth()) + self.label_37.setSizePolicy(sizePolicy) + self.label_37.setObjectName("label_37") + self.horizontalLayout_37.addWidget(self.label_37) + self.comboBox_table_for_anova = QtWidgets.QComboBox(self.tab_7) + self.comboBox_table_for_anova.setObjectName("comboBox_table_for_anova") + self.comboBox_table_for_anova.addItem("") + self.comboBox_table_for_anova.addItem("") + self.comboBox_table_for_anova.addItem("") + self.comboBox_table_for_anova.addItem("") + self.comboBox_table_for_anova.addItem("") + self.horizontalLayout_37.addWidget(self.comboBox_table_for_anova) + self.label_104 = QtWidgets.QLabel(self.tab_7) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_55.sizePolicy().hasHeightForWidth()) - self.label_55.setSizePolicy(sizePolicy) - self.label_55.setObjectName("label_55") - self.gridLayout_10.addWidget(self.label_55, 3, 0, 1, 1) - self.line_2 = QtWidgets.QFrame(self.tab_4) - self.line_2.setFrameShape(QtWidgets.QFrame.HLine) - self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_2.setObjectName("line_2") - self.gridLayout_10.addWidget(self.line_2, 5, 0, 1, 4) - self.label_tukey_func_num = QtWidgets.QLabel(self.tab_4) + sizePolicy.setHeightForWidth(self.label_104.sizePolicy().hasHeightForWidth()) + self.label_104.setSizePolicy(sizePolicy) + self.label_104.setObjectName("label_104") + self.horizontalLayout_37.addWidget(self.label_104) + self.comboBox_anova_meta = QtWidgets.QComboBox(self.tab_7) + self.comboBox_anova_meta.setObjectName("comboBox_anova_meta") + self.horizontalLayout_37.addWidget(self.comboBox_anova_meta) + self.checkBox_anova_in_condition = QtWidgets.QCheckBox(self.tab_7) + self.checkBox_anova_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) + self.checkBox_anova_in_condition.setObjectName("checkBox_anova_in_condition") + self.horizontalLayout_37.addWidget(self.checkBox_anova_in_condition) + self.comboBox_anova_condition_meta = QtWidgets.QComboBox(self.tab_7) + self.comboBox_anova_condition_meta.setEnabled(False) + self.comboBox_anova_condition_meta.setObjectName("comboBox_anova_condition_meta") + self.horizontalLayout_37.addWidget(self.comboBox_anova_condition_meta) + self.horizontalLayout_71 = QtWidgets.QHBoxLayout() + self.horizontalLayout_71.setObjectName("horizontalLayout_71") + self.comboBox_anova_condition_group = QtWidgets.QComboBox(self.tab_7) + self.comboBox_anova_condition_group.setEnabled(False) + self.comboBox_anova_condition_group.setObjectName("comboBox_anova_condition_group") + self.horizontalLayout_71.addWidget(self.comboBox_anova_condition_group) + self.horizontalLayout_37.addLayout(self.horizontalLayout_71) + self.gridLayout_11.addLayout(self.horizontalLayout_37, 1, 0, 1, 2) + self.horizontalLayout_anova_group = QtWidgets.QHBoxLayout() + self.horizontalLayout_anova_group.setObjectName("horizontalLayout_anova_group") + self.gridLayout_11.addLayout(self.horizontalLayout_anova_group, 3, 1, 1, 1) + self.label_53 = QtWidgets.QLabel(self.tab_7) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_53.sizePolicy().hasHeightForWidth()) + self.label_53.setSizePolicy(sizePolicy) + self.label_53.setObjectName("label_53") + self.gridLayout_11.addWidget(self.label_53, 3, 0, 1, 1) + self.line_23 = QtWidgets.QFrame(self.tab_7) + self.line_23.setFrameShape(QtWidgets.QFrame.HLine) + self.line_23.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_23.setObjectName("line_23") + self.gridLayout_11.addWidget(self.line_23, 2, 0, 1, 2) + self.tabWidget_3.addTab(self.tab_7, "") + self.tab_16 = QtWidgets.QWidget() + self.tab_16.setObjectName("tab_16") + self.gridLayout_33 = QtWidgets.QGridLayout(self.tab_16) + self.gridLayout_33.setObjectName("gridLayout_33") + self.line_25 = QtWidgets.QFrame(self.tab_16) + self.line_25.setFrameShape(QtWidgets.QFrame.HLine) + self.line_25.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_25.setObjectName("line_25") + self.gridLayout_33.addWidget(self.line_25, 3, 1, 1, 2) + self.pushButton_dunnett_test = QtWidgets.QPushButton(self.tab_16) + self.pushButton_dunnett_test.setEnabled(False) + self.pushButton_dunnett_test.setObjectName("pushButton_dunnett_test") + self.gridLayout_33.addWidget(self.pushButton_dunnett_test, 10, 1, 1, 2) + self.horizontalLayout_39 = QtWidgets.QHBoxLayout() + self.horizontalLayout_39.setObjectName("horizontalLayout_39") + self.label_112 = QtWidgets.QLabel(self.tab_16) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_tukey_func_num.sizePolicy().hasHeightForWidth()) - self.label_tukey_func_num.setSizePolicy(sizePolicy) - self.label_tukey_func_num.setObjectName("label_tukey_func_num") - self.gridLayout_10.addWidget(self.label_tukey_func_num, 2, 2, 1, 1) - self.pushButton_show_linked_func = QtWidgets.QPushButton(self.tab_4) - self.pushButton_show_linked_func.setEnabled(False) - self.pushButton_show_linked_func.setObjectName("pushButton_show_linked_func") - self.gridLayout_10.addWidget(self.pushButton_show_linked_func, 3, 3, 1, 1) - self.pushButton_tukey_fresh = QtWidgets.QPushButton(self.tab_4) - self.pushButton_tukey_fresh.setEnabled(False) - self.pushButton_tukey_fresh.setObjectName("pushButton_tukey_fresh") - self.gridLayout_10.addWidget(self.pushButton_tukey_fresh, 4, 1, 1, 1) - self.label_111 = QtWidgets.QLabel(self.tab_4) - self.label_111.setObjectName("label_111") - self.gridLayout_10.addWidget(self.label_111, 7, 2, 1, 1) - self.comboBox_tukey_func = QtWidgets.QComboBox(self.tab_4) + sizePolicy.setHeightForWidth(self.label_112.sizePolicy().hasHeightForWidth()) + self.label_112.setSizePolicy(sizePolicy) + self.label_112.setObjectName("label_112") + self.horizontalLayout_39.addWidget(self.label_112) + self.comboBox_table_for_dunnett = QtWidgets.QComboBox(self.tab_16) + self.comboBox_table_for_dunnett.setObjectName("comboBox_table_for_dunnett") + self.comboBox_table_for_dunnett.addItem("") + self.comboBox_table_for_dunnett.addItem("") + self.comboBox_table_for_dunnett.addItem("") + self.comboBox_table_for_dunnett.addItem("") + self.horizontalLayout_39.addWidget(self.comboBox_table_for_dunnett) + self.label_113 = QtWidgets.QLabel(self.tab_16) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_113.sizePolicy().hasHeightForWidth()) + self.label_113.setSizePolicy(sizePolicy) + self.label_113.setObjectName("label_113") + self.horizontalLayout_39.addWidget(self.label_113) + self.comboBox_dunnett_meta = QtWidgets.QComboBox(self.tab_16) + self.comboBox_dunnett_meta.setObjectName("comboBox_dunnett_meta") + self.horizontalLayout_39.addWidget(self.comboBox_dunnett_meta) + self.checkBox_group_control_in_condition = QtWidgets.QCheckBox(self.tab_16) + self.checkBox_group_control_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) + self.checkBox_group_control_in_condition.setObjectName("checkBox_group_control_in_condition") + self.horizontalLayout_39.addWidget(self.checkBox_group_control_in_condition) + self.comboBox_group_control_condition_meta = QtWidgets.QComboBox(self.tab_16) + self.comboBox_group_control_condition_meta.setEnabled(False) + self.comboBox_group_control_condition_meta.setObjectName("comboBox_group_control_condition_meta") + self.horizontalLayout_39.addWidget(self.comboBox_group_control_condition_meta) + self.horizontalLayout_73 = QtWidgets.QHBoxLayout() + self.horizontalLayout_73.setObjectName("horizontalLayout_73") + self.comboBox_group_control_condition_group = QtWidgets.QComboBox(self.tab_16) + self.comboBox_group_control_condition_group.setEnabled(False) + self.comboBox_group_control_condition_group.setObjectName("comboBox_group_control_condition_group") + self.horizontalLayout_73.addWidget(self.comboBox_group_control_condition_group) + self.horizontalLayout_39.addLayout(self.horizontalLayout_73) + self.gridLayout_33.addLayout(self.horizontalLayout_39, 1, 1, 1, 2) + self.line_26 = QtWidgets.QFrame(self.tab_16) + self.line_26.setFrameShape(QtWidgets.QFrame.HLine) + self.line_26.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_26.setObjectName("line_26") + self.gridLayout_33.addWidget(self.line_26, 9, 1, 1, 2) + self.pushButton_multi_deseq2 = QtWidgets.QPushButton(self.tab_16) + self.pushButton_multi_deseq2.setEnabled(False) + self.pushButton_multi_deseq2.setObjectName("pushButton_multi_deseq2") + self.gridLayout_33.addWidget(self.pushButton_multi_deseq2, 11, 1, 1, 2) + self.gridLayout_72 = QtWidgets.QGridLayout() + self.gridLayout_72.setObjectName("gridLayout_72") + self.horizontalLayout_dunnett_group = QtWidgets.QHBoxLayout() + self.horizontalLayout_dunnett_group.setObjectName("horizontalLayout_dunnett_group") + self.gridLayout_72.addLayout(self.horizontalLayout_dunnett_group, 1, 1, 1, 1) + self.label_114 = QtWidgets.QLabel(self.tab_16) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_tukey_func.sizePolicy().hasHeightForWidth()) - self.comboBox_tukey_func.setSizePolicy(sizePolicy) - self.comboBox_tukey_func.setEditable(True) - self.comboBox_tukey_func.setObjectName("comboBox_tukey_func") - self.gridLayout_10.addWidget(self.comboBox_tukey_func, 2, 1, 1, 1) - self.label_54 = QtWidgets.QLabel(self.tab_4) + sizePolicy.setHeightForWidth(self.label_114.sizePolicy().hasHeightForWidth()) + self.label_114.setSizePolicy(sizePolicy) + self.label_114.setObjectName("label_114") + self.gridLayout_72.addWidget(self.label_114, 0, 1, 1, 1) + self.comboBox_dunnett_control_group = QtWidgets.QComboBox(self.tab_16) + self.comboBox_dunnett_control_group.setObjectName("comboBox_dunnett_control_group") + self.gridLayout_72.addWidget(self.comboBox_dunnett_control_group, 1, 0, 1, 1) + self.label_115 = QtWidgets.QLabel(self.tab_16) + self.label_115.setObjectName("label_115") + self.gridLayout_72.addWidget(self.label_115, 0, 0, 1, 1) + self.checkBox_comparing_group_control_in_condition = QtWidgets.QCheckBox(self.tab_16) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_54.sizePolicy().hasHeightForWidth()) - self.label_54.setSizePolicy(sizePolicy) - self.label_54.setObjectName("label_54") - self.gridLayout_10.addWidget(self.label_54, 2, 0, 1, 1) - self.comboBox_tukey_by_sum_each = QtWidgets.QComboBox(self.tab_4) - self.comboBox_tukey_by_sum_each.setObjectName("comboBox_tukey_by_sum_each") - self.comboBox_tukey_by_sum_each.addItem("") - self.comboBox_tukey_by_sum_each.addItem("") - self.gridLayout_10.addWidget(self.comboBox_tukey_by_sum_each, 7, 3, 1, 1) - self.pushButton_show_linked_taxa = QtWidgets.QPushButton(self.tab_4) - self.pushButton_show_linked_taxa.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.checkBox_comparing_group_control_in_condition.sizePolicy().hasHeightForWidth()) + self.checkBox_comparing_group_control_in_condition.setSizePolicy(sizePolicy) + self.checkBox_comparing_group_control_in_condition.setObjectName("checkBox_comparing_group_control_in_condition") + self.gridLayout_72.addWidget(self.checkBox_comparing_group_control_in_condition, 2, 0, 1, 1) + self.horizontalLayout_24 = QtWidgets.QHBoxLayout() + self.horizontalLayout_24.setObjectName("horizontalLayout_24") + self.label_140 = QtWidgets.QLabel(self.tab_16) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_show_linked_taxa.sizePolicy().hasHeightForWidth()) - self.pushButton_show_linked_taxa.setSizePolicy(sizePolicy) - self.pushButton_show_linked_taxa.setObjectName("pushButton_show_linked_taxa") - self.gridLayout_10.addWidget(self.pushButton_show_linked_taxa, 2, 3, 1, 1) - self.pushButton_plot_tukey = QtWidgets.QPushButton(self.tab_4) - self.pushButton_plot_tukey.setEnabled(False) - self.pushButton_plot_tukey.setObjectName("pushButton_plot_tukey") - self.gridLayout_10.addWidget(self.pushButton_plot_tukey, 8, 3, 1, 1) - self.label_tukey_taxa_num = QtWidgets.QLabel(self.tab_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.label_140.sizePolicy().hasHeightForWidth()) + self.label_140.setSizePolicy(sizePolicy) + self.label_140.setObjectName("label_140") + self.horizontalLayout_24.addWidget(self.label_140) + self.comboBox_group_control_comparing_each_condition_meta = QtWidgets.QComboBox(self.tab_16) + self.comboBox_group_control_comparing_each_condition_meta.setEnabled(False) + self.comboBox_group_control_comparing_each_condition_meta.setObjectName("comboBox_group_control_comparing_each_condition_meta") + self.horizontalLayout_24.addWidget(self.comboBox_group_control_comparing_each_condition_meta) + self.gridLayout_72.addLayout(self.horizontalLayout_24, 2, 1, 1, 1) + self.gridLayout_33.addLayout(self.gridLayout_72, 4, 1, 1, 2) + self.tabWidget_3.addTab(self.tab_16, "") + self.tab_19 = QtWidgets.QWidget() + self.tab_19.setObjectName("tab_19") + self.gridLayout_16 = QtWidgets.QGridLayout(self.tab_19) + self.gridLayout_16.setObjectName("gridLayout_16") + self.label_166 = QtWidgets.QLabel(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_tukey_taxa_num.sizePolicy().hasHeightForWidth()) - self.label_tukey_taxa_num.setSizePolicy(sizePolicy) - self.label_tukey_taxa_num.setObjectName("label_tukey_taxa_num") - self.gridLayout_10.addWidget(self.label_tukey_taxa_num, 3, 2, 1, 1) - self.comboBox_tukey_taxa = QtWidgets.QComboBox(self.tab_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_166.sizePolicy().hasHeightForWidth()) + self.label_166.setSizePolicy(sizePolicy) + self.label_166.setObjectName("label_166") + self.gridLayout_16.addWidget(self.label_166, 3, 0, 1, 1) + self.pushButton_deseq2 = QtWidgets.QPushButton(self.tab_19) + self.pushButton_deseq2.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_tukey_taxa.sizePolicy().hasHeightForWidth()) - self.comboBox_tukey_taxa.setSizePolicy(sizePolicy) - self.comboBox_tukey_taxa.setEditable(True) - self.comboBox_tukey_taxa.setObjectName("comboBox_tukey_taxa") - self.gridLayout_10.addWidget(self.comboBox_tukey_taxa, 3, 1, 1, 1) - self.pushButton_tukey_test = QtWidgets.QPushButton(self.tab_4) - self.pushButton_tukey_test.setEnabled(False) - self.pushButton_tukey_test.setObjectName("pushButton_tukey_test") - self.gridLayout_10.addWidget(self.pushButton_tukey_test, 8, 1, 1, 1) - self.horizontalLayout_59 = QtWidgets.QHBoxLayout() - self.horizontalLayout_59.setObjectName("horizontalLayout_59") - self.label_106 = QtWidgets.QLabel(self.tab_4) + sizePolicy.setHeightForWidth(self.pushButton_deseq2.sizePolicy().hasHeightForWidth()) + self.pushButton_deseq2.setSizePolicy(sizePolicy) + self.pushButton_deseq2.setMinimumSize(QtCore.QSize(33, 0)) + self.pushButton_deseq2.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.pushButton_deseq2.setObjectName("pushButton_deseq2") + self.gridLayout_16.addWidget(self.pushButton_deseq2, 5, 0, 1, 3) + self.horizontalLayout_40 = QtWidgets.QHBoxLayout() + self.horizontalLayout_40.setObjectName("horizontalLayout_40") + self.checkBox_deseq2_comparing_in_condition = QtWidgets.QCheckBox(self.tab_19) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_106.sizePolicy().hasHeightForWidth()) - self.label_106.setSizePolicy(sizePolicy) - self.label_106.setObjectName("label_106") - self.horizontalLayout_59.addWidget(self.label_106) - self.comboBox_tukey_meta = QtWidgets.QComboBox(self.tab_4) - self.comboBox_tukey_meta.setObjectName("comboBox_tukey_meta") - self.horizontalLayout_59.addWidget(self.comboBox_tukey_meta) - self.checkBox_tukey_in_condition = QtWidgets.QCheckBox(self.tab_4) - self.checkBox_tukey_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) - self.checkBox_tukey_in_condition.setObjectName("checkBox_tukey_in_condition") - self.horizontalLayout_59.addWidget(self.checkBox_tukey_in_condition) - self.comboBox_tukey_condition_meta = QtWidgets.QComboBox(self.tab_4) - self.comboBox_tukey_condition_meta.setEnabled(False) - self.comboBox_tukey_condition_meta.setObjectName("comboBox_tukey_condition_meta") - self.horizontalLayout_59.addWidget(self.comboBox_tukey_condition_meta) - self.horizontalLayout_72 = QtWidgets.QHBoxLayout() - self.horizontalLayout_72.setObjectName("horizontalLayout_72") - self.comboBox_tukey_condition_group = QtWidgets.QComboBox(self.tab_4) - self.comboBox_tukey_condition_group.setEnabled(False) - self.comboBox_tukey_condition_group.setObjectName("comboBox_tukey_condition_group") - self.horizontalLayout_72.addWidget(self.comboBox_tukey_condition_group) - self.horizontalLayout_59.addLayout(self.horizontalLayout_72) - self.gridLayout_10.addLayout(self.horizontalLayout_59, 0, 1, 1, 3) - self.line_16 = QtWidgets.QFrame(self.tab_4) - self.line_16.setFrameShape(QtWidgets.QFrame.HLine) - self.line_16.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_16.setObjectName("line_16") - self.gridLayout_10.addWidget(self.line_16, 1, 0, 1, 4) - self.tabWidget_3.addTab(self.tab_4, "") - self.gridLayout_9.addWidget(self.tabWidget_3, 0, 0, 1, 1) - self.groupBox_cross_heatmap_plot = QtWidgets.QGroupBox(self.tab_2) - self.groupBox_cross_heatmap_plot.setObjectName("groupBox_cross_heatmap_plot") - self.gridLayout_75 = QtWidgets.QGridLayout(self.groupBox_cross_heatmap_plot) - self.gridLayout_75.setObjectName("gridLayout_75") - self.gridLayout_46 = QtWidgets.QGridLayout() - self.gridLayout_46.setObjectName("gridLayout_46") - self.pushButton_get_top_cross_table = QtWidgets.QPushButton(self.groupBox_cross_heatmap_plot) - self.pushButton_get_top_cross_table.setEnabled(False) + sizePolicy.setHeightForWidth(self.checkBox_deseq2_comparing_in_condition.sizePolicy().hasHeightForWidth()) + self.checkBox_deseq2_comparing_in_condition.setSizePolicy(sizePolicy) + self.checkBox_deseq2_comparing_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) + self.checkBox_deseq2_comparing_in_condition.setObjectName("checkBox_deseq2_comparing_in_condition") + self.horizontalLayout_40.addWidget(self.checkBox_deseq2_comparing_in_condition) + self.comboBox_deseq2_condition_meta = QtWidgets.QComboBox(self.tab_19) + self.comboBox_deseq2_condition_meta.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_get_top_cross_table.sizePolicy().hasHeightForWidth()) - self.pushButton_get_top_cross_table.setSizePolicy(sizePolicy) - self.pushButton_get_top_cross_table.setMaximumSize(QtCore.QSize(16777215, 30)) - self.pushButton_get_top_cross_table.setObjectName("pushButton_get_top_cross_table") - self.gridLayout_46.addWidget(self.pushButton_get_top_cross_table, 1, 1, 1, 1) - self.pushButton_plot_top_heatmap = QtWidgets.QPushButton(self.groupBox_cross_heatmap_plot) - self.pushButton_plot_top_heatmap.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_condition_meta.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_condition_meta.setSizePolicy(sizePolicy) + self.comboBox_deseq2_condition_meta.setObjectName("comboBox_deseq2_condition_meta") + self.horizontalLayout_40.addWidget(self.comboBox_deseq2_condition_meta) + self.horizontalLayout_75 = QtWidgets.QHBoxLayout() + self.horizontalLayout_75.setObjectName("horizontalLayout_75") + self.comboBox_deseq2_condition_group = QtWidgets.QComboBox(self.tab_19) + self.comboBox_deseq2_condition_group.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_plot_top_heatmap.sizePolicy().hasHeightForWidth()) - self.pushButton_plot_top_heatmap.setSizePolicy(sizePolicy) - self.pushButton_plot_top_heatmap.setMaximumSize(QtCore.QSize(16777215, 50)) - self.pushButton_plot_top_heatmap.setAutoDefault(False) - self.pushButton_plot_top_heatmap.setObjectName("pushButton_plot_top_heatmap") - self.gridLayout_46.addWidget(self.pushButton_plot_top_heatmap, 0, 1, 1, 1) - self.checkBox_2 = QtWidgets.QCheckBox(self.groupBox_cross_heatmap_plot) - self.checkBox_2.setObjectName("checkBox_2") - self.gridLayout_46.addWidget(self.checkBox_2, 1, 0, 1, 1) - self.horizontalLayout_13 = QtWidgets.QHBoxLayout() - self.horizontalLayout_13.setObjectName("horizontalLayout_13") - self.label_56 = QtWidgets.QLabel(self.groupBox_cross_heatmap_plot) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_condition_group.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_condition_group.setSizePolicy(sizePolicy) + self.comboBox_deseq2_condition_group.setObjectName("comboBox_deseq2_condition_group") + self.horizontalLayout_75.addWidget(self.comboBox_deseq2_condition_group) + self.horizontalLayout_40.addLayout(self.horizontalLayout_75) + self.gridLayout_16.addLayout(self.horizontalLayout_40, 0, 2, 1, 1) + self.horizontalLayout_22 = QtWidgets.QHBoxLayout() + self.horizontalLayout_22.setObjectName("horizontalLayout_22") + self.label_2 = QtWidgets.QLabel(self.tab_19) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_56.sizePolicy().hasHeightForWidth()) - self.label_56.setSizePolicy(sizePolicy) - self.label_56.setObjectName("label_56") - self.horizontalLayout_13.addWidget(self.label_56) - self.comboBox_top_heatmap_table = QtWidgets.QComboBox(self.groupBox_cross_heatmap_plot) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_table.sizePolicy().hasHeightForWidth()) - self.comboBox_top_heatmap_table.setSizePolicy(sizePolicy) - self.comboBox_top_heatmap_table.setObjectName("comboBox_top_heatmap_table") - self.comboBox_top_heatmap_table.addItem("") - self.comboBox_top_heatmap_table.setItemText(0, "") - self.horizontalLayout_13.addWidget(self.comboBox_top_heatmap_table) - self.gridLayout_46.addLayout(self.horizontalLayout_13, 0, 0, 1, 1) - self.gridLayout_75.addLayout(self.gridLayout_46, 0, 0, 1, 1) - self.groupBox_cross_heatmap_settings = QtWidgets.QGroupBox(self.groupBox_cross_heatmap_plot) - self.groupBox_cross_heatmap_settings.setMaximumSize(QtCore.QSize(16777215, 220)) - self.groupBox_cross_heatmap_settings.setObjectName("groupBox_cross_heatmap_settings") - self.gridLayout_52 = QtWidgets.QGridLayout(self.groupBox_cross_heatmap_settings) - self.gridLayout_52.setObjectName("gridLayout_52") - self.scrollArea_cross_heatmap_settings = QtWidgets.QScrollArea(self.groupBox_cross_heatmap_settings) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) + self.label_2.setSizePolicy(sizePolicy) + self.label_2.setObjectName("label_2") + self.horizontalLayout_22.addWidget(self.label_2) + self.comboBox_deseq2_group1 = QtWidgets.QComboBox(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.scrollArea_cross_heatmap_settings.sizePolicy().hasHeightForWidth()) - self.scrollArea_cross_heatmap_settings.setSizePolicy(sizePolicy) - self.scrollArea_cross_heatmap_settings.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.scrollArea_cross_heatmap_settings.setWidgetResizable(True) - self.scrollArea_cross_heatmap_settings.setObjectName("scrollArea_cross_heatmap_settings") - self.scrollAreaWidgetContents_3 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 1003, 124)) - self.scrollAreaWidgetContents_3.setObjectName("scrollAreaWidgetContents_3") - self.gridLayout_38 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_3) - self.gridLayout_38.setObjectName("gridLayout_38") - self.gridLayout_51 = QtWidgets.QGridLayout() - self.gridLayout_51.setObjectName("gridLayout_51") - self.label_131 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_group1.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_group1.setSizePolicy(sizePolicy) + self.comboBox_deseq2_group1.setObjectName("comboBox_deseq2_group1") + self.horizontalLayout_22.addWidget(self.comboBox_deseq2_group1) + self.label_3 = QtWidgets.QLabel(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_131.sizePolicy().hasHeightForWidth()) - self.label_131.setSizePolicy(sizePolicy) - self.label_131.setMinimumSize(QtCore.QSize(0, 0)) - self.label_131.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_131.setObjectName("label_131") - self.gridLayout_51.addWidget(self.label_131, 0, 5, 1, 1) - self.horizontalLayout_17 = QtWidgets.QHBoxLayout() - self.horizontalLayout_17.setObjectName("horizontalLayout_17") - self.checkBox_top_heatmap_rename_taxa = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) + self.label_3.setSizePolicy(sizePolicy) + self.label_3.setObjectName("label_3") + self.horizontalLayout_22.addWidget(self.label_3) + self.comboBox_deseq2_group2 = QtWidgets.QComboBox(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_top_heatmap_rename_taxa.sizePolicy().hasHeightForWidth()) - self.checkBox_top_heatmap_rename_taxa.setSizePolicy(sizePolicy) - self.checkBox_top_heatmap_rename_taxa.setLayoutDirection(QtCore.Qt.LeftToRight) - self.checkBox_top_heatmap_rename_taxa.setChecked(True) - self.checkBox_top_heatmap_rename_taxa.setObjectName("checkBox_top_heatmap_rename_taxa") - self.horizontalLayout_17.addWidget(self.checkBox_top_heatmap_rename_taxa) - self.checkBox_top_heatmap_rename_sample = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_group2.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_group2.setSizePolicy(sizePolicy) + self.comboBox_deseq2_group2.setObjectName("comboBox_deseq2_group2") + self.horizontalLayout_22.addWidget(self.comboBox_deseq2_group2) + self.gridLayout_16.addLayout(self.horizontalLayout_22, 3, 1, 1, 2) + self.line_14 = QtWidgets.QFrame(self.tab_19) + self.line_14.setFrameShape(QtWidgets.QFrame.HLine) + self.line_14.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_14.setObjectName("line_14") + self.gridLayout_16.addWidget(self.line_14, 4, 0, 1, 3) + self.horizontalLayout_61 = QtWidgets.QHBoxLayout() + self.horizontalLayout_61.setObjectName("horizontalLayout_61") + self.comboBox_table_for_deseq2 = QtWidgets.QComboBox(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_top_heatmap_rename_sample.sizePolicy().hasHeightForWidth()) - self.checkBox_top_heatmap_rename_sample.setSizePolicy(sizePolicy) - self.checkBox_top_heatmap_rename_sample.setLayoutDirection(QtCore.Qt.LeftToRight) - self.checkBox_top_heatmap_rename_sample.setChecked(True) - self.checkBox_top_heatmap_rename_sample.setObjectName("checkBox_top_heatmap_rename_sample") - self.horizontalLayout_17.addWidget(self.checkBox_top_heatmap_rename_sample) - self.gridLayout_51.addLayout(self.horizontalLayout_17, 1, 6, 1, 1) - self.horizontalLayout_19 = QtWidgets.QHBoxLayout() - self.horizontalLayout_19.setObjectName("horizontalLayout_19") - self.label_62 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.comboBox_table_for_deseq2.sizePolicy().hasHeightForWidth()) + self.comboBox_table_for_deseq2.setSizePolicy(sizePolicy) + self.comboBox_table_for_deseq2.setObjectName("comboBox_table_for_deseq2") + self.comboBox_table_for_deseq2.addItem("") + self.comboBox_table_for_deseq2.addItem("") + self.comboBox_table_for_deseq2.addItem("") + self.comboBox_table_for_deseq2.addItem("") + self.horizontalLayout_61.addWidget(self.comboBox_table_for_deseq2) + self.label_147 = QtWidgets.QLabel(self.tab_19) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_62.sizePolicy().hasHeightForWidth()) - self.label_62.setSizePolicy(sizePolicy) - self.label_62.setMinimumSize(QtCore.QSize(0, 0)) - self.label_62.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_62.setObjectName("label_62") - self.horizontalLayout_19.addWidget(self.label_62) - self.comboBox_top_heatmap_scale = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.label_147.sizePolicy().hasHeightForWidth()) + self.label_147.setSizePolicy(sizePolicy) + self.label_147.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_147.setObjectName("label_147") + self.horizontalLayout_61.addWidget(self.label_147) + self.comboBox_deseq2_meta = QtWidgets.QComboBox(self.tab_19) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_scale.sizePolicy().hasHeightForWidth()) - self.comboBox_top_heatmap_scale.setSizePolicy(sizePolicy) - self.comboBox_top_heatmap_scale.setMinimumSize(QtCore.QSize(0, 0)) - self.comboBox_top_heatmap_scale.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.comboBox_top_heatmap_scale.setObjectName("comboBox_top_heatmap_scale") - self.comboBox_top_heatmap_scale.addItem("") - self.comboBox_top_heatmap_scale.addItem("") - self.comboBox_top_heatmap_scale.addItem("") - self.horizontalLayout_19.addWidget(self.comboBox_top_heatmap_scale) - self.gridLayout_51.addLayout(self.horizontalLayout_19, 1, 1, 1, 1) - self.horizontalLayout_21 = QtWidgets.QHBoxLayout() - self.horizontalLayout_21.setObjectName("horizontalLayout_21") - self.label_38 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_meta.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_meta.setSizePolicy(sizePolicy) + self.comboBox_deseq2_meta.setObjectName("comboBox_deseq2_meta") + self.horizontalLayout_61.addWidget(self.comboBox_deseq2_meta) + self.gridLayout_16.addLayout(self.horizontalLayout_61, 0, 1, 1, 1) + self.line = QtWidgets.QFrame(self.tab_19) + self.line.setFrameShape(QtWidgets.QFrame.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line.setObjectName("line") + self.gridLayout_16.addWidget(self.line, 1, 0, 1, 3) + self.label_4 = QtWidgets.QLabel(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_38.sizePolicy().hasHeightForWidth()) - self.label_38.setSizePolicy(sizePolicy) - self.label_38.setMinimumSize(QtCore.QSize(0, 0)) - self.label_38.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_38.setObjectName("label_38") - self.horizontalLayout_21.addWidget(self.label_38) - self.comboBox_top_heatmap_cmap = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth()) + self.label_4.setSizePolicy(sizePolicy) + self.label_4.setObjectName("label_4") + self.gridLayout_16.addWidget(self.label_4, 0, 0, 1, 1) + self.groupBox = QtWidgets.QGroupBox(self.tab_19) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_cmap.sizePolicy().hasHeightForWidth()) - self.comboBox_top_heatmap_cmap.setSizePolicy(sizePolicy) - self.comboBox_top_heatmap_cmap.setMinimumSize(QtCore.QSize(0, 0)) - self.comboBox_top_heatmap_cmap.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.comboBox_top_heatmap_cmap.setObjectName("comboBox_top_heatmap_cmap") - self.horizontalLayout_21.addWidget(self.comboBox_top_heatmap_cmap) - self.gridLayout_51.addLayout(self.horizontalLayout_21, 1, 2, 1, 1) - self.label_153 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - self.label_153.setMinimumSize(QtCore.QSize(0, 0)) - self.label_153.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_153.setObjectName("label_153") - self.gridLayout_51.addWidget(self.label_153, 1, 5, 1, 1) - self.horizontalLayout_23 = QtWidgets.QHBoxLayout() - self.horizontalLayout_23.setObjectName("horizontalLayout_23") - self.label_109 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) + self.groupBox.setSizePolicy(sizePolicy) + self.groupBox.setMinimumSize(QtCore.QSize(0, 0)) + self.groupBox.setMaximumSize(QtCore.QSize(16777215, 400)) + self.groupBox.setObjectName("groupBox") + self.gridLayout_55 = QtWidgets.QGridLayout(self.groupBox) + self.gridLayout_55.setObjectName("gridLayout_55") + self.pushButton_deseq2_plot_sankey = QtWidgets.QPushButton(self.groupBox) + self.pushButton_deseq2_plot_sankey.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_109.sizePolicy().hasHeightForWidth()) - self.label_109.setSizePolicy(sizePolicy) - self.label_109.setMinimumSize(QtCore.QSize(0, 0)) - self.label_109.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_109.setObjectName("label_109") - self.horizontalLayout_23.addWidget(self.label_109) - self.spinBox_top_heatmap_label_font_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.pushButton_deseq2_plot_sankey.sizePolicy().hasHeightForWidth()) + self.pushButton_deseq2_plot_sankey.setSizePolicy(sizePolicy) + self.pushButton_deseq2_plot_sankey.setObjectName("pushButton_deseq2_plot_sankey") + self.gridLayout_55.addWidget(self.pushButton_deseq2_plot_sankey, 1, 1, 1, 1) + self.checkBox_3 = QtWidgets.QCheckBox(self.groupBox) + self.checkBox_3.setObjectName("checkBox_3") + self.gridLayout_55.addWidget(self.checkBox_3, 1, 0, 1, 1) + self.pushButton_deseq2_plot_vocano = QtWidgets.QPushButton(self.groupBox) + self.pushButton_deseq2_plot_vocano.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_top_heatmap_label_font_size.sizePolicy().hasHeightForWidth()) - self.spinBox_top_heatmap_label_font_size.setSizePolicy(sizePolicy) - self.spinBox_top_heatmap_label_font_size.setMinimumSize(QtCore.QSize(0, 0)) - self.spinBox_top_heatmap_label_font_size.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.spinBox_top_heatmap_label_font_size.setMinimum(1) - self.spinBox_top_heatmap_label_font_size.setMaximum(999) - self.spinBox_top_heatmap_label_font_size.setSingleStep(1) - self.spinBox_top_heatmap_label_font_size.setProperty("value", 10) - self.spinBox_top_heatmap_label_font_size.setObjectName("spinBox_top_heatmap_label_font_size") - self.horizontalLayout_23.addWidget(self.spinBox_top_heatmap_label_font_size) - self.gridLayout_51.addLayout(self.horizontalLayout_23, 0, 3, 1, 1) - self.horizontalLayout_18 = QtWidgets.QHBoxLayout() - self.horizontalLayout_18.setObjectName("horizontalLayout_18") - self.label_60 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.pushButton_deseq2_plot_vocano.sizePolicy().hasHeightForWidth()) + self.pushButton_deseq2_plot_vocano.setSizePolicy(sizePolicy) + self.pushButton_deseq2_plot_vocano.setObjectName("pushButton_deseq2_plot_vocano") + self.gridLayout_55.addWidget(self.pushButton_deseq2_plot_vocano, 0, 1, 1, 1) + self.horizontalLayout_92 = QtWidgets.QHBoxLayout() + self.horizontalLayout_92.setObjectName("horizontalLayout_92") + self.label_64 = QtWidgets.QLabel(self.groupBox) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_60.sizePolicy().hasHeightForWidth()) - self.label_60.setSizePolicy(sizePolicy) - self.label_60.setMinimumSize(QtCore.QSize(0, 0)) - self.label_60.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_60.setObjectName("label_60") - self.horizontalLayout_18.addWidget(self.label_60) - self.spinBox_top_heatmap_length = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.label_64.sizePolicy().hasHeightForWidth()) + self.label_64.setSizePolicy(sizePolicy) + self.label_64.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_64.setObjectName("label_64") + self.horizontalLayout_92.addWidget(self.label_64) + self.comboBox_deseq2_tables = QtWidgets.QComboBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_top_heatmap_length.sizePolicy().hasHeightForWidth()) - self.spinBox_top_heatmap_length.setSizePolicy(sizePolicy) - self.spinBox_top_heatmap_length.setMinimumSize(QtCore.QSize(0, 0)) - self.spinBox_top_heatmap_length.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.spinBox_top_heatmap_length.setMinimum(1) - self.spinBox_top_heatmap_length.setMaximum(9999) - self.spinBox_top_heatmap_length.setProperty("value", 9) - self.spinBox_top_heatmap_length.setObjectName("spinBox_top_heatmap_length") - self.horizontalLayout_18.addWidget(self.spinBox_top_heatmap_length) - self.gridLayout_51.addLayout(self.horizontalLayout_18, 0, 2, 1, 1) - self.horizontalLayout_15 = QtWidgets.QHBoxLayout() - self.horizontalLayout_15.setObjectName("horizontalLayout_15") - self.checkBox_top_heatmap_show_all_labels_x = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_tables.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_tables.setSizePolicy(sizePolicy) + self.comboBox_deseq2_tables.setObjectName("comboBox_deseq2_tables") + self.horizontalLayout_92.addWidget(self.comboBox_deseq2_tables) + self.gridLayout_55.addLayout(self.horizontalLayout_92, 0, 0, 1, 1) + self.groupBox_deseq2_plot_settings = QtWidgets.QGroupBox(self.groupBox) + self.groupBox_deseq2_plot_settings.setMaximumSize(QtCore.QSize(16777215, 220)) + self.groupBox_deseq2_plot_settings.setObjectName("groupBox_deseq2_plot_settings") + self.gridLayout_48 = QtWidgets.QGridLayout(self.groupBox_deseq2_plot_settings) + self.gridLayout_48.setObjectName("gridLayout_48") + self.scrollArea_3 = QtWidgets.QScrollArea(self.groupBox_deseq2_plot_settings) + self.scrollArea_3.setWidgetResizable(True) + self.scrollArea_3.setObjectName("scrollArea_3") + self.scrollAreaWidgetContents_4 = QtWidgets.QWidget() + self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, -17, 979, 94)) + self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4") + self.gridLayout_68 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_4) + self.gridLayout_68.setObjectName("gridLayout_68") + self.gridLayout_53 = QtWidgets.QGridLayout() + self.gridLayout_53.setObjectName("gridLayout_53") + self.spinBox_deseq2_font_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) + self.spinBox_deseq2_font_size.setMinimum(1) + self.spinBox_deseq2_font_size.setProperty("value", 12) + self.spinBox_deseq2_font_size.setObjectName("spinBox_deseq2_font_size") + self.gridLayout_53.addWidget(self.spinBox_deseq2_font_size, 1, 5, 1, 1) + self.doubleSpinBox_deseq2_pvalue = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_top_heatmap_show_all_labels_x.sizePolicy().hasHeightForWidth()) - self.checkBox_top_heatmap_show_all_labels_x.setSizePolicy(sizePolicy) - self.checkBox_top_heatmap_show_all_labels_x.setLayoutDirection(QtCore.Qt.LeftToRight) - self.checkBox_top_heatmap_show_all_labels_x.setObjectName("checkBox_top_heatmap_show_all_labels_x") - self.horizontalLayout_15.addWidget(self.checkBox_top_heatmap_show_all_labels_x) - self.checkBox_top_heatmap_show_all_labels_y = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.doubleSpinBox_deseq2_pvalue.sizePolicy().hasHeightForWidth()) + self.doubleSpinBox_deseq2_pvalue.setSizePolicy(sizePolicy) + self.doubleSpinBox_deseq2_pvalue.setDecimals(4) + self.doubleSpinBox_deseq2_pvalue.setMaximum(1.0) + self.doubleSpinBox_deseq2_pvalue.setSingleStep(0.01) + self.doubleSpinBox_deseq2_pvalue.setProperty("value", 0.05) + self.doubleSpinBox_deseq2_pvalue.setObjectName("doubleSpinBox_deseq2_pvalue") + self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_pvalue, 0, 2, 1, 2) + self.label_71 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_top_heatmap_show_all_labels_y.sizePolicy().hasHeightForWidth()) - self.checkBox_top_heatmap_show_all_labels_y.setSizePolicy(sizePolicy) - self.checkBox_top_heatmap_show_all_labels_y.setLayoutDirection(QtCore.Qt.LeftToRight) - self.checkBox_top_heatmap_show_all_labels_y.setObjectName("checkBox_top_heatmap_show_all_labels_y") - self.horizontalLayout_15.addWidget(self.checkBox_top_heatmap_show_all_labels_y) - self.gridLayout_51.addLayout(self.horizontalLayout_15, 0, 6, 1, 1) - self.label_181 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.label_71.sizePolicy().hasHeightForWidth()) + self.label_71.setSizePolicy(sizePolicy) + self.label_71.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_71.setObjectName("label_71") + self.gridLayout_53.addWidget(self.label_71, 0, 4, 1, 1) + self.horizontalLayout_14 = QtWidgets.QHBoxLayout() + self.horizontalLayout_14.setObjectName("horizontalLayout_14") + self.label_16 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_181.sizePolicy().hasHeightForWidth()) - self.label_181.setSizePolicy(sizePolicy) - self.label_181.setMinimumSize(QtCore.QSize(0, 0)) - self.label_181.setMaximumSize(QtCore.QSize(16777215, 16777215)) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_181.setFont(font) - self.label_181.setObjectName("label_181") - self.gridLayout_51.addWidget(self.label_181, 3, 0, 1, 1) - self.label_182 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - self.label_182.setMinimumSize(QtCore.QSize(0, 0)) - self.label_182.setMaximumSize(QtCore.QSize(16777215, 16777215)) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_182.setFont(font) - self.label_182.setObjectName("label_182") - self.gridLayout_51.addWidget(self.label_182, 0, 0, 1, 1) - self.horizontalLayout_16 = QtWidgets.QHBoxLayout() - self.horizontalLayout_16.setObjectName("horizontalLayout_16") - self.label_59 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.label_16.sizePolicy().hasHeightForWidth()) + self.label_16.setSizePolicy(sizePolicy) + self.label_16.setLayoutDirection(QtCore.Qt.LeftToRight) + self.label_16.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_16.setObjectName("label_16") + self.horizontalLayout_14.addWidget(self.label_16) + self.spinBox_fc_plot_width = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) + self.spinBox_fc_plot_width.setMinimum(1) + self.spinBox_fc_plot_width.setMaximum(99) + self.spinBox_fc_plot_width.setSingleStep(1) + self.spinBox_fc_plot_width.setProperty("value", 10) + self.spinBox_fc_plot_width.setObjectName("spinBox_fc_plot_width") + self.horizontalLayout_14.addWidget(self.spinBox_fc_plot_width) + self.label_17 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_59.sizePolicy().hasHeightForWidth()) - self.label_59.setSizePolicy(sizePolicy) - self.label_59.setMinimumSize(QtCore.QSize(0, 0)) - self.label_59.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_59.setObjectName("label_59") - self.horizontalLayout_16.addWidget(self.label_59) - self.spinBox_top_heatmap_width = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.label_17.sizePolicy().hasHeightForWidth()) + self.label_17.setSizePolicy(sizePolicy) + self.label_17.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_17.setObjectName("label_17") + self.horizontalLayout_14.addWidget(self.label_17) + self.spinBox_fc_plot_height = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_top_heatmap_width.sizePolicy().hasHeightForWidth()) - self.spinBox_top_heatmap_width.setSizePolicy(sizePolicy) - self.spinBox_top_heatmap_width.setMinimumSize(QtCore.QSize(0, 0)) - self.spinBox_top_heatmap_width.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.spinBox_top_heatmap_width.setMinimum(1) - self.spinBox_top_heatmap_width.setMaximum(9999) - self.spinBox_top_heatmap_width.setSingleStep(1) - self.spinBox_top_heatmap_width.setProperty("value", 16) - self.spinBox_top_heatmap_width.setObjectName("spinBox_top_heatmap_width") - self.horizontalLayout_16.addWidget(self.spinBox_top_heatmap_width) - self.gridLayout_51.addLayout(self.horizontalLayout_16, 0, 1, 1, 1) - self.horizontalLayout_86 = QtWidgets.QHBoxLayout() - self.horizontalLayout_86.setObjectName("horizontalLayout_86") - self.label_57 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.spinBox_fc_plot_height.sizePolicy().hasHeightForWidth()) + self.spinBox_fc_plot_height.setSizePolicy(sizePolicy) + self.spinBox_fc_plot_height.setMinimum(1) + self.spinBox_fc_plot_height.setMaximum(99) + self.spinBox_fc_plot_height.setSingleStep(1) + self.spinBox_fc_plot_height.setProperty("value", 8) + self.spinBox_fc_plot_height.setObjectName("spinBox_fc_plot_height") + self.horizontalLayout_14.addWidget(self.spinBox_fc_plot_height) + self.gridLayout_53.addLayout(self.horizontalLayout_14, 1, 2, 1, 2) + self.comboBox_deseq2_p_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_57.sizePolicy().hasHeightForWidth()) - self.label_57.setSizePolicy(sizePolicy) - self.label_57.setMinimumSize(QtCore.QSize(0, 0)) - self.label_57.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_57.setObjectName("label_57") - self.horizontalLayout_86.addWidget(self.label_57) - self.comboBox_top_heatmap_sort_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.comboBox_deseq2_p_type.sizePolicy().hasHeightForWidth()) + self.comboBox_deseq2_p_type.setSizePolicy(sizePolicy) + self.comboBox_deseq2_p_type.setObjectName("comboBox_deseq2_p_type") + self.comboBox_deseq2_p_type.addItem("") + self.comboBox_deseq2_p_type.addItem("") + self.gridLayout_53.addWidget(self.comboBox_deseq2_p_type, 0, 1, 1, 1) + self.label_14 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_sort_type.sizePolicy().hasHeightForWidth()) - self.comboBox_top_heatmap_sort_type.setSizePolicy(sizePolicy) - self.comboBox_top_heatmap_sort_type.setMinimumSize(QtCore.QSize(0, 0)) - self.comboBox_top_heatmap_sort_type.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.comboBox_top_heatmap_sort_type.setObjectName("comboBox_top_heatmap_sort_type") - self.comboBox_top_heatmap_sort_type.addItem("") - self.comboBox_top_heatmap_sort_type.addItem("") - self.comboBox_top_heatmap_sort_type.addItem("") - self.horizontalLayout_86.addWidget(self.comboBox_top_heatmap_sort_type) - self.gridLayout_51.addLayout(self.horizontalLayout_86, 1, 3, 1, 1) - self.label_180 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.label_14.sizePolicy().hasHeightForWidth()) + self.label_14.setSizePolicy(sizePolicy) + self.label_14.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_14.setObjectName("label_14") + self.gridLayout_53.addWidget(self.label_14, 0, 0, 1, 1) + self.spinBox_deseq2_dot_size = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_4) + self.spinBox_deseq2_dot_size.setMinimum(1) + self.spinBox_deseq2_dot_size.setMaximum(999) + self.spinBox_deseq2_dot_size.setProperty("value", 15) + self.spinBox_deseq2_dot_size.setObjectName("spinBox_deseq2_dot_size") + self.gridLayout_53.addWidget(self.spinBox_deseq2_dot_size, 1, 7, 1, 1) + self.label_63 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_180.sizePolicy().hasHeightForWidth()) - self.label_180.setSizePolicy(sizePolicy) - self.label_180.setMinimumSize(QtCore.QSize(0, 0)) - self.label_180.setMaximumSize(QtCore.QSize(16777215, 16777215)) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_180.setFont(font) - self.label_180.setObjectName("label_180") - self.gridLayout_51.addWidget(self.label_180, 2, 0, 1, 1) - self.horizontalLayout_93 = QtWidgets.QHBoxLayout() - self.horizontalLayout_93.setObjectName("horizontalLayout_93") - self.label_30 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - self.label_30.setObjectName("label_30") - self.horizontalLayout_93.addWidget(self.label_30) - self.doubleSpinBox_top_heatmap_pvalue = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.doubleSpinBox_top_heatmap_pvalue.sizePolicy().hasHeightForWidth()) - self.doubleSpinBox_top_heatmap_pvalue.setSizePolicy(sizePolicy) - self.doubleSpinBox_top_heatmap_pvalue.setMinimumSize(QtCore.QSize(0, 0)) - self.doubleSpinBox_top_heatmap_pvalue.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.doubleSpinBox_top_heatmap_pvalue.setDecimals(4) - self.doubleSpinBox_top_heatmap_pvalue.setMaximum(1.0) - self.doubleSpinBox_top_heatmap_pvalue.setSingleStep(0.01) - self.doubleSpinBox_top_heatmap_pvalue.setProperty("value", 0.05) - self.doubleSpinBox_top_heatmap_pvalue.setObjectName("doubleSpinBox_top_heatmap_pvalue") - self.horizontalLayout_93.addWidget(self.doubleSpinBox_top_heatmap_pvalue) - self.gridLayout_51.addLayout(self.horizontalLayout_93, 1, 4, 1, 1) - self.horizontalLayout_84 = QtWidgets.QHBoxLayout() - self.horizontalLayout_84.setObjectName("horizontalLayout_84") - self.checkBox_cross_heatmap_row_cluster = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.label_63.sizePolicy().hasHeightForWidth()) + self.label_63.setSizePolicy(sizePolicy) + self.label_63.setObjectName("label_63") + self.gridLayout_53.addWidget(self.label_63, 0, 6, 1, 1) + self.doubleSpinBox_deseq2_log2fc_max = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_cross_heatmap_row_cluster.sizePolicy().hasHeightForWidth()) - self.checkBox_cross_heatmap_row_cluster.setSizePolicy(sizePolicy) - self.checkBox_cross_heatmap_row_cluster.setMinimumSize(QtCore.QSize(0, 0)) - self.checkBox_cross_heatmap_row_cluster.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.checkBox_cross_heatmap_row_cluster.setChecked(True) - self.checkBox_cross_heatmap_row_cluster.setObjectName("checkBox_cross_heatmap_row_cluster") - self.horizontalLayout_84.addWidget(self.checkBox_cross_heatmap_row_cluster) - self.checkBox_cross_heatmap_col_cluster = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.doubleSpinBox_deseq2_log2fc_max.sizePolicy().hasHeightForWidth()) + self.doubleSpinBox_deseq2_log2fc_max.setSizePolicy(sizePolicy) + self.doubleSpinBox_deseq2_log2fc_max.setDecimals(1) + self.doubleSpinBox_deseq2_log2fc_max.setProperty("value", 20.0) + self.doubleSpinBox_deseq2_log2fc_max.setObjectName("doubleSpinBox_deseq2_log2fc_max") + self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_log2fc_max, 0, 7, 1, 1) + self.label_156 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + self.label_156.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_156.setObjectName("label_156") + self.gridLayout_53.addWidget(self.label_156, 1, 4, 1, 1) + self.label_193 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + self.label_193.setObjectName("label_193") + self.gridLayout_53.addWidget(self.label_193, 1, 6, 1, 1) + self.doubleSpinBox_deseq2_log2fc_min = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_cross_heatmap_col_cluster.sizePolicy().hasHeightForWidth()) - self.checkBox_cross_heatmap_col_cluster.setSizePolicy(sizePolicy) - self.checkBox_cross_heatmap_col_cluster.setMinimumSize(QtCore.QSize(0, 0)) - self.checkBox_cross_heatmap_col_cluster.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.checkBox_cross_heatmap_col_cluster.setChecked(True) - self.checkBox_cross_heatmap_col_cluster.setObjectName("checkBox_cross_heatmap_col_cluster") - self.horizontalLayout_84.addWidget(self.checkBox_cross_heatmap_col_cluster) - self.gridLayout_51.addLayout(self.horizontalLayout_84, 0, 4, 1, 1) - self.label_138 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.doubleSpinBox_deseq2_log2fc_min.sizePolicy().hasHeightForWidth()) + self.doubleSpinBox_deseq2_log2fc_min.setSizePolicy(sizePolicy) + self.doubleSpinBox_deseq2_log2fc_min.setDecimals(1) + self.doubleSpinBox_deseq2_log2fc_min.setProperty("value", 1.0) + self.doubleSpinBox_deseq2_log2fc_min.setObjectName("doubleSpinBox_deseq2_log2fc_min") + self.gridLayout_53.addWidget(self.doubleSpinBox_deseq2_log2fc_min, 0, 5, 1, 1) + self.checkBox_deseq2_js_volcano = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_4) + self.checkBox_deseq2_js_volcano.setChecked(True) + self.checkBox_deseq2_js_volcano.setObjectName("checkBox_deseq2_js_volcano") + self.gridLayout_53.addWidget(self.checkBox_deseq2_js_volcano, 1, 0, 1, 2) + self.label_194 = QtWidgets.QLabel(self.scrollAreaWidgetContents_4) + self.label_194.setObjectName("label_194") + self.gridLayout_53.addWidget(self.label_194, 2, 0, 1, 2) + self.comboBox_deseq2_volcano_sns_theme = QtWidgets.QComboBox(self.scrollAreaWidgetContents_4) + self.comboBox_deseq2_volcano_sns_theme.setObjectName("comboBox_deseq2_volcano_sns_theme") + self.gridLayout_53.addWidget(self.comboBox_deseq2_volcano_sns_theme, 2, 2, 1, 1) + self.gridLayout_68.addLayout(self.gridLayout_53, 0, 0, 1, 1) + self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_4) + self.gridLayout_48.addWidget(self.scrollArea_3, 0, 0, 1, 1) + self.gridLayout_55.addWidget(self.groupBox_deseq2_plot_settings, 5, 0, 1, 2) + self.gridLayout_16.addWidget(self.groupBox, 6, 0, 1, 3) + self.tabWidget_3.addTab(self.tab_19, "") + self.tab_4 = QtWidgets.QWidget() + self.tab_4.setObjectName("tab_4") + self.gridLayout_10 = QtWidgets.QGridLayout(self.tab_4) + self.gridLayout_10.setObjectName("gridLayout_10") + self.label_55 = QtWidgets.QLabel(self.tab_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_138.sizePolicy().hasHeightForWidth()) - self.label_138.setSizePolicy(sizePolicy) - self.label_138.setMinimumSize(QtCore.QSize(0, 0)) - self.label_138.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_138.setObjectName("label_138") - self.gridLayout_51.addWidget(self.label_138, 3, 1, 1, 1) - self.horizontalLayout_12 = QtWidgets.QHBoxLayout() - self.horizontalLayout_12.setObjectName("horizontalLayout_12") - self.doubleSpinBox_mini_log2fc_heatmap = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_3) - self.doubleSpinBox_mini_log2fc_heatmap.setEnabled(False) - self.doubleSpinBox_mini_log2fc_heatmap.setMinimumSize(QtCore.QSize(0, 0)) - self.doubleSpinBox_mini_log2fc_heatmap.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.doubleSpinBox_mini_log2fc_heatmap.setProperty("showGroupSeparator", False) - self.doubleSpinBox_mini_log2fc_heatmap.setDecimals(3) - self.doubleSpinBox_mini_log2fc_heatmap.setMinimum(0.0) - self.doubleSpinBox_mini_log2fc_heatmap.setProperty("value", 1.0) - self.doubleSpinBox_mini_log2fc_heatmap.setObjectName("doubleSpinBox_mini_log2fc_heatmap") - self.horizontalLayout_12.addWidget(self.doubleSpinBox_mini_log2fc_heatmap) - self.label_139 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_55.sizePolicy().hasHeightForWidth()) + self.label_55.setSizePolicy(sizePolicy) + self.label_55.setObjectName("label_55") + self.gridLayout_10.addWidget(self.label_55, 3, 0, 1, 1) + self.line_2 = QtWidgets.QFrame(self.tab_4) + self.line_2.setFrameShape(QtWidgets.QFrame.HLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_2.setObjectName("line_2") + self.gridLayout_10.addWidget(self.line_2, 5, 0, 1, 4) + self.label_tukey_func_num = QtWidgets.QLabel(self.tab_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_139.sizePolicy().hasHeightForWidth()) - self.label_139.setSizePolicy(sizePolicy) - self.label_139.setMinimumSize(QtCore.QSize(0, 0)) - self.label_139.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_139.setObjectName("label_139") - self.horizontalLayout_12.addWidget(self.label_139) - self.doubleSpinBox_max_log2fc_heatmap = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_3) - self.doubleSpinBox_max_log2fc_heatmap.setEnabled(False) - self.doubleSpinBox_max_log2fc_heatmap.setMinimumSize(QtCore.QSize(0, 0)) - self.doubleSpinBox_max_log2fc_heatmap.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.doubleSpinBox_max_log2fc_heatmap.setDecimals(3) - self.doubleSpinBox_max_log2fc_heatmap.setProperty("value", 30.0) - self.doubleSpinBox_max_log2fc_heatmap.setObjectName("doubleSpinBox_max_log2fc_heatmap") - self.horizontalLayout_12.addWidget(self.doubleSpinBox_max_log2fc_heatmap) - self.gridLayout_51.addLayout(self.horizontalLayout_12, 3, 2, 1, 1) - self.spinBox_top_heatmap_number = QtWidgets.QSpinBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.label_tukey_func_num.sizePolicy().hasHeightForWidth()) + self.label_tukey_func_num.setSizePolicy(sizePolicy) + self.label_tukey_func_num.setObjectName("label_tukey_func_num") + self.gridLayout_10.addWidget(self.label_tukey_func_num, 2, 2, 1, 1) + self.pushButton_show_linked_func = QtWidgets.QPushButton(self.tab_4) + self.pushButton_show_linked_func.setEnabled(False) + self.pushButton_show_linked_func.setObjectName("pushButton_show_linked_func") + self.gridLayout_10.addWidget(self.pushButton_show_linked_func, 3, 3, 1, 1) + self.pushButton_tukey_fresh = QtWidgets.QPushButton(self.tab_4) + self.pushButton_tukey_fresh.setEnabled(False) + self.pushButton_tukey_fresh.setObjectName("pushButton_tukey_fresh") + self.gridLayout_10.addWidget(self.pushButton_tukey_fresh, 4, 1, 1, 1) + self.label_111 = QtWidgets.QLabel(self.tab_4) + self.label_111.setObjectName("label_111") + self.gridLayout_10.addWidget(self.label_111, 7, 2, 1, 1) + self.comboBox_tukey_func = QtWidgets.QComboBox(self.tab_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_top_heatmap_number.sizePolicy().hasHeightForWidth()) - self.spinBox_top_heatmap_number.setSizePolicy(sizePolicy) - self.spinBox_top_heatmap_number.setMinimumSize(QtCore.QSize(0, 0)) - self.spinBox_top_heatmap_number.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.spinBox_top_heatmap_number.setMinimum(1) - self.spinBox_top_heatmap_number.setMaximum(9999) - self.spinBox_top_heatmap_number.setProperty("value", 100) - self.spinBox_top_heatmap_number.setObjectName("spinBox_top_heatmap_number") - self.gridLayout_51.addWidget(self.spinBox_top_heatmap_number, 2, 2, 1, 1) - self.label_58 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.comboBox_tukey_func.sizePolicy().hasHeightForWidth()) + self.comboBox_tukey_func.setSizePolicy(sizePolicy) + self.comboBox_tukey_func.setEditable(True) + self.comboBox_tukey_func.setObjectName("comboBox_tukey_func") + self.gridLayout_10.addWidget(self.comboBox_tukey_func, 2, 1, 1, 1) + self.label_54 = QtWidgets.QLabel(self.tab_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_58.sizePolicy().hasHeightForWidth()) - self.label_58.setSizePolicy(sizePolicy) - self.label_58.setMinimumSize(QtCore.QSize(0, 0)) - self.label_58.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_58.setObjectName("label_58") - self.gridLayout_51.addWidget(self.label_58, 2, 1, 1, 1) - self.label_141 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.label_54.sizePolicy().hasHeightForWidth()) + self.label_54.setSizePolicy(sizePolicy) + self.label_54.setObjectName("label_54") + self.gridLayout_10.addWidget(self.label_54, 2, 0, 1, 1) + self.comboBox_tukey_by_sum_each = QtWidgets.QComboBox(self.tab_4) + self.comboBox_tukey_by_sum_each.setObjectName("comboBox_tukey_by_sum_each") + self.comboBox_tukey_by_sum_each.addItem("") + self.comboBox_tukey_by_sum_each.addItem("") + self.gridLayout_10.addWidget(self.comboBox_tukey_by_sum_each, 7, 3, 1, 1) + self.pushButton_show_linked_taxa = QtWidgets.QPushButton(self.tab_4) + self.pushButton_show_linked_taxa.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_141.sizePolicy().hasHeightForWidth()) - self.label_141.setSizePolicy(sizePolicy) - self.label_141.setMinimumSize(QtCore.QSize(0, 0)) - self.label_141.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_141.setObjectName("label_141") - self.gridLayout_51.addWidget(self.label_141, 3, 3, 1, 1) - self.comboBox_cross_3_level_plot_df_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) - self.comboBox_cross_3_level_plot_df_type.setEnabled(False) - self.comboBox_cross_3_level_plot_df_type.setMinimumSize(QtCore.QSize(0, 0)) - self.comboBox_cross_3_level_plot_df_type.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.comboBox_cross_3_level_plot_df_type.setObjectName("comboBox_cross_3_level_plot_df_type") - self.comboBox_cross_3_level_plot_df_type.addItem("") - self.comboBox_cross_3_level_plot_df_type.addItem("") - self.comboBox_cross_3_level_plot_df_type.addItem("") - self.gridLayout_51.addWidget(self.comboBox_cross_3_level_plot_df_type, 3, 4, 1, 1) - self.checkBox_cross_3_level_plot_remove_zero_col = QtWidgets.QCheckBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.pushButton_show_linked_taxa.sizePolicy().hasHeightForWidth()) + self.pushButton_show_linked_taxa.setSizePolicy(sizePolicy) + self.pushButton_show_linked_taxa.setObjectName("pushButton_show_linked_taxa") + self.gridLayout_10.addWidget(self.pushButton_show_linked_taxa, 2, 3, 1, 1) + self.pushButton_plot_tukey = QtWidgets.QPushButton(self.tab_4) + self.pushButton_plot_tukey.setEnabled(False) + self.pushButton_plot_tukey.setObjectName("pushButton_plot_tukey") + self.gridLayout_10.addWidget(self.pushButton_plot_tukey, 8, 3, 1, 1) + self.label_tukey_taxa_num = QtWidgets.QLabel(self.tab_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_tukey_taxa_num.sizePolicy().hasHeightForWidth()) + self.label_tukey_taxa_num.setSizePolicy(sizePolicy) + self.label_tukey_taxa_num.setObjectName("label_tukey_taxa_num") + self.gridLayout_10.addWidget(self.label_tukey_taxa_num, 3, 2, 1, 1) + self.comboBox_tukey_taxa = QtWidgets.QComboBox(self.tab_4) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_cross_3_level_plot_remove_zero_col.sizePolicy().hasHeightForWidth()) - self.checkBox_cross_3_level_plot_remove_zero_col.setSizePolicy(sizePolicy) - self.checkBox_cross_3_level_plot_remove_zero_col.setMinimumSize(QtCore.QSize(0, 0)) - self.checkBox_cross_3_level_plot_remove_zero_col.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.checkBox_cross_3_level_plot_remove_zero_col.setChecked(True) - self.checkBox_cross_3_level_plot_remove_zero_col.setObjectName("checkBox_cross_3_level_plot_remove_zero_col") - self.gridLayout_51.addWidget(self.checkBox_cross_3_level_plot_remove_zero_col, 3, 5, 1, 1) - self.gridLayout_38.addLayout(self.gridLayout_51, 0, 1, 1, 1) - self.scrollArea_cross_heatmap_settings.setWidget(self.scrollAreaWidgetContents_3) - self.gridLayout_52.addWidget(self.scrollArea_cross_heatmap_settings, 0, 0, 1, 1) - 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) + sizePolicy.setHeightForWidth(self.comboBox_tukey_taxa.sizePolicy().hasHeightForWidth()) + self.comboBox_tukey_taxa.setSizePolicy(sizePolicy) + self.comboBox_tukey_taxa.setEditable(True) + self.comboBox_tukey_taxa.setObjectName("comboBox_tukey_taxa") + self.gridLayout_10.addWidget(self.comboBox_tukey_taxa, 3, 1, 1, 1) + self.pushButton_tukey_test = QtWidgets.QPushButton(self.tab_4) + self.pushButton_tukey_test.setEnabled(False) + self.pushButton_tukey_test.setObjectName("pushButton_tukey_test") + self.gridLayout_10.addWidget(self.pushButton_tukey_test, 8, 1, 1, 1) + self.horizontalLayout_59 = QtWidgets.QHBoxLayout() + self.horizontalLayout_59.setObjectName("horizontalLayout_59") + self.label_106 = QtWidgets.QLabel(self.tab_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_106.sizePolicy().hasHeightForWidth()) + self.label_106.setSizePolicy(sizePolicy) + self.label_106.setObjectName("label_106") + self.horizontalLayout_59.addWidget(self.label_106) + self.comboBox_tukey_meta = QtWidgets.QComboBox(self.tab_4) + self.comboBox_tukey_meta.setObjectName("comboBox_tukey_meta") + self.horizontalLayout_59.addWidget(self.comboBox_tukey_meta) + self.checkBox_tukey_in_condition = QtWidgets.QCheckBox(self.tab_4) + self.checkBox_tukey_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) + self.checkBox_tukey_in_condition.setObjectName("checkBox_tukey_in_condition") + self.horizontalLayout_59.addWidget(self.checkBox_tukey_in_condition) + self.comboBox_tukey_condition_meta = QtWidgets.QComboBox(self.tab_4) + self.comboBox_tukey_condition_meta.setEnabled(False) + self.comboBox_tukey_condition_meta.setObjectName("comboBox_tukey_condition_meta") + self.horizontalLayout_59.addWidget(self.comboBox_tukey_condition_meta) + self.horizontalLayout_72 = QtWidgets.QHBoxLayout() + self.horizontalLayout_72.setObjectName("horizontalLayout_72") + self.comboBox_tukey_condition_group = QtWidgets.QComboBox(self.tab_4) + self.comboBox_tukey_condition_group.setEnabled(False) + self.comboBox_tukey_condition_group.setObjectName("comboBox_tukey_condition_group") + self.horizontalLayout_72.addWidget(self.comboBox_tukey_condition_group) + self.horizontalLayout_59.addLayout(self.horizontalLayout_72) + self.gridLayout_10.addLayout(self.horizontalLayout_59, 0, 1, 1, 3) + self.line_16 = QtWidgets.QFrame(self.tab_4) + self.line_16.setFrameShape(QtWidgets.QFrame.HLine) + self.line_16.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_16.setObjectName("line_16") + self.gridLayout_10.addWidget(self.line_16, 1, 0, 1, 4) + self.tabWidget_3.addTab(self.tab_4, "") + self.gridLayout_9.addWidget(self.tabWidget_3, 0, 0, 1, 1) self.tabWidget_TaxaFuncAnalyzer.addTab(self.tab_2, "") self.tab_diff_stats = QtWidgets.QWidget() self.tab_diff_stats.setObjectName("tab_diff_stats") @@ -5641,6 +5648,44 @@ def retranslateUi(self, metaX_main): self.pushButton_basic_peptide_query.setText(_translate("metaX_main", "Query")) self.tabWidget_4.setTabText(self.tabWidget_4.indexOf(self.tab_10), _translate("metaX_main", "Peptide Query")) self.tabWidget_TaxaFuncAnalyzer.setTabText(self.tabWidget_TaxaFuncAnalyzer.indexOf(self.tab_basic_stast), _translate("metaX_main", "Basic Stats")) + self.groupBox_cross_heatmap_plot.setTitle(_translate("metaX_main", "Plot")) + self.label_56.setText(_translate("metaX_main", "Table")) + self.pushButton_get_top_cross_table.setText(_translate("metaX_main", "Get Top Table")) + self.pushButton_plot_top_heatmap.setText(_translate("metaX_main", "Plot Top Heatmap")) + self.checkBox_2.setText(_translate("metaX_main", "Show Plotting Parameter")) + self.groupBox_cross_heatmap_settings.setTitle(_translate("metaX_main", "Plotting Parameter")) + self.label_131.setText(_translate("metaX_main", "Show All Labels")) + self.checkBox_top_heatmap_rename_taxa.setText(_translate("metaX_main", " Taxa")) + self.checkBox_top_heatmap_rename_sample.setText(_translate("metaX_main", "Sample")) + self.label_62.setText(_translate("metaX_main", "Scale By")) + self.comboBox_top_heatmap_scale.setItemText(0, _translate("metaX_main", "row")) + self.comboBox_top_heatmap_scale.setItemText(1, _translate("metaX_main", "column")) + self.comboBox_top_heatmap_scale.setItemText(2, _translate("metaX_main", "None")) + self.label_38.setText(_translate("metaX_main", "Theme")) + self.label_153.setText(_translate("metaX_main", "Rename")) + self.label_109.setText(_translate("metaX_main", "Font Size")) + self.label_60.setText(_translate("metaX_main", "Height")) + self.checkBox_top_heatmap_show_all_labels_x.setText(_translate("metaX_main", "X")) + self.checkBox_top_heatmap_show_all_labels_y.setText(_translate("metaX_main", "Y")) + self.label_181.setText(_translate("metaX_main", "Group-Control")) + self.label_182.setText(_translate("metaX_main", "General")) + self.label_59.setText(_translate("metaX_main", "Width")) + self.label_57.setText(_translate("metaX_main", "Sort By")) + self.comboBox_top_heatmap_sort_type.setItemText(0, _translate("metaX_main", "p-value")) + self.comboBox_top_heatmap_sort_type.setItemText(1, _translate("metaX_main", "f-statistic (ANOVA)")) + self.comboBox_top_heatmap_sort_type.setItemText(2, _translate("metaX_main", "t-statistic (T-Test)")) + self.label_180.setText(_translate("metaX_main", "T & ANOVA")) + self.label_30.setText(_translate("metaX_main", "p")) + self.checkBox_cross_heatmap_row_cluster.setText(_translate("metaX_main", "Row Cluster")) + self.checkBox_cross_heatmap_col_cluster.setText(_translate("metaX_main", "Col Cluster")) + self.label_138.setText(_translate("metaX_main", "Log2FC")) + self.label_139.setText(_translate("metaX_main", "To")) + self.label_58.setText(_translate("metaX_main", "Top Number")) + self.label_141.setText(_translate("metaX_main", "Plot Type")) + self.comboBox_cross_3_level_plot_df_type.setItemText(0, _translate("metaX_main", "all_sig")) + self.comboBox_cross_3_level_plot_df_type.setItemText(1, _translate("metaX_main", "no_na")) + self.comboBox_cross_3_level_plot_df_type.setItemText(2, _translate("metaX_main", "same_trends")) + self.checkBox_cross_3_level_plot_remove_zero_col.setText(_translate("metaX_main", "Remove Zero Col")) self.label_36.setText(_translate("metaX_main", "Table")) self.comboBox_table_for_ttest.setItemText(0, _translate("metaX_main", "Taxa-Functions")) self.comboBox_table_for_ttest.setItemText(1, _translate("metaX_main", "Taxa")) @@ -5695,16 +5740,17 @@ def retranslateUi(self, metaX_main): self.pushButton_deseq2_plot_vocano.setText(_translate("metaX_main", "Plot Volcano")) self.label_64.setText(_translate("metaX_main", "Tables")) self.groupBox_deseq2_plot_settings.setTitle(_translate("metaX_main", "Plotting Parameter")) - self.label_63.setText(_translate("metaX_main", "Max Log2FC")) + self.label_71.setText(_translate("metaX_main", "Mini Log2FC")) + self.label_16.setText(_translate("metaX_main", "Width")) + self.label_17.setText(_translate("metaX_main", "Height")) self.comboBox_deseq2_p_type.setItemText(0, _translate("metaX_main", "padj")) self.comboBox_deseq2_p_type.setItemText(1, _translate("metaX_main", "pvalue")) self.label_14.setText(_translate("metaX_main", "Threshold")) + self.label_63.setText(_translate("metaX_main", "Max Log2FC")) self.label_156.setText(_translate("metaX_main", "Font Size")) - self.label_71.setText(_translate("metaX_main", "Mini Log2FC")) self.label_193.setText(_translate("metaX_main", "Dot Size")) - self.label_16.setText(_translate("metaX_main", "Width")) - self.label_17.setText(_translate("metaX_main", "Height")) self.checkBox_deseq2_js_volcano.setText(_translate("metaX_main", "Interactive Volcano")) + self.label_194.setText(_translate("metaX_main", "Themes for static volcano ")) self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_19), _translate("metaX_main", "DESeq2")) self.label_55.setText(_translate("metaX_main", "Taxon")) self.label_tukey_func_num.setText(_translate("metaX_main", "Linked Number: -")) @@ -5722,44 +5768,6 @@ def retranslateUi(self, metaX_main): self.label_106.setText(_translate("metaX_main", "Meta")) self.checkBox_tukey_in_condition.setText(_translate("metaX_main", "In Condition")) self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_4), _translate("metaX_main", "TUKEY TEST")) - self.groupBox_cross_heatmap_plot.setTitle(_translate("metaX_main", "Plot")) - self.pushButton_get_top_cross_table.setText(_translate("metaX_main", "Get Top Table")) - self.pushButton_plot_top_heatmap.setText(_translate("metaX_main", "Plot Top Heatmap")) - self.checkBox_2.setText(_translate("metaX_main", "Show Plotting Parameter")) - self.label_56.setText(_translate("metaX_main", "Table")) - self.groupBox_cross_heatmap_settings.setTitle(_translate("metaX_main", "Plotting Parameter")) - self.label_131.setText(_translate("metaX_main", "Show All Labels")) - self.checkBox_top_heatmap_rename_taxa.setText(_translate("metaX_main", " Taxa")) - self.checkBox_top_heatmap_rename_sample.setText(_translate("metaX_main", "Sample")) - self.label_62.setText(_translate("metaX_main", "Scale By")) - self.comboBox_top_heatmap_scale.setItemText(0, _translate("metaX_main", "row")) - self.comboBox_top_heatmap_scale.setItemText(1, _translate("metaX_main", "column")) - self.comboBox_top_heatmap_scale.setItemText(2, _translate("metaX_main", "None")) - self.label_38.setText(_translate("metaX_main", "Theme")) - self.label_153.setText(_translate("metaX_main", "Rename")) - self.label_109.setText(_translate("metaX_main", "Font Size")) - self.label_60.setText(_translate("metaX_main", "Height")) - self.checkBox_top_heatmap_show_all_labels_x.setText(_translate("metaX_main", "X")) - self.checkBox_top_heatmap_show_all_labels_y.setText(_translate("metaX_main", "Y")) - self.label_181.setText(_translate("metaX_main", "Group-Control")) - self.label_182.setText(_translate("metaX_main", "General")) - self.label_59.setText(_translate("metaX_main", "Width")) - self.label_57.setText(_translate("metaX_main", "Sort By")) - self.comboBox_top_heatmap_sort_type.setItemText(0, _translate("metaX_main", "p-value")) - self.comboBox_top_heatmap_sort_type.setItemText(1, _translate("metaX_main", "f-statistic (ANOVA)")) - self.comboBox_top_heatmap_sort_type.setItemText(2, _translate("metaX_main", "t-statistic (T-Test)")) - self.label_180.setText(_translate("metaX_main", "T & ANOVA")) - self.label_30.setText(_translate("metaX_main", "p")) - self.checkBox_cross_heatmap_row_cluster.setText(_translate("metaX_main", "Row Cluster")) - self.checkBox_cross_heatmap_col_cluster.setText(_translate("metaX_main", "Col Cluster")) - self.label_138.setText(_translate("metaX_main", "Log2FC")) - self.label_139.setText(_translate("metaX_main", "To")) - self.label_58.setText(_translate("metaX_main", "Top Number")) - self.label_141.setText(_translate("metaX_main", "Plot Type")) - self.comboBox_cross_3_level_plot_df_type.setItemText(0, _translate("metaX_main", "all_sig")) - self.comboBox_cross_3_level_plot_df_type.setItemText(1, _translate("metaX_main", "no_na")) - self.comboBox_cross_3_level_plot_df_type.setItemText(2, _translate("metaX_main", "same_trends")) - self.checkBox_cross_3_level_plot_remove_zero_col.setText(_translate("metaX_main", "Remove Zero Col")) self.tabWidget_TaxaFuncAnalyzer.setTabText(self.tabWidget_TaxaFuncAnalyzer.indexOf(self.tab_2), _translate("metaX_main", "Cross Test")) self.groupBox_co_expression_plot_settings.setTitle(_translate("metaX_main", "Plotting Parameter")) self.label_190.setText(_translate("metaX_main", "Show All Labels")) diff --git a/metax/taxafunc_ploter/volcano_plot.py b/metax/taxafunc_ploter/volcano_plot.py index 118d7a6..8b10985 100644 --- a/metax/taxafunc_ploter/volcano_plot.py +++ b/metax/taxafunc_ploter/volcano_plot.py @@ -3,8 +3,14 @@ import matplotlib.pyplot as plt class VolcanoPlot: + def __init__(self): + # set the default style + plt.style.use('default') + sns.set_theme() + + def plot_volcano(self, df_fc, pvalue: float = 0.05, p_type='padj', log2fc_min: float = 1, log2fc_max: float = 10, - title_name='2 groups',font_size:int=12, width=8, height=6, dot_size=15): + title_name='2 groups',font_size:int=12, width=8, height=6, dot_size=15, theme:str|None = None): def color_mapping(type_value): if type_value == 'up': @@ -19,49 +25,59 @@ def color_mapping(type_value): return "#6b798e" df = df_fc.copy() + try: + df['type'] = 'normal' + df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] >= log2fc_min) & (df['log2FoldChange'] < log2fc_max), 'type'] = 'up' + df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] >= log2fc_max), 'type'] = 'ultra-up' + df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] <= -log2fc_min) & (df['log2FoldChange'] > -log2fc_max), 'type'] = 'down' + df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] <= -log2fc_max), 'type'] = 'ultra-down' - df['type'] = 'normal' - df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] >= log2fc_min) & (df['log2FoldChange'] < log2fc_max), 'type'] = 'up' - df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] >= log2fc_max), 'type'] = 'ultra-up' - df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] <= -log2fc_min) & (df['log2FoldChange'] > -log2fc_max), 'type'] = 'down' - df.loc[(df[p_type] <= pvalue) & (df['log2FoldChange'] <= -log2fc_max), 'type'] = 'ultra-down' - - # count the number of each type - count_dict = {type_name: len(df[df['type'] == type_name]) for type_name in ['up', 'down', 'ultra-up', 'ultra-down', 'normal']} - print(count_dict) - - # create handles and labels for legend - handles = [] - labels = [] - for t in ['up', 'down', 'ultra-up', 'ultra-down', 'normal']: - if count_dict[t] == 0: - continue - h = plt.scatter([], [], s=150, color=color_mapping(t), alpha=0.8, linewidth=0.5, edgecolor='black') - handles.append(h) - labels.append(f'{t} ({count_dict[t]})') - - # close the previous plot - plt.close() - - # create the volcano plot - plt.figure(figsize=(width, height)) - fig = sns.scatterplot(x=df['log2FoldChange'], y=-np.log10(df[p_type]), s=dot_size*10, hue=df['type'], alpha=0.8, - palette={'up': '#d23918', 'down': '#68945c', 'ultra-up': '#663d74', 'ultra-down': '#206864', 'normal': '#6b798e'}, linewidth=0.5, edgecolor='black') - plt.axhline(y=-np.log10(pvalue), linestyle='--', color='grey', linewidth=1) # padj line - plt.axvline(x=-log2fc_min, linestyle='--', color='grey', linewidth=1) # log2FoldChange line - plt.axvline(x=log2fc_min, linestyle='--', color='grey', linewidth=1) # log2FoldChange line + # set style of the plot + 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) + + + # create the volcano plot + plt.figure(figsize=(width, height)) + fig = sns.scatterplot(x=df['log2FoldChange'], y=-np.log10(df[p_type]), s=dot_size*10, hue=df['type'], alpha=0.8, + palette={'up': '#d23918', 'down': '#68945c', 'ultra-up': '#663d74', 'ultra-down': '#206864', 'normal': '#6b798e'}, linewidth=0.5, edgecolor='black') + plt.axhline(y=-np.log10(pvalue), linestyle='--', color='grey', linewidth=1) # padj line + plt.axvline(x=-log2fc_min, linestyle='--', color='grey', linewidth=1) # log2FoldChange line + plt.axvline(x=log2fc_min, linestyle='--', color='grey', linewidth=1) # log2FoldChange line - # set the title and labels - fig.set_title(f'Volcano plot of {title_name} (padj < {pvalue}, |log2FoldChange| > {log2fc_min})', fontsize=font_size) - fig.set_xlabel('log2FoldChange', fontsize=font_size) - fig.set_ylabel('-log10(padj)', fontsize=font_size) - fig.legend(handles=handles, labels=labels, loc='upper right', fontsize=font_size- 2 if font_size > 2 else 2) - sns.despine(trim=True) + # set the title and labels + fig.set_title(f'Volcano plot of {title_name} ({"padj" if p_type == "padj" else "pvalue"} < {pvalue}, |log2FoldChange| > {log2fc_min})', fontsize=font_size) + fig.set_xlabel('log2FoldChange', fontsize=font_size) + fig.set_ylabel('-log10(padj)', fontsize=font_size) + sns.despine(trim=True) + + + # set the legend + handles= [] + labels = [] + count_dict = {type_name: len(df[df['type'] == type_name]) for type_name in ['up', 'down', 'ultra-up', 'ultra-down', 'normal']} + for t in ['up', 'down', 'ultra-up', 'ultra-down', 'normal']: + if count_dict[t] == 0: + continue + # set the size of dot as font size*10, because when the font size is small, the dot will be overlapped + h = plt.scatter([], [], s=font_size*10, color=color_mapping(t), alpha=0.8, linewidth=0.5, edgecolor='black') + handles.append(h) + labels.append(f'{t} ({count_dict[t]})') + fig.legend(handles=handles, labels=labels, + loc='upper right', fontsize=font_size- 2 if font_size > 2 else 2) + + plt.tight_layout() + plt.show() + return fig - plt.show() - return fig + except Exception as e: + plt.close('all') + raise e # Usage # vp = VolcanoPlot() # vp.plot_volcano(df_fc=df_fc, pvalue=0.05, p_type='padj', log2fc_min=1, log2fc_max=10, title_name='OTFs: PBS vs CHO', font_size=15, -# width=12, height=8, dot_size=150) +# width=12, height=8, dot_size=15) diff --git a/metax/utils/version.py b/metax/utils/version.py index 0b190a9..57a4ae9 100644 --- a/metax/utils/version.py +++ b/metax/utils/version.py @@ -1,2 +1,2 @@ -__version__ = '1.109.7' +__version__ = '1.109.8' API_version = '2' \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0f180b9..77fd009 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "MetaXTools" -version = "1.109.7" +version = "1.109.8" description = "MetaXTools is a novel tool for linking peptide sequences with taxonomic and functional information in Metaproteomics." readme = "README_PyPi.md" license = { text = "NorthOmics" } From 923b0b1e8dccced5a5155e0868a082539cc3cd02 Mon Sep 17 00:00:00 2001 From: Qing <44231502+byemaxx@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:28:03 -0400 Subject: [PATCH 5/7] - Fix: Fixed the bug when restore the object, some cross_test top table was added to the GUI by wrong. - Change: Changed the "pixel_ratio" from 2 to 3 for the HTML plot to make the plot more clear. --- Docs/ChangeLog.md | 7 + metax/gui/main_gui.py | 2 +- metax/taxafunc_ploter/bar_plot_js.py | 4 +- metax/taxafunc_ploter/network_plot.py | 4 +- metax/taxafunc_ploter/sankey_plot.py | 4 +- metax/taxafunc_ploter/sunburst_plot.py | 2 +- .../test_scripts/universal_sankey.py | 167 ++++++++++++++++++ metax/taxafunc_ploter/treemap_plot.py | 2 +- metax/taxafunc_ploter/trends_plot_js.py | 2 +- metax/taxafunc_ploter/volcano_plot_js.py | 2 +- metax/utils/version.py | 2 +- 11 files changed, 186 insertions(+), 12 deletions(-) create mode 100644 metax/taxafunc_ploter/test_scripts/universal_sankey.py diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index 1cb7e38..5e010f3 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,10 @@ +# Version: 1.109.9 +## Date: 2024-08-7 +### Changes: +- Fix: Fixed the bug when restore the object, some cross_test top table was added to the GUI by wrong. +- Change: Changed the "pixel_ratio" from 2 to 3 for the HTML plot to make the plot more clear. + + # Version: 1.109.8 ## Date: 2024-08-1 ### Changes: diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index 5ab5f22..f418f61 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -1199,7 +1199,7 @@ def restore_table_names_to_combox_after_load_taxafunc_obj(self): # checek if name is a part of current_table_name for name in current_table_name_list: - if any([match in name for match in top_heatmap_match_list]): + if any([match in name for match in top_heatmap_match_list]) and 'Cross_Test[' not in name: comboBox_top_heatmap_table_list.append(name) elif 'deseq2(' in name: comboBox_deseq2_tables_list.append(name) diff --git a/metax/taxafunc_ploter/bar_plot_js.py b/metax/taxafunc_ploter/bar_plot_js.py index 7c41c1b..b04e374 100644 --- a/metax/taxafunc_ploter/bar_plot_js.py +++ b/metax/taxafunc_ploter/bar_plot_js.py @@ -126,7 +126,7 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None, save_as_image=opts.ToolBoxFeatureSaveAsImageOpts( type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG", ), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), @@ -259,7 +259,7 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None, feature=opts.ToolBoxFeatureOpts( save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG"), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), data_zoom=opts.ToolBoxFeatureDataZoomOpts(zoom_title="Zoom", diff --git a/metax/taxafunc_ploter/network_plot.py b/metax/taxafunc_ploter/network_plot.py index 92a6349..655930d 100644 --- a/metax/taxafunc_ploter/network_plot.py +++ b/metax/taxafunc_ploter/network_plot.py @@ -296,7 +296,7 @@ def plot_tflink_network( save_as_image=opts.ToolBoxFeatureSaveAsImageOpts( type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG", ), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), @@ -472,7 +472,7 @@ def plot_co_expression_network(self, df_type:str= 'taxa', corr_method:str = 'pea save_as_image=opts.ToolBoxFeatureSaveAsImageOpts( type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG", ), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), diff --git a/metax/taxafunc_ploter/sankey_plot.py b/metax/taxafunc_ploter/sankey_plot.py index e54f247..9913ca9 100644 --- a/metax/taxafunc_ploter/sankey_plot.py +++ b/metax/taxafunc_ploter/sankey_plot.py @@ -231,7 +231,7 @@ def __plot_sankey(self,link_nodes_dict, width, height, title, subtitle=''): nodes=nodes, links=links, node_align='justify', - layout_iterations=50, + layout_iterations=100, node_width=25, emphasis_opts=opts.EmphasisOpts(focus='adjacency'), linestyle_opt=opts.LineStyleOpts( @@ -252,7 +252,7 @@ def __plot_sankey(self,link_nodes_dict, width, height, title, subtitle=''): feature=opts.ToolBoxFeatureOpts( save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG"), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), data_zoom=opts.ToolBoxFeatureDataZoomOpts(zoom_title="Zoom", diff --git a/metax/taxafunc_ploter/sunburst_plot.py b/metax/taxafunc_ploter/sunburst_plot.py index 9dcd37e..b78137e 100644 --- a/metax/taxafunc_ploter/sunburst_plot.py +++ b/metax/taxafunc_ploter/sunburst_plot.py @@ -149,7 +149,7 @@ def create_sunburst_chart(self, taxa_df, width=10, height=8, title='Sunburst', s feature=opts.ToolBoxFeatureOpts( save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG"), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), data_view=opts.ToolBoxFeatureDataViewOpts(title="Data View"), diff --git a/metax/taxafunc_ploter/test_scripts/universal_sankey.py b/metax/taxafunc_ploter/test_scripts/universal_sankey.py new file mode 100644 index 0000000..0ac30b0 --- /dev/null +++ b/metax/taxafunc_ploter/test_scripts/universal_sankey.py @@ -0,0 +1,167 @@ +import pandas as pd +from pyecharts.charts import Sankey +from pyecharts import options as opts + +class SankeyPlot: + def __init__(self, theme='white'): + self.font_size = 12 + self.show_legend = True + self.theme = theme + + def df_to_sankey_df(self, df, value_col='value'): + df.index.name = 'index' + df['index'] = df.index + df = df[['index', value_col]] + + if '<' in df['index'][0]: + index_str = df['index'].str.split("<", expand=True) + taxon_index, func_index = (0, 1) if '|' in index_str[0][0] else (1, 0) + df = df[[value_col]] + df['Taxon'] = index_str[taxon_index].str.replace(">", "") + df['Function'] = index_str[func_index].str.replace(">", "") + else: + df = df[[value_col]] + df['Taxon'] = df.index + + df_t = df['Taxon'].str.split('|', expand=True) + if "Function" in df.columns: + df_t = df_t.join(df['Function']) + + df_t = df_t.join(df[value_col]) + names = df_t.columns.tolist() + names[-1] = 'value' + df_t.columns = names + df_t = df_t[df_t['value'] != 0] + + return df_t + + def convert_df_by_group_for_sankey(self, df, plot_mean=False): + sample_list = df.columns.tolist() + + if plot_mean is not None: + if plot_mean is None: + df = df.mean(axis=1).to_frame(name='mean') + + group_dict = {col: col for col in df.columns} + else: + group_dict = {sample: sample for sample in sample_list} + + df_dict = {} + if len(sample_list) > 1: + df['sum'] = df.sum(axis=1) + df_dict['All'] = self.df_to_sankey_df(df, value_col='sum') + + for group, samples in group_dict.items(): + df_temp = df[samples] + if isinstance(df_temp, pd.Series): + df_temp = pd.DataFrame(df_temp) + + df_temp['sum'] = df_temp.sum(axis=1) + df_temp = df_temp[df_temp['sum'] != 0] + df_temp = self.df_to_sankey_df(df_temp, value_col='sum') + df_dict[group] = df_temp + + return df_dict + + def create_nodes_links(self, df, value_col='value'): + lis = df.columns.tolist()[:-1] + lis1 = lis[:-1] + lis2 = lis[1:] + + df2 = pd.DataFrame() + for i in zip(lis1, lis2): + dfi = df.pivot_table(value_col, index=list(i), aggfunc='sum').reset_index() + dfi.columns = [0, 1, 2] + df2 = pd.concat([df2, dfi]) + + nodes = [] + ln = df2.iloc[:, 0].to_list() + df2.iloc[:, 1].to_list() + ln = list(set(ln)) + for i in ln: + dic = {'name': i} + nodes.append(dic) + print(f'Number of nodes: {len(nodes)}') + + links = [] + for i in df2.values: + dic = {'source': i[0], 'target': i[1], 'value': i[2]} + links.append(dic) + print(f'Number of links: {len(links)}') + + colors = GetDistinctColors().get_distinct_colors(20, convert=True) + node_colors = {} + for idx, node in enumerate(nodes): + available_colors = colors[:] + for link in links: + if link['source'] == node['name'] and link['target'] in node_colors: + if node_colors[link['target']] in available_colors: + available_colors.remove(node_colors[link['target']]) + if link['target'] == node['name'] and link['source'] in node_colors: + if node_colors[link['source']] in available_colors: + available_colors.remove(node_colors[link['source']]) + if not available_colors: + available_colors = colors[:] + chosen_color = available_colors[idx % len(available_colors)] + node_colors[node['name']] = chosen_color + node['itemStyle'] = {'color': chosen_color} + + return nodes, links + + def __plot_sankey(self, link_nodes_dict, width, height, title, subtitle=''): + pic = Sankey(init_opts=opts.InitOpts(width=f"{width*100}px", height=f"{height*100}px", theme=self.theme)) + + for key, value in link_nodes_dict.items(): + nodes = value[0] + links = value[1] + num = value[2] + pic.add( + f'{key} ({num})', + nodes=nodes, + links=links, + node_align='justify', + layout_iterations=100, + node_width=25, + emphasis_opts=opts.EmphasisOpts(focus='adjacency'), + linestyle_opt=opts.LineStyleOpts(curve=0.5, opacity=0.3, color="gray"), + label_opts=opts.LabelOpts(position='right', font_size=self.font_size, color='white' if self.theme == 'dark' else 'black'), + itemstyle_opts=opts.ItemStyleOpts(border_width=1, border_color="black", opacity=0.7), + ) + + pic.set_global_opts( + legend_opts=opts.LegendOpts(selected_mode='single', is_show=self.show_legend, type_="scroll", page_icon_size=8), + toolbox_opts=opts.ToolboxOpts( + is_show=True, + orient="vertical", + pos_left="left", + pos_top="bottom", + feature=opts.ToolBoxFeatureOpts( + save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(type_="png", background_color="black" if self.theme == 'dark' else "white", pixel_ratio=3, title="Save as PNG"), + restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), + data_zoom=opts.ToolBoxFeatureDataZoomOpts(zoom_title="Zoom", is_show=False, back_title="Back"), + data_view=opts.ToolBoxFeatureDataViewOpts(title="Data View"), + magic_type=opts.ToolBoxFeatureMagicTypeOpts(line_title="Line", bar_title="Bar", is_show=False, stack_title="Stack", tiled_title="Tiled"), + ), + ), + title_opts=opts.TitleOpts(title=title, subtitle=subtitle, title_textstyle_opts=opts.TextStyleOpts(font_size=self.font_size + 2)), + ) + + return pic + + def plot_intensity_sankey(self, df, width=12, height=8, title="Sankey Plot", subtitle="", font_size=12, show_legend=True, plot_mean=False): + df = df.copy() + self.font_size = font_size + self.show_legend = show_legend + + df_sankey = self.convert_df_by_group_for_sankey(df, plot_mean=plot_mean) + link_nodes_dict = {} + for key, value in df_sankey.items(): + print(f'Creating nodes and links for {key}...') + nodes, links = self.create_nodes_links(value) + link_nodes_dict[key] = [nodes, links, len(value.index)] + pic = self.__plot_sankey(link_nodes_dict, width=width, height=height, title=title, subtitle=subtitle) + return pic + +# df_sankey is a dataframe, index is "taxon" or "taxon < function>", columns are values +df_sankey = pd.read_csv('data.csv') +pic = SankeyPlot().plot_intensity_sankey(df_sankey, width=12, height=8, title="Sankey Plot", subtitle="", font_size=12, show_legend=False, plot_mean=False) +pic.render_notebook() \ No newline at end of file diff --git a/metax/taxafunc_ploter/treemap_plot.py b/metax/taxafunc_ploter/treemap_plot.py index 0fa67d0..91c70a4 100644 --- a/metax/taxafunc_ploter/treemap_plot.py +++ b/metax/taxafunc_ploter/treemap_plot.py @@ -140,7 +140,7 @@ def create_treemap_chart(self, taxa_df, width=10, height=8, title='TreeMap', sho feature=opts.ToolBoxFeatureOpts( save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG"), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), data_view=opts.ToolBoxFeatureDataViewOpts(title="Data View"), diff --git a/metax/taxafunc_ploter/trends_plot_js.py b/metax/taxafunc_ploter/trends_plot_js.py index 9376597..86f951a 100644 --- a/metax/taxafunc_ploter/trends_plot_js.py +++ b/metax/taxafunc_ploter/trends_plot_js.py @@ -97,7 +97,7 @@ def plot_trends_js(self, df, width:int=15000, height:int=500, title:str|None = N feature=opts.ToolBoxFeatureOpts( save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG"), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), data_view=opts.ToolBoxFeatureDataViewOpts(title="Data View"), diff --git a/metax/taxafunc_ploter/volcano_plot_js.py b/metax/taxafunc_ploter/volcano_plot_js.py index dcefee9..413e43b 100644 --- a/metax/taxafunc_ploter/volcano_plot_js.py +++ b/metax/taxafunc_ploter/volcano_plot_js.py @@ -82,7 +82,7 @@ def color_mapping(type_value): feature=opts.ToolBoxFeatureOpts( save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(type_="png", background_color="black" if self.theme == 'dark' else "white", - pixel_ratio=2, + pixel_ratio=3, title="Save as PNG"), restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"), data_view=opts.ToolBoxFeatureDataViewOpts(title="Data View"), diff --git a/metax/utils/version.py b/metax/utils/version.py index 57a4ae9..6afbf81 100644 --- a/metax/utils/version.py +++ b/metax/utils/version.py @@ -1,2 +1,2 @@ -__version__ = '1.109.8' +__version__ = '1.109.9' API_version = '2' \ No newline at end of file From 003f32ce5e349bd4cf26b7fc052ae019c338781f Mon Sep 17 00:00:00 2001 From: Qing <44231502+byemaxx@users.noreply.github.com> Date: Fri, 9 Aug 2024 18:28:31 -0400 Subject: [PATCH 6/7] - Fix: Fixed the of test result table, the t-statistic was reversed. - New: adde z-score for heatmap scale. --- Docs/ChangeLog.md | 7 + metax/gui/main_gui.py | 39 +-- metax/gui/metax_gui/main_window.ui | 275 +++++++++------- metax/gui/metax_gui/ui_main_window.py | 160 ++++++---- .../analyzer_utils/cross_test.py | 4 + metax/taxafunc_ploter/basic_plot.py | 4 +- metax/taxafunc_ploter/heatmap_plot.py | 295 +++++++++++------- metax/utils/version.py | 2 +- 8 files changed, 465 insertions(+), 321 deletions(-) diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index 5e010f3..70a3cef 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,10 @@ +# Version: 1.109.10 +## Date: 2024-08-9 +### Changes: +- Fix: Fixed the of test result table, the t-statistic was reversed. +- New: adde z-score for heatmap scale. + + # Version: 1.109.9 ## Date: 2024-08-7 ### Changes: diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index f418f61..cf40ceb 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -1175,7 +1175,7 @@ def save_set_multi_table_settings(self): def export_log_file(self): log_path = os.path.join(self.metax_home_path, "MetaX.log") - if os.path.exists(path): + if os.path.exists(log_path): #select a file to save # default output path is self.last_path file_path, _ = QFileDialog.getSaveFileName(self.MainWindow, "Export log file", self.last_path, "Log file (*.log)") @@ -2238,15 +2238,12 @@ def change_event_comboBox_top_heatmap_table(self): # selected_table_name = sender.currentText() selected_table_name = self.comboBox_top_heatmap_table.currentText() - scale_method_list = [self.comboBox_top_heatmap_scale.itemText(i) for i in range(self.comboBox_top_heatmap_scale.count())] if 'dunnett' in selected_table_name or 'deseq2' in selected_table_name: self.spinBox_top_heatmap_number.setEnabled(False) self.pushButton_plot_top_heatmap.setText('Plot Heatmap') self.pushButton_get_top_cross_table.setText('Get Heatmap Table') - # add 'all' to comboBox_top_heatmap_scale. - if 'all' not in scale_method_list: - self.comboBox_top_heatmap_scale.addItem('all') + if 'dunnett_test' in selected_table_name: self.comboBox_top_heatmap_sort_type.setEnabled(False) @@ -2295,9 +2292,7 @@ def change_event_comboBox_top_heatmap_table(self): self.pushButton_get_top_cross_table.setText('Get Top Table') self.comboBox_top_heatmap_sort_type.setEnabled(True) self.spinBox_top_heatmap_number.setEnabled(True) - # remove 'all' from comboBox_top_heatmap_scale. - if 'all' in scale_method_list: - self.comboBox_top_heatmap_scale.removeItem(scale_method_list.index('all')) + @@ -4292,6 +4287,7 @@ def plot_top_heatmap(self): pvalue = round(pvalue, 4) cmap = self.comboBox_top_heatmap_cmap.currentText() scale = self.comboBox_top_heatmap_scale.currentText() + scale_method = self.comboBox_top_heatmap_scale_method.currentText() rename_taxa = self.checkBox_top_heatmap_rename_taxa.isChecked() rename_sample = self.checkBox_top_heatmap_rename_sample.isChecked() show_all_labels = (self.checkBox_top_heatmap_show_all_labels_x.isChecked(), self.checkBox_top_heatmap_show_all_labels_y.isChecked()) @@ -4326,7 +4322,7 @@ def plot_top_heatmap(self): fig_size=fig_size, pvalue=pvalue, cmap=cmap, scale = scale, col_cluster = col_luster, row_cluster = row_luster, rename_taxa=rename_taxa, font_size=font_size, - show_all_labels = show_all_labels) + show_all_labels = show_all_labels, scale_method = scale_method) elif table_name.startswith('deseq2all'): p_type = self.comboBox_top_heatmap_sort_type.currentText() three_levels_df_type = self.comboBox_cross_3_level_plot_df_type.currentText() @@ -4338,7 +4334,8 @@ def plot_top_heatmap(self): scale = scale, col_cluster = col_luster, row_cluster = row_luster, rename_taxa=rename_taxa, font_size=font_size, show_all_labels = show_all_labels,return_type = 'fig', p_type = p_type, - three_levels_df_type = three_levels_df_type,remove_zero_col = remove_zero_col + three_levels_df_type = three_levels_df_type,remove_zero_col = remove_zero_col, + scale_method = scale_method ) # if fig is a tuple @@ -4356,7 +4353,8 @@ def plot_top_heatmap(self): scale = scale, col_cluster = col_luster, row_cluster = row_luster, rename_taxa=rename_taxa, font_size=font_size, show_all_labels = show_all_labels,return_type = 'fig', - three_levels_df_type = three_levels_df_type,remove_zero_col = remove_zero_col + three_levels_df_type = three_levels_df_type,remove_zero_col = remove_zero_col, + scale_method = scale_method ) # if fig is a tuple @@ -4388,13 +4386,14 @@ def plot_top_heatmap(self): top_number=top_num, value_type=value_type, fig_size=fig_size, col_cluster = col_luster, row_cluster = row_luster, pvalue=pvalue, cmap=cmap, rename_taxa=rename_taxa, font_size=font_size, title=title, - show_all_labels = show_all_labels) + show_all_labels = show_all_labels, scale = scale, scale_method = scale_method) else: fig = HeatmapPlot(self.tfa, **self.heatmap_params_dict).plot_basic_heatmap_of_test_res(df=df, top_number=top_num, value_type=value_type, fig_size=fig_size, pvalue=pvalue, scale = scale, col_cluster = col_luster, row_cluster = row_luster, cmap = cmap, rename_taxa=rename_taxa, font_size=font_size, - show_all_labels = show_all_labels, rename_sample = rename_sample) + show_all_labels = show_all_labels, rename_sample = rename_sample, + sort_by = sort_by, scale_method = scale_method) except Exception as e: error_message = traceback.format_exc() @@ -4413,6 +4412,7 @@ def get_top_cross_table(self): pvalue = self.doubleSpinBox_top_heatmap_pvalue.value() pvalue = round(pvalue, 4) scale = self.comboBox_top_heatmap_scale.currentText() + scale_method = self.comboBox_top_heatmap_scale_method.currentText() rename_taxa = self.checkBox_top_heatmap_rename_taxa.isChecked() col_luster = self.checkBox_cross_heatmap_col_cluster.isChecked() row_luster = self.checkBox_cross_heatmap_row_cluster.isChecked() @@ -4429,7 +4429,7 @@ def get_top_cross_table(self): if table_name.startswith('dunnett_test'): df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).get_heatmap_table_of_dunnett_res(df = df, pvalue=pvalue,scale = scale, col_cluster = col_luster, row_cluster = row_luster, - rename_taxa=rename_taxa) + rename_taxa=rename_taxa, scale_method = scale_method) elif 'deseq2all' in table_name: p_type = self.comboBox_top_heatmap_sort_type.currentText() df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).plot_heatmap_of_all_condition_res(df = df, res_df_type='deseq2', @@ -4439,7 +4439,7 @@ def get_top_cross_table(self): col_cluster = col_luster, row_cluster = row_luster, rename_taxa=rename_taxa, return_type = 'table', p_type = p_type, three_levels_df_type = self.comboBox_cross_3_level_plot_df_type.currentText(), - remove_zero_col = remove_zero_col + remove_zero_col = remove_zero_col, scale_method = scale_method ) elif 'dunnettAllCondtion' in table_name: df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).plot_heatmap_of_all_condition_res(df = df, res_df_type='dunnett', @@ -4447,7 +4447,7 @@ def get_top_cross_table(self): col_cluster = col_luster, row_cluster = row_luster, rename_taxa=rename_taxa, return_type = 'table', three_levels_df_type = self.comboBox_cross_3_level_plot_df_type.currentText(), - remove_zero_col = remove_zero_col + remove_zero_col = remove_zero_col, scale_method = scale_method ) @@ -4456,12 +4456,13 @@ def get_top_cross_table(self): df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).get_top_across_table(df=df, top_number=top_num, col_cluster = col_luster, row_cluster = row_luster, value_type=value_type, pvalue=pvalue, - rename_taxa=rename_taxa) - else: + rename_taxa=rename_taxa, scale = scale, scale_method = scale_method) + else: # get result of test and anova of [taxa, functions, peptides and custom table] + # get the intensity of the result items which are significant df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).get_top_across_table_basic(df=df, top_number=top_num, col_cluster = col_luster, row_cluster = row_luster, value_type=value_type, pvalue=pvalue, - scale = scale, rename_taxa=rename_taxa) + scale = scale, rename_taxa=rename_taxa, scale_method = scale_method) except ValueError as e: QMessageBox.warning(self.MainWindow, 'Warning', f'No significant results.\n\n{e}') return None diff --git a/metax/gui/metax_gui/main_window.ui b/metax/gui/metax_gui/main_window.ui index 011bfd9..2844d1d 100644 --- a/metax/gui/metax_gui/main_window.ui +++ b/metax/gui/metax_gui/main_window.ui @@ -7,7 +7,7 @@ 0 0 1122 - 707 + 794 @@ -246,7 +246,7 @@ 0 0 528 - 486 + 573 @@ -1371,7 +1371,7 @@ 16777215 - 250 + 280 @@ -1400,7 +1400,7 @@ 0 0 - 660 + 1016 232 @@ -2376,7 +2376,7 @@ - + 0 0 @@ -2654,7 +2654,7 @@ 16777215 - 250 + 280 @@ -2671,8 +2671,8 @@ 0 0 - 999 - 150 + 1016 + 162 @@ -2811,6 +2811,11 @@ column + + + all + + None @@ -3640,7 +3645,7 @@ 16777215 - 220 + 240 @@ -3670,7 +3675,7 @@ 0 0 1003 - 124 + 126 @@ -3800,6 +3805,11 @@ column + + + all + + None @@ -3809,57 +3819,6 @@ - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Theme - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - - @@ -4099,7 +4058,7 @@ - + 0 0 @@ -4159,6 +4118,92 @@ + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Colors + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 75 + true + + + + T & ANOVA + + + + + @@ -4221,48 +4266,6 @@ - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 75 - true - - - - T & ANOVA - - - - - - - - - p - - - @@ -4612,6 +4615,43 @@ + + + + + + + 0 + 0 + + + + with + + + + + + + + 0 + 0 + + + + + maxmin + + + + + zscore + + + + + + @@ -5501,9 +5541,9 @@ 0 - -17 - 979 - 94 + 0 + 996 + 146 @@ -6021,7 +6061,7 @@ QTabWidget::Triangular - 1 + 0 @@ -6053,8 +6093,8 @@ 0 0 - 493 - 128 + 1016 + 181 @@ -7284,7 +7324,7 @@ 0 0 1016 - 69 + 144 @@ -7615,7 +7655,7 @@ QTabWidget::Triangular - 1 + 0 @@ -8131,8 +8171,8 @@ 0 0 - 775 - 102 + 1016 + 185 @@ -8518,6 +8558,11 @@ column + + + all + + None @@ -9047,7 +9092,7 @@ 0 0 1016 - 93 + 168 diff --git a/metax/gui/metax_gui/ui_main_window.py b/metax/gui/metax_gui/ui_main_window.py index 804aa5f..bf9e99b 100644 --- a/metax/gui/metax_gui/ui_main_window.py +++ b/metax/gui/metax_gui/ui_main_window.py @@ -14,7 +14,7 @@ class Ui_metaX_main(object): def setupUi(self, metaX_main): metaX_main.setObjectName("metaX_main") - metaX_main.resize(1122, 707) + metaX_main.resize(1122, 794) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -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, 528, 486)) + self.page_2.setGeometry(QtCore.QRect(0, 0, 528, 573)) self.page_2.setObjectName("page_2") self.gridLayout_27 = QtWidgets.QGridLayout(self.page_2) self.gridLayout_27.setObjectName("gridLayout_27") @@ -692,7 +692,7 @@ def setupUi(self, metaX_main): self.line_7.setObjectName("line_7") self.gridLayout_26.addWidget(self.line_7, 1, 0, 1, 3) self.groupBox_basic_plot = QtWidgets.QGroupBox(self.tab_12) - self.groupBox_basic_plot.setMaximumSize(QtCore.QSize(16777215, 250)) + self.groupBox_basic_plot.setMaximumSize(QtCore.QSize(16777215, 280)) self.groupBox_basic_plot.setObjectName("groupBox_basic_plot") self.gridLayout_40 = QtWidgets.QGridLayout(self.groupBox_basic_plot) self.gridLayout_40.setObjectName("gridLayout_40") @@ -706,7 +706,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, 660, 232)) + self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 1016, 232)) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.gridLayout_34 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents) self.gridLayout_34.setObjectName("gridLayout_34") @@ -1209,7 +1209,7 @@ def setupUi(self, metaX_main): self.label_70.setObjectName("label_70") self.horizontalLayout_35.addWidget(self.label_70) self.comboBox_table4pca = QtWidgets.QComboBox(self.tab_12) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.comboBox_table4pca.sizePolicy().hasHeightForWidth()) @@ -1362,7 +1362,7 @@ def setupUi(self, metaX_main): self.pushButton_basic_heatmap_add.setObjectName("pushButton_basic_heatmap_add") self.gridLayout_23.addWidget(self.pushButton_basic_heatmap_add, 5, 3, 1, 1) self.groupBox_basic_heatmap_plot_settings = QtWidgets.QGroupBox(self.tab_13) - self.groupBox_basic_heatmap_plot_settings.setMaximumSize(QtCore.QSize(16777215, 250)) + self.groupBox_basic_heatmap_plot_settings.setMaximumSize(QtCore.QSize(16777215, 280)) self.groupBox_basic_heatmap_plot_settings.setObjectName("groupBox_basic_heatmap_plot_settings") self.gridLayout_41 = QtWidgets.QGridLayout(self.groupBox_basic_heatmap_plot_settings) self.gridLayout_41.setObjectName("gridLayout_41") @@ -1370,7 +1370,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, 999, 150)) + self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 1016, 162)) self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2") self.gridLayout_50 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_2) self.gridLayout_50.setObjectName("gridLayout_50") @@ -1453,6 +1453,7 @@ def setupUi(self, metaX_main): self.comboBox_basic_hetatmap_scale.addItem("") self.comboBox_basic_hetatmap_scale.addItem("") self.comboBox_basic_hetatmap_scale.addItem("") + self.comboBox_basic_hetatmap_scale.addItem("") self.horizontalLayout_87.addWidget(self.comboBox_basic_hetatmap_scale) self.label_13 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) @@ -1904,7 +1905,7 @@ def setupUi(self, metaX_main): self.gridLayout_46.addWidget(self.checkBox_2, 1, 0, 1, 1) self.gridLayout_75.addLayout(self.gridLayout_46, 0, 0, 1, 1) self.groupBox_cross_heatmap_settings = QtWidgets.QGroupBox(self.groupBox_cross_heatmap_plot) - self.groupBox_cross_heatmap_settings.setMaximumSize(QtCore.QSize(16777215, 220)) + self.groupBox_cross_heatmap_settings.setMaximumSize(QtCore.QSize(16777215, 240)) self.groupBox_cross_heatmap_settings.setObjectName("groupBox_cross_heatmap_settings") self.gridLayout_52 = QtWidgets.QGridLayout(self.groupBox_cross_heatmap_settings) self.gridLayout_52.setObjectName("gridLayout_52") @@ -1918,7 +1919,7 @@ def setupUi(self, metaX_main): self.scrollArea_cross_heatmap_settings.setWidgetResizable(True) self.scrollArea_cross_heatmap_settings.setObjectName("scrollArea_cross_heatmap_settings") self.scrollAreaWidgetContents_3 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 1003, 124)) + self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 1003, 126)) self.scrollAreaWidgetContents_3.setObjectName("scrollAreaWidgetContents_3") self.gridLayout_38 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_3) self.gridLayout_38.setObjectName("gridLayout_38") @@ -1981,31 +1982,9 @@ def setupUi(self, metaX_main): self.comboBox_top_heatmap_scale.addItem("") self.comboBox_top_heatmap_scale.addItem("") self.comboBox_top_heatmap_scale.addItem("") + self.comboBox_top_heatmap_scale.addItem("") self.horizontalLayout_19.addWidget(self.comboBox_top_heatmap_scale) self.gridLayout_51.addLayout(self.horizontalLayout_19, 1, 1, 1, 1) - self.horizontalLayout_21 = QtWidgets.QHBoxLayout() - self.horizontalLayout_21.setObjectName("horizontalLayout_21") - self.label_38 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_38.sizePolicy().hasHeightForWidth()) - self.label_38.setSizePolicy(sizePolicy) - self.label_38.setMinimumSize(QtCore.QSize(0, 0)) - self.label_38.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_38.setObjectName("label_38") - self.horizontalLayout_21.addWidget(self.label_38) - self.comboBox_top_heatmap_cmap = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_cmap.sizePolicy().hasHeightForWidth()) - self.comboBox_top_heatmap_cmap.setSizePolicy(sizePolicy) - self.comboBox_top_heatmap_cmap.setMinimumSize(QtCore.QSize(0, 0)) - self.comboBox_top_heatmap_cmap.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.comboBox_top_heatmap_cmap.setObjectName("comboBox_top_heatmap_cmap") - self.horizontalLayout_21.addWidget(self.comboBox_top_heatmap_cmap) - self.gridLayout_51.addLayout(self.horizontalLayout_21, 1, 2, 1, 1) self.label_153 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) self.label_153.setMinimumSize(QtCore.QSize(0, 0)) self.label_153.setMaximumSize(QtCore.QSize(16777215, 16777215)) @@ -2111,7 +2090,7 @@ def setupUi(self, metaX_main): self.horizontalLayout_16 = QtWidgets.QHBoxLayout() self.horizontalLayout_16.setObjectName("horizontalLayout_16") self.label_59 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_59.sizePolicy().hasHeightForWidth()) @@ -2137,29 +2116,29 @@ def setupUi(self, metaX_main): self.gridLayout_51.addLayout(self.horizontalLayout_16, 0, 1, 1, 1) self.horizontalLayout_86 = QtWidgets.QHBoxLayout() self.horizontalLayout_86.setObjectName("horizontalLayout_86") - self.label_57 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + self.horizontalLayout_21 = QtWidgets.QHBoxLayout() + self.horizontalLayout_21.setObjectName("horizontalLayout_21") + self.label_38 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_57.sizePolicy().hasHeightForWidth()) - self.label_57.setSizePolicy(sizePolicy) - self.label_57.setMinimumSize(QtCore.QSize(0, 0)) - self.label_57.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.label_57.setObjectName("label_57") - self.horizontalLayout_86.addWidget(self.label_57) - self.comboBox_top_heatmap_sort_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) + sizePolicy.setHeightForWidth(self.label_38.sizePolicy().hasHeightForWidth()) + self.label_38.setSizePolicy(sizePolicy) + self.label_38.setMinimumSize(QtCore.QSize(0, 0)) + self.label_38.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_38.setObjectName("label_38") + self.horizontalLayout_21.addWidget(self.label_38) + self.comboBox_top_heatmap_cmap = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_sort_type.sizePolicy().hasHeightForWidth()) - self.comboBox_top_heatmap_sort_type.setSizePolicy(sizePolicy) - self.comboBox_top_heatmap_sort_type.setMinimumSize(QtCore.QSize(0, 0)) - self.comboBox_top_heatmap_sort_type.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.comboBox_top_heatmap_sort_type.setObjectName("comboBox_top_heatmap_sort_type") - self.comboBox_top_heatmap_sort_type.addItem("") - self.comboBox_top_heatmap_sort_type.addItem("") - self.comboBox_top_heatmap_sort_type.addItem("") - self.horizontalLayout_86.addWidget(self.comboBox_top_heatmap_sort_type) + sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_cmap.sizePolicy().hasHeightForWidth()) + self.comboBox_top_heatmap_cmap.setSizePolicy(sizePolicy) + self.comboBox_top_heatmap_cmap.setMinimumSize(QtCore.QSize(0, 0)) + self.comboBox_top_heatmap_cmap.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.comboBox_top_heatmap_cmap.setObjectName("comboBox_top_heatmap_cmap") + self.horizontalLayout_21.addWidget(self.comboBox_top_heatmap_cmap) + self.horizontalLayout_86.addLayout(self.horizontalLayout_21) self.gridLayout_51.addLayout(self.horizontalLayout_86, 1, 3, 1, 1) self.label_180 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) @@ -2177,9 +2156,29 @@ def setupUi(self, metaX_main): self.gridLayout_51.addWidget(self.label_180, 2, 0, 1, 1) self.horizontalLayout_93 = QtWidgets.QHBoxLayout() self.horizontalLayout_93.setObjectName("horizontalLayout_93") - self.label_30 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) - self.label_30.setObjectName("label_30") - self.horizontalLayout_93.addWidget(self.label_30) + self.label_57 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_57.sizePolicy().hasHeightForWidth()) + self.label_57.setSizePolicy(sizePolicy) + self.label_57.setMinimumSize(QtCore.QSize(0, 0)) + self.label_57.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.label_57.setObjectName("label_57") + self.horizontalLayout_93.addWidget(self.label_57) + self.comboBox_top_heatmap_sort_type = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_sort_type.sizePolicy().hasHeightForWidth()) + self.comboBox_top_heatmap_sort_type.setSizePolicy(sizePolicy) + self.comboBox_top_heatmap_sort_type.setMinimumSize(QtCore.QSize(0, 0)) + self.comboBox_top_heatmap_sort_type.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.comboBox_top_heatmap_sort_type.setObjectName("comboBox_top_heatmap_sort_type") + self.comboBox_top_heatmap_sort_type.addItem("") + self.comboBox_top_heatmap_sort_type.addItem("") + self.comboBox_top_heatmap_sort_type.addItem("") + self.horizontalLayout_93.addWidget(self.comboBox_top_heatmap_sort_type) self.doubleSpinBox_top_heatmap_pvalue = QtWidgets.QDoubleSpinBox(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -2314,6 +2313,27 @@ def setupUi(self, metaX_main): self.checkBox_cross_3_level_plot_remove_zero_col.setChecked(True) self.checkBox_cross_3_level_plot_remove_zero_col.setObjectName("checkBox_cross_3_level_plot_remove_zero_col") self.gridLayout_51.addWidget(self.checkBox_cross_3_level_plot_remove_zero_col, 3, 5, 1, 1) + self.horizontalLayout_48 = QtWidgets.QHBoxLayout() + self.horizontalLayout_48.setObjectName("horizontalLayout_48") + self.label_30 = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_30.sizePolicy().hasHeightForWidth()) + self.label_30.setSizePolicy(sizePolicy) + self.label_30.setObjectName("label_30") + self.horizontalLayout_48.addWidget(self.label_30) + self.comboBox_top_heatmap_scale_method = QtWidgets.QComboBox(self.scrollAreaWidgetContents_3) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboBox_top_heatmap_scale_method.sizePolicy().hasHeightForWidth()) + self.comboBox_top_heatmap_scale_method.setSizePolicy(sizePolicy) + self.comboBox_top_heatmap_scale_method.setObjectName("comboBox_top_heatmap_scale_method") + self.comboBox_top_heatmap_scale_method.addItem("") + self.comboBox_top_heatmap_scale_method.addItem("") + self.horizontalLayout_48.addWidget(self.comboBox_top_heatmap_scale_method) + self.gridLayout_51.addLayout(self.horizontalLayout_48, 1, 2, 1, 1) self.gridLayout_38.addLayout(self.gridLayout_51, 0, 1, 1, 1) self.scrollArea_cross_heatmap_settings.setWidget(self.scrollAreaWidgetContents_3) self.gridLayout_52.addWidget(self.scrollArea_cross_heatmap_settings, 0, 0, 1, 1) @@ -2824,7 +2844,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, -17, 979, 94)) + self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 996, 146)) self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4") self.gridLayout_68 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_4) self.gridLayout_68.setObjectName("gridLayout_68") @@ -3125,7 +3145,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, 493, 128)) + self.scrollAreaWidgetContents_5.setGeometry(QtCore.QRect(0, 0, 1016, 181)) self.scrollAreaWidgetContents_5.setObjectName("scrollAreaWidgetContents_5") self.gridLayout_49 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_5) self.gridLayout_49.setObjectName("gridLayout_49") @@ -3770,7 +3790,7 @@ def setupUi(self, metaX_main): self.scrollArea_5.setWidgetResizable(True) self.scrollArea_5.setObjectName("scrollArea_5") self.scrollAreaWidgetContents_6 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_6.setGeometry(QtCore.QRect(0, 0, 1016, 69)) + self.scrollAreaWidgetContents_6.setGeometry(QtCore.QRect(0, 0, 1016, 144)) self.scrollAreaWidgetContents_6.setObjectName("scrollAreaWidgetContents_6") self.gridLayout_57 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_6) self.gridLayout_57.setObjectName("gridLayout_57") @@ -4241,7 +4261,7 @@ def setupUi(self, metaX_main): self.scrollArea_6.setWidgetResizable(True) self.scrollArea_6.setObjectName("scrollArea_6") self.scrollAreaWidgetContents_7 = QtWidgets.QWidget() - self.scrollAreaWidgetContents_7.setGeometry(QtCore.QRect(0, 0, 775, 102)) + self.scrollAreaWidgetContents_7.setGeometry(QtCore.QRect(0, 0, 1016, 185)) self.scrollAreaWidgetContents_7.setObjectName("scrollAreaWidgetContents_7") self.gridLayout_69 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_7) self.gridLayout_69.setObjectName("gridLayout_69") @@ -4470,6 +4490,7 @@ def setupUi(self, metaX_main): self.comboBox_tflink_hetatmap_scale.addItem("") self.comboBox_tflink_hetatmap_scale.addItem("") self.comboBox_tflink_hetatmap_scale.addItem("") + self.comboBox_tflink_hetatmap_scale.addItem("") self.horizontalLayout_47.addWidget(self.comboBox_tflink_hetatmap_scale) self.label_61 = QtWidgets.QLabel(self.scrollAreaWidgetContents_7) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) @@ -4744,7 +4765,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, 1016, 93)) + self.scrollAreaWidgetContents_8.setGeometry(QtCore.QRect(0, 0, 1016, 168)) self.scrollAreaWidgetContents_8.setObjectName("scrollAreaWidgetContents_8") self.gridLayout_66 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_8) self.gridLayout_66.setObjectName("gridLayout_66") @@ -5319,8 +5340,8 @@ def setupUi(self, metaX_main): self.toolBox_2.setCurrentIndex(0) self.tabWidget_4.setCurrentIndex(1) self.tabWidget_3.setCurrentIndex(3) - self.tabWidget.setCurrentIndex(1) - self.tabWidget_2.setCurrentIndex(1) + self.tabWidget.setCurrentIndex(0) + self.tabWidget_2.setCurrentIndex(0) self.tabWidget_6.setCurrentIndex(1) self.toolBox_metalab_res_anno.setCurrentIndex(0) self.tabWidget_5.setCurrentIndex(0) @@ -5596,7 +5617,8 @@ def retranslateUi(self, metaX_main): self.label_31.setText(_translate("metaX_main", "Scale")) self.comboBox_basic_hetatmap_scale.setItemText(0, _translate("metaX_main", "row")) self.comboBox_basic_hetatmap_scale.setItemText(1, _translate("metaX_main", "column")) - self.comboBox_basic_hetatmap_scale.setItemText(2, _translate("metaX_main", "None")) + self.comboBox_basic_hetatmap_scale.setItemText(2, _translate("metaX_main", "all")) + self.comboBox_basic_hetatmap_scale.setItemText(3, _translate("metaX_main", "None")) self.label_13.setText(_translate("metaX_main", "Theme")) self.checkBox_basic_hetatmap_row_cluster.setText(_translate("metaX_main", "Row Cluster")) self.label_183.setText(_translate("metaX_main", "General")) @@ -5660,8 +5682,8 @@ def retranslateUi(self, metaX_main): self.label_62.setText(_translate("metaX_main", "Scale By")) self.comboBox_top_heatmap_scale.setItemText(0, _translate("metaX_main", "row")) self.comboBox_top_heatmap_scale.setItemText(1, _translate("metaX_main", "column")) - self.comboBox_top_heatmap_scale.setItemText(2, _translate("metaX_main", "None")) - self.label_38.setText(_translate("metaX_main", "Theme")) + self.comboBox_top_heatmap_scale.setItemText(2, _translate("metaX_main", "all")) + self.comboBox_top_heatmap_scale.setItemText(3, _translate("metaX_main", "None")) self.label_153.setText(_translate("metaX_main", "Rename")) self.label_109.setText(_translate("metaX_main", "Font Size")) self.label_60.setText(_translate("metaX_main", "Height")) @@ -5670,12 +5692,12 @@ def retranslateUi(self, metaX_main): self.label_181.setText(_translate("metaX_main", "Group-Control")) self.label_182.setText(_translate("metaX_main", "General")) self.label_59.setText(_translate("metaX_main", "Width")) + self.label_38.setText(_translate("metaX_main", "Colors")) + self.label_180.setText(_translate("metaX_main", "T & ANOVA")) self.label_57.setText(_translate("metaX_main", "Sort By")) self.comboBox_top_heatmap_sort_type.setItemText(0, _translate("metaX_main", "p-value")) self.comboBox_top_heatmap_sort_type.setItemText(1, _translate("metaX_main", "f-statistic (ANOVA)")) self.comboBox_top_heatmap_sort_type.setItemText(2, _translate("metaX_main", "t-statistic (T-Test)")) - self.label_180.setText(_translate("metaX_main", "T & ANOVA")) - self.label_30.setText(_translate("metaX_main", "p")) self.checkBox_cross_heatmap_row_cluster.setText(_translate("metaX_main", "Row Cluster")) self.checkBox_cross_heatmap_col_cluster.setText(_translate("metaX_main", "Col Cluster")) self.label_138.setText(_translate("metaX_main", "Log2FC")) @@ -5686,6 +5708,9 @@ def retranslateUi(self, metaX_main): self.comboBox_cross_3_level_plot_df_type.setItemText(1, _translate("metaX_main", "no_na")) self.comboBox_cross_3_level_plot_df_type.setItemText(2, _translate("metaX_main", "same_trends")) self.checkBox_cross_3_level_plot_remove_zero_col.setText(_translate("metaX_main", "Remove Zero Col")) + self.label_30.setText(_translate("metaX_main", "with")) + self.comboBox_top_heatmap_scale_method.setItemText(0, _translate("metaX_main", "maxmin")) + self.comboBox_top_heatmap_scale_method.setItemText(1, _translate("metaX_main", "zscore")) self.label_36.setText(_translate("metaX_main", "Table")) self.comboBox_table_for_ttest.setItemText(0, _translate("metaX_main", "Taxa-Functions")) self.comboBox_table_for_ttest.setItemText(1, _translate("metaX_main", "Taxa")) @@ -5929,7 +5954,8 @@ def retranslateUi(self, metaX_main): self.label_23.setText(_translate("metaX_main", "Scale")) self.comboBox_tflink_hetatmap_scale.setItemText(0, _translate("metaX_main", "row")) self.comboBox_tflink_hetatmap_scale.setItemText(1, _translate("metaX_main", "column")) - self.comboBox_tflink_hetatmap_scale.setItemText(2, _translate("metaX_main", "None")) + self.comboBox_tflink_hetatmap_scale.setItemText(2, _translate("metaX_main", "all")) + self.comboBox_tflink_hetatmap_scale.setItemText(3, _translate("metaX_main", "None")) self.label_61.setText(_translate("metaX_main", "Theme")) self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_8), _translate("metaX_main", "Taxa-Func Link")) self.radioButton_network_bysample.setText(_translate("metaX_main", "Sample")) diff --git a/metax/taxafunc_analyzer/analyzer_utils/cross_test.py b/metax/taxafunc_analyzer/analyzer_utils/cross_test.py index fcc452f..bd25fe6 100644 --- a/metax/taxafunc_analyzer/analyzer_utils/cross_test.py +++ b/metax/taxafunc_analyzer/analyzer_utils/cross_test.py @@ -151,6 +151,10 @@ def get_stats_ttest(self, group_list: list = None, df_type: str = 'taxa-func', c res["t-statistic"].append(t) res = pd.DataFrame(res) + + # print('reverse the t-statistic value due to the order of group_list is not correct') + res['t-statistic'] = -res['t-statistic'] + on_values = [primary] if df_type in ['taxa-func', 'func-taxa']: on_values.append(secondary) diff --git a/metax/taxafunc_ploter/basic_plot.py b/metax/taxafunc_ploter/basic_plot.py index 4f597d4..05d4c9d 100644 --- a/metax/taxafunc_ploter/basic_plot.py +++ b/metax/taxafunc_ploter/basic_plot.py @@ -402,7 +402,7 @@ def plot_corr_sns( cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label('Intensity', rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('left') + cbar.ax.yaxis.set_label_position('right') plt.subplots_adjust(left=0.03, bottom=0.095, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() @@ -624,7 +624,7 @@ def plot_items_corr_heatmap( cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label("Correlation", rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('left') + cbar.ax.yaxis.set_label_position('right') plt.subplots_adjust(left=0.03, bottom=0.095, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() diff --git a/metax/taxafunc_ploter/heatmap_plot.py b/metax/taxafunc_ploter/heatmap_plot.py index 303d3b1..fe4043c 100644 --- a/metax/taxafunc_ploter/heatmap_plot.py +++ b/metax/taxafunc_ploter/heatmap_plot.py @@ -1,5 +1,9 @@ -from distinctipy import distinctipy +# for scaling data +import pandas as pd +from sklearn.preprocessing import StandardScaler +import numpy as np +# for heatmap plot import seaborn as sns import matplotlib.pyplot as plt from .get_distinct_colors import GetDistinctColors @@ -16,6 +20,7 @@ def __init__(self, tfobj, linkage_method:str = 'average', distance_metric:str = # EXAMPLE: plot_top_taxa_func_heatmap_of_test_res(df_anova, sw.func, 200, 'f', (30,30)) # reset sns style sns.set_theme() + plt.style.use('default') def rename_taxa(self, df): first_index = df.index[0] @@ -36,19 +41,23 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, value_type:str = 'p', fig_size:tuple|None = None, pvalue:float = 0.05, col_cluster:bool = True, row_cluster:bool = True, cmap:str|None = None, rename_taxa:bool = True, font_size:int = 10, title:str = '', - show_all_labels:tuple = (False, False), return_type:str = 'fig'): + show_all_labels:tuple = (False, False), return_type:str = 'fig', scale = None, scale_method:str = 'maxmin'): func_name = self.tfa.func_name dft = df.copy() dft.reset_index(inplace=True) - type_map = {'f': ('f-statistic', 'Spectral_r', 1), - 'p': ('P-value', 'Reds_r', None), - 't': ('t-statistic', 'hot_r', 1)} + - plot_type = type_map.get(value_type, None)[0] - if plot_type is None: + + # type_map: 1st: plot_type, 2nd: cmap + type_map = {'f': ('f-statistic', 'Spectral_r'), + 'p': ('P-value', 'Reds_r'), + 't': ('t-statistic', 'RdBu_r')} + + plot_type = type_map.get(value_type, "None")[0] + if plot_type == "None": raise ValueError("type must be 'p' or 'f' or 't'") @@ -59,9 +68,9 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, if cmap is None: - plot_type, cmap, scale = type_map.get(value_type, None) + plot_type, cmap = type_map.get(value_type, None) else: - plot_type, _, scale = type_map.get(value_type, None) + plot_type, _ = type_map.get(value_type, None) @@ -83,14 +92,14 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, print(f"Top [{top_number}] significant: Taxa ({df_top.shape[1]}), Functions ({df_top.shape[0]})") df_plot = df_top.fillna(1) if plot_type == 'P-value' else df_top.fillna(0) - sns.set_style("white") + df_plot = self.scale_data(df = df_plot, scale_by = scale, method = scale_method) if return_type == 'fig': sns_params = { "center": 0, "cmap": cmap, - "linewidths": 0.2, - "linecolor": (0, 0, 0, 0.1), # last value is alpha value, 0 is transparent, 1 is opaque + "linewidths": 0.5, + "linecolor": 'gray', "dendrogram_ratio": (0.1, 0.2), "figsize": fig_size, "col_cluster": col_cluster, @@ -110,9 +119,9 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, fig.ax_heatmap.set_xlabel("Taxa") fig.ax_heatmap.set_ylabel("Functions") if title == "": - title = f"Significant Differences between groups in Taxa-Function (Sorted by {plot_type} Top {top_number})" + title = f"Significant Differences between groups in Taxa-Function (Top {top_number} sorted by {plot_type} , scaled by {scale})" else: - title = f"{title} (Sorted by {plot_type} Top {top_number})" + title = f"{title} (Top {top_number} sorted by {plot_type} , scaled by {scale})" plt.suptitle(title, weight='bold') @@ -130,8 +139,8 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label(plot_type, rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('left') - + cbar.ax.yaxis.set_label_position('right') + plt.subplots_adjust(left=0.06, bottom=0.35, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() @@ -147,7 +156,6 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, "row_cluster": row_cluster, "method": self.linkage_method, "metric": self.distance_metric, - "standard_scale": scale, "mask": df_top.isnull(), } fig = sns.clustermap(df_plot, **sns_params) @@ -179,20 +187,28 @@ def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:st fig_size:tuple|None = None, pvalue:float = 0.05, scale = None, col_cluster:bool = True, row_cluster:bool = True, cmap:str|None = None, rename_taxa:bool = True, font_size:int = 10, - show_all_labels:tuple = (False, False), rename_sample:bool = True + show_all_labels:tuple = (False, False), rename_sample:bool = True, + sort_by:str = 'P-value', scale_method:str = 'maxmin' ): dft = df.copy() + + scale_map ={None: None, + 'None': None, + 'row': 0, + 'column': 1} + scale = scale_map.get(scale) + scale_map ={None: None, 'None': None, 'row': 0, 'column': 1} scale = scale_map.get(scale) - type_map = {'f': ('f-statistic', 'Spectral_r'), - 'p': ('P-value', 'RdGy_r'), # Reds, hot_r were used before - 't': ('t-statistic', 'RdGy_r')} + type_map = {'f': ('f-statistic', 'Spectral_r' if scale_method == 'maxmin' else 'RdBu_r'), + 'p': ('P-value', 'RdGy_r' if scale_method == 'maxmin' else 'RdBu_r'), + 't': ('t-statistic', 'RdGy_r' if scale_method == 'maxmin' else 'RdBu_r')} if cmap is None: plot_type, cmap = type_map.get(value_type) @@ -210,14 +226,24 @@ def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:st dft = dft[dft['P-value'] < pvalue] - if 'f-statistic' in dft.columns.tolist(): - dft = dft.sort_values(by=['P-value', 'f-statistic'], ascending=[True, False]) - mat = dft.head(top_number) - mat= mat.drop(['P-value', 'f-statistic' ], axis=1) - elif 't-statistic' in dft.columns.tolist(): - dft = dft.sort_values(by=['P-value', 't-statistic'], ascending=[True, False]) - mat = dft.head(top_number) - mat= mat.drop(['P-value', 't-statistic'], axis=1) + if 'f-statistic' in dft.columns: + sort_column = 'f-statistic' if sort_by == 'f-statistic' else 'P-value' + ascending = sort_by == 'P-value' # True if sort_by is 'P-value' else False + dft = dft.sort_values(by=[sort_column], ascending=ascending) + mat = dft.head(top_number).drop(['P-value', 'f-statistic'], axis=1) + + elif 't-statistic' in dft.columns: + if sort_by == 't-statistic': + dft['abs_t-statistic'] = dft['t-statistic'].abs() + sort_column = 'abs_t-statistic' + ascending = False + else: + sort_column = 'P-value' + ascending = True + + dft = dft.sort_values(by=[sort_column], ascending=ascending) + mat = dft.head(top_number).drop(['P-value', 't-statistic', 'abs_t-statistic'], axis=1, errors='ignore') + else: raise ValueError("No 'f-statistic' or 't-statistic' in the dataframe") @@ -226,9 +252,6 @@ def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:st if len(mat.columns) < 2: col_cluster = False - meta_df = self.tfa.meta_df - meta_name = self.tfa.meta_name - if fig_size is None: fig_size = (30,30) @@ -244,6 +267,9 @@ def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:st if rename_taxa: mat = self.rename_taxa(mat) + + mat = self.scale_data(df = mat, scale_by = scale, method = scale_method) + sns_params = { "center": 0, "cmap": cmap, @@ -253,7 +279,6 @@ def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:st "row_cluster": row_cluster, "method": self.linkage_method, "metric": self.distance_metric, - "standard_scale": scale, "col_colors": color_list, "xticklabels": True if show_all_labels[0] else "auto", "yticklabels": True if show_all_labels[1] else "auto", @@ -264,13 +289,12 @@ def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:st fig.ax_heatmap.set_xticklabels(fig.ax_heatmap.get_xmajorticklabels(), fontsize=font_size, rotation=90) fig.ax_heatmap.set_yticklabels(fig.ax_heatmap.get_ymajorticklabels(), fontsize=font_size, rotation=0) plt.suptitle( - f"The Heatmap of intensity sorted by {plot_type} of Significant differences between groups (top {top_number})", - weight='bold' + f"The Heatmap of intensity of Significant differences between groups (top {top_number} sorted by {sort_by.split('(')[0]}, scaled by {scale})" ) cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label("Intensity", rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('left') + cbar.ax.yaxis.set_label_position('right') plt.subplots_adjust(left=0.05, bottom=0.11, right=0.5, top=0.96, wspace=0.01, hspace=0.01) @@ -286,12 +310,12 @@ def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:st # Plot basic heatmap of matrix with color bar # EXAMPLE: plot_heatmap(sw, mat=get_top_intensity_matrix_of_test_res(df=df_anova, df_type='anova', top_num=100), # title = 'The heatmap of top 100 significant differences between groups in Taxa-Function', - # fig_size=(30,30), scale=0) + # fig_size=(30,30), scale='row') def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, scale = None, col_cluster:bool = True, row_cluster:bool = True, cmap:str|None = None, rename_taxa:bool = True, font_size:int = 10, show_all_labels:tuple = (False, False), rename_sample:bool = True, plot_mean:bool = False, - sub_meta: str = "None" + sub_meta: str = "None", scale_method:str = 'maxmin' ): ''' sub_meta is higher plot_mean, if sub_meta provided, plot_mean is False @@ -307,13 +331,9 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, if len(df.columns) < 2: col_cluster = False - scale_map ={None: None, - 'None': None, - 'row': 0, - 'column': 1} - scale = scale_map.get(scale) mat = df.copy() + mat = self.scale_data(df = mat, scale_by = scale, method = scale_method) # if index is Taxon, rename index if rename_taxa: @@ -332,7 +352,7 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, # if only one column, remove col_cluster, set scale to None if len(mat.columns) < 2: col_cluster = False - scale = None + # scale = None sns_params = { @@ -347,7 +367,6 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, "row_cluster": row_cluster, "method": self.linkage_method, "metric": self.distance_metric, - "standard_scale": scale, "col_colors": color_list if not plot_mean else None, "xticklabels": True if show_all_labels[0] else "auto", "yticklabels": True if show_all_labels[1] else "auto", @@ -358,13 +377,14 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, fig.ax_heatmap.set_xticklabels(fig.ax_heatmap.get_xmajorticklabels(), fontsize=font_size, rotation=90) fig.ax_heatmap.set_yticklabels(fig.ax_heatmap.get_ymajorticklabels(), fontsize=font_size, rotation=0) + title = f"{title} (scaled by {scale})" plt.suptitle(title, weight='bold') cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label('Intensity', rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('left') - + cbar.ax.yaxis.set_label_position('right') + plt.subplots_adjust(left=0.05, bottom=0.15, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() plt.show() @@ -374,9 +394,14 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, # For taxa-func heatmap # get the top intensity matrix of taxa-func table def get_top_across_table(self, df, top_number:str|int = 100, value_type:str = 'p', pvalue:float = 0.05, - rename_taxa:bool = False, col_cluster:bool = True, row_cluster:bool = True): + rename_taxa:bool = False, col_cluster:bool = True, row_cluster:bool = True, scale:str|None = None, scale_method:str = 'maxmin'): + ''' + For taxa-func table only + Return a table x, and y are taxa and functions, respectively, and the values are the p-value, f-statistic or t-statistic. + ''' res = self.plot_top_taxa_func_heatmap_of_test_res(df=df, top_number=top_number, value_type=value_type, pvalue=pvalue, - col_cluster=col_cluster, row_cluster=row_cluster, rename_taxa=rename_taxa, return_type='table') + col_cluster=col_cluster, row_cluster=row_cluster, rename_taxa=rename_taxa, return_type='table', + scale=scale, scale_method=scale_method) return res # plot heatmap for all condtion results of DESeq2All or DunnettAll @@ -386,7 +411,7 @@ def plot_heatmap_of_all_condition_res(self, df, pvalue:float = 0.05,scale:str|N show_all_labels:tuple = (False, False), return_type:str = 'fig', res_df_type:str = 'deseq2', p_type:str = 'padj', three_levels_df_type: str = 'same_trends', - show_col_colors:bool = True, remove_zero_col:bool = True): + show_col_colors:bool = True, remove_zero_col:bool = True, scale_method:str = 'maxmin'): """ Plot a heatmap of all condition results. @@ -419,7 +444,6 @@ def plot_heatmap_of_all_condition_res(self, df, pvalue:float = 0.05,scale:str|N - ValueError: If an error occurs during plotting. """ - import numpy as np # keep 4 decimal places pvalue = round(pvalue, 4) color_list = None @@ -476,7 +500,7 @@ def plot_heatmap_of_all_condition_res(self, df, pvalue:float = 0.05,scale:str|N dft = self.rename_taxa(dft) # scale the data if scale: - dft = self.scale_data(dft, scale) + dft = self.scale_data(df = dft, scale_by = scale, method = scale_method) if cmap is None: cmap = sns.color_palette("vlag", as_cmap=True, n_colors=30) @@ -524,8 +548,8 @@ def plot_heatmap_of_all_condition_res(self, df, pvalue:float = 0.05,scale:str|N cbar.set_label("log2FC" if res_df_type == 'deseq2' else 't-statistic', rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('left') - + cbar.ax.yaxis.set_label_position('right') + plt.subplots_adjust(left=0.05, bottom=0.15, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() @@ -568,11 +592,10 @@ def plot_heatmap_of_all_condition_res(self, df, pvalue:float = 0.05,scale:str|N def plot_heatmap_of_dunnett_test_res(self, df, pvalue:float = 0.05,scale:str|None = None, fig_size:tuple|None = None, col_cluster:bool = True, row_cluster:bool = True, cmap:str|None = None, rename_taxa:bool = True, font_size:int = 10, - show_all_labels:tuple = (False, False), show_col_colors:bool = False + show_all_labels:tuple = (False, False), show_col_colors:bool = False, scale_method:str = 'maxmin' ): #! 只画t-statistic的heatmap, 用p-value过滤 - import pandas as pd - import numpy as np + pvalue = round(pvalue, 5) @@ -609,7 +632,7 @@ def plot_heatmap_of_dunnett_test_res(self, df, pvalue:float = 0.05,scale:str|No # scale the data if scale: - dft = self.scale_data(dft, scale) + dft = self.scale_data(df = dft, scale_by = scale, method = scale_method) if cmap is None: @@ -647,8 +670,8 @@ def plot_heatmap_of_dunnett_test_res(self, df, pvalue:float = 0.05,scale:str|No cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label('t-statistic', rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('left') - + cbar.ax.yaxis.set_label_position('right') + plt.subplots_adjust(left=0.05, bottom=0.15, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() @@ -661,31 +684,8 @@ def plot_heatmap_of_dunnett_test_res(self, df, pvalue:float = 0.05,scale:str|No def get_heatmap_table_of_dunnett_res(self, df, pvalue:float = 0.05,scale:str|None = None, - col_cluster:bool = True, row_cluster:bool = True, rename_taxa:bool = True): - import pandas as pd - import numpy as np - - def scale_data(dft, scale): - if scale == 'row': - # 对每行单独应用双向缩放 - for index, row in dft.iterrows(): - max_val = abs(row).max() - if max_val != 0: - dft.loc[index] = row / max_val - elif scale == 'col': - # 对每列单独应用双向缩放 - for col in dft: - max_val = abs(dft[col]).max() - if max_val != 0: - dft[col] = dft[col] / max_val - elif scale == 'all': - # 对整个数据框应用双向缩放 - max_val = abs(dft.values).max() - if max_val != 0: - dft = dft / max_val - - return dft - + col_cluster:bool = True, row_cluster:bool = True, rename_taxa:bool = True, scale_method:str = 'maxmin'): + dft = self.tfa.CrossTest.extrcat_significant_stat_from_dunnett(df, p_value=pvalue) @@ -715,7 +715,7 @@ def scale_data(dft, scale): # scale the data if scale: - dft = scale_data(dft, scale) + dft = self.scale_data(df = dft, scale_by = scale, method = scale_method) from matplotlib.colors import TwoSlopeNorm @@ -754,14 +754,15 @@ def scale_data(dft, scale): def get_top_across_table_basic(self, df, top_number:int = 100, value_type:str = 'p', fig_size:tuple|None = None, pvalue:float = 0.05, scale = None, - col_cluster:bool = True, row_cluster:bool = True, cmap:str|None = None, rename_taxa:bool = False): + col_cluster:bool = True, row_cluster:bool = True, cmap:str|None = None, rename_taxa:bool = False, + scale_method:str = 'maxmin'): + ''' + for the tables of taxa, func, protein, peptides and custom table + Return a intensity matrix of top significant results. + ''' dft = df.copy() + - scale_map ={None: None, - 'None': None, - 'row': 0, - 'column': 1} - scale = scale_map.get(scale) type_map = {'f': ('f-statistic', 'Spectral_r'), 'p': ('P-value', 'Reds_r'), @@ -788,6 +789,7 @@ def get_top_across_table_basic(self, df, top_number:int = 100, value_type:str = mat = dft.head(top_number) mat= mat.drop(['P-value', 'f-statistic' ], axis=1) elif 't-statistic' in dft.columns.tolist(): + #! t-statistic incude positive and negative value dft = dft.sort_values(by=['P-value', 't-statistic'], ascending=[True, False]) mat = dft.head(top_number) mat= mat.drop(['P-value', 't-statistic'], axis=1) @@ -797,8 +799,10 @@ def get_top_across_table_basic(self, df, top_number:int = 100, value_type:str = if len(mat.columns) < 2: col_cluster = False - meta_df = self.tfa.meta_df - meta_name = self.tfa.meta_name + mat = self.scale_data(df = mat, scale_by = scale, method = scale_method) + + # meta_df = self.tfa.meta_df + # meta_name = self.tfa.meta_name if fig_size is None: @@ -812,8 +816,10 @@ def get_top_across_table_basic(self, df, top_number:int = 100, value_type:str = groups_list = [] new_col_names = [] for i in col_names: - group = meta_df[meta_df['Sample'] == i] - group = group[meta_name].values[0] + # group = meta_df[meta_df['Sample'] == i] + group = self.tfa.meta_df[self.tfa.meta_df['Sample'] == i] + # group = group[meta_name].values[0] + group = group[self.tfa.meta_name].values[0] new_col_names.append(f'{i} ({group})') groups_list.append(group) color_list = self.assign_colors(groups_list) @@ -831,7 +837,6 @@ def get_top_across_table_basic(self, df, top_number:int = 100, value_type:str = "row_cluster": row_cluster, "method": self.linkage_method, "metric": self.distance_metric, - "standard_scale": scale, "col_colors": color_list, } @@ -858,27 +863,83 @@ def get_top_across_table_basic(self, df, top_number:int = 100, value_type:str = # plt.close('all') - def scale_data(self, dft, scale): + + + def scale_data(self, df: pd.DataFrame, scale_by: str|None = None, method: str|None = 'maxmin') -> pd.DataFrame: + scale_by = scale_by.lower() if scale_by else 'all' + method = method.lower() if method else 'maxmin' + + print(f"Scaling the data by [{scale_by}] using method [{method}]") + try: - if scale == 'row': - # 对每行单独应用双向缩放 - for index, row in dft.iterrows(): - max_val = abs(row).max() - if max_val != 0: - dft.loc[index] = row / max_val - elif scale == 'col': - # 对每列单独应用双向缩放 - for col in dft: - max_val = abs(dft[col]).max() - if max_val != 0: - dft[col] = dft[col] / max_val - elif scale == 'all': - # 对整个数据框应用双向缩放 - max_val = abs(dft.values).max() - if max_val != 0: - dft = dft / max_val + if method == 'zscore': + scaler = StandardScaler() + + if scale_by == 'row': + if (df == 0).all(axis=1).any(): + raise ValueError("One or more rows are entirely zero, cannot perform z-score scaling.") + df = df.apply(lambda row: pd.Series(scaler.fit_transform(row.values.reshape(-1, 1)).flatten(), index=row.index), axis=1) + + elif scale_by == 'col': + if (df == 0).all(axis=0).any(): + raise ValueError("One or more columns are entirely zero, cannot perform z-score scaling.") + + df = df.apply(lambda col: pd.Series(scaler.fit_transform(col.values.reshape(-1, 1)).flatten(), index=col.index), axis=0) + + else: # 'all' + if np.all(df.values.flatten() == 0): + raise ValueError("All data are zero, cannot perform z-score scaling.") + + df = pd.DataFrame(scaler.fit_transform(df), index=df.index, columns=df.columns) + + else: # 'maxmin' + if scale_by == 'row': + max_val = df.abs().max(axis=1) + df = pd.DataFrame([row / max_val.loc[index] if max_val.loc[index] != 0 else row for index, row in df.iterrows()], index=df.index, columns=df.columns) + elif scale_by == 'col': + max_val = df.abs().max() + for col in df.columns: + if max_val[col] != 0: + df[col] = df[col] / max_val[col] + else: # 'all' + max_val = df.abs().values.max() + df = df / max_val if max_val != 0 else df + except Exception as e: - print(f'Error: {e}') + print(f'Error in scaling the data: {e}') + raise e + + return df + + + + # def scale_data(self, df, scale:str|None = None): + # '''' + # Scale the data by Max-Min scaling method + # ''' + # try: + # scale = scale.lower() if scale else None + + # print(f"Scaling the data by [{scale}]") + # if scale == 'row': + # for index, row in df.iterrows(): + # max_val = abs(row).max() + # if max_val != 0: + # df.loc[index] = row / max_val + # elif scale == 'col': + # for col in df: + # max_val = abs(df[col]).max() + # if max_val != 0: + # df[col] = df[col] / max_val + # elif scale == 'all': + # max_val = abs(df.values).max() + # if max_val != 0: + # df = df / max_val + # else: + # print('No scale applied') + + # except Exception as e: + # print(f'Error in scaling the data: {e}') - return dft + # return df diff --git a/metax/utils/version.py b/metax/utils/version.py index 6afbf81..e073248 100644 --- a/metax/utils/version.py +++ b/metax/utils/version.py @@ -1,2 +1,2 @@ -__version__ = '1.109.9' +__version__ = '1.109.10' API_version = '2' \ No newline at end of file From 1b227d4b503d620eae65b452739037495456ba31 Mon Sep 17 00:00:00 2001 From: Qing Date: Sat, 10 Aug 2024 14:46:08 -0400 Subject: [PATCH 7/7] Fixed the scale method and color bar of heatmap for Cross Test result table. --- Docs/ChangeLog.md | 5 + metax/gui/main_gui.py | 23 +- metax/taxafunc_ploter/basic_plot.py | 4 +- metax/taxafunc_ploter/heatmap_plot.py | 389 ++++++++------------------ metax/utils/version.py | 2 +- 5 files changed, 145 insertions(+), 278 deletions(-) diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index 70a3cef..2000a57 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,8 @@ +# Version: 1.109.11 +## Date: 2024-08-10 +### Changes: +- Fix: Fixed the scale method and color bar of heatmap for Cross Test result table. + # Version: 1.109.10 ## Date: 2024-08-9 ### Changes: diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index cf40ceb..841ac00 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -397,6 +397,7 @@ def __init__(self, MainWindow): self.pushButton_get_top_cross_table.clicked.connect(self.get_top_cross_table) self.tabWidget_3.currentChanged.connect(self.cross_test_tab_change) + self.comboBox_top_heatmap_scale.currentIndexChanged.connect(self.change_event_comboBox_top_heatmap_scale) ### ANOVA self.pushButton_anova_test.clicked.connect(self.anova_test) @@ -1465,6 +1466,11 @@ def cross_test_tab_change(self, index): else: self.groupBox_cross_heatmap_plot.setVisible(True) + def change_event_comboBox_top_heatmap_scale(self): + if self.comboBox_top_heatmap_scale.currentText() == 'None': + self.comboBox_top_heatmap_scale_method.setEnabled(False) + else: + self.comboBox_top_heatmap_scale_method.setEnabled(True) def add_theme_to_combobox(self): # get all themes @@ -4393,7 +4399,7 @@ def plot_top_heatmap(self): scale = scale, col_cluster = col_luster, row_cluster = row_luster, cmap = cmap, rename_taxa=rename_taxa, font_size=font_size, show_all_labels = show_all_labels, rename_sample = rename_sample, - sort_by = sort_by, scale_method = scale_method) + sort_by = sort_by, scale_method = scale_method, return_type = 'fig') except Exception as e: error_message = traceback.format_exc() @@ -4453,16 +4459,17 @@ def get_top_cross_table(self): else: if 'taxa-functions' in table_name: - df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).get_top_across_table(df=df, top_number=top_num, + df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).plot_top_taxa_func_heatmap_of_test_res(df=df, top_number=top_num, col_cluster = col_luster, row_cluster = row_luster, - value_type=value_type, pvalue=pvalue, - rename_taxa=rename_taxa, scale = scale, scale_method = scale_method) + value_type=value_type, pvalue=pvalue, rename_taxa=rename_taxa, scale = scale, scale_method = scale_method, + return_type = 'table') else: # get result of test and anova of [taxa, functions, peptides and custom table] # get the intensity of the result items which are significant - df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).get_top_across_table_basic(df=df, top_number=top_num, - col_cluster = col_luster, row_cluster = row_luster, - value_type=value_type, pvalue=pvalue, - scale = scale, rename_taxa=rename_taxa, scale_method = scale_method) + df_top_cross = HeatmapPlot(self.tfa, **self.heatmap_params_dict).plot_basic_heatmap_of_test_res(df=df, top_number=top_num, + value_type=value_type, pvalue=pvalue, scale = scale, col_cluster = col_luster, row_cluster = row_luster, + rename_taxa=rename_taxa, sort_by = sort_by, scale_method = scale_method, return_type = 'table') + + except ValueError as e: QMessageBox.warning(self.MainWindow, 'Warning', f'No significant results.\n\n{e}') return None diff --git a/metax/taxafunc_ploter/basic_plot.py b/metax/taxafunc_ploter/basic_plot.py index 05d4c9d..4f597d4 100644 --- a/metax/taxafunc_ploter/basic_plot.py +++ b/metax/taxafunc_ploter/basic_plot.py @@ -402,7 +402,7 @@ def plot_corr_sns( cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label('Intensity', rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('right') + cbar.ax.yaxis.set_label_position('left') plt.subplots_adjust(left=0.03, bottom=0.095, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() @@ -624,7 +624,7 @@ def plot_items_corr_heatmap( cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label("Correlation", rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('right') + cbar.ax.yaxis.set_label_position('left') plt.subplots_adjust(left=0.03, bottom=0.095, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() diff --git a/metax/taxafunc_ploter/heatmap_plot.py b/metax/taxafunc_ploter/heatmap_plot.py index fe4043c..c961ff1 100644 --- a/metax/taxafunc_ploter/heatmap_plot.py +++ b/metax/taxafunc_ploter/heatmap_plot.py @@ -52,8 +52,10 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, # type_map: 1st: plot_type, 2nd: cmap - type_map = {'f': ('f-statistic', 'Spectral_r'), - 'p': ('P-value', 'Reds_r'), + #! cmap for f-statistic and p-value, only when scale_method is 'zscores', the values are negative and positive, otherwise, the values are positive + #! cmap for t-statistic, the values always are negative and positive + type_map = {'f': ('f-statistic', 'RdBu_r' if (scale in ['row', 'column', 'all'] and scale_method == 'zscore') else 'flare'), + 'p': ('P-value', 'RdBu_r' if (scale in ['row', 'column', 'all'] and scale_method == 'zscore') else 'flare_r'), 't': ('t-statistic', 'RdBu_r')} plot_type = type_map.get(value_type, "None")[0] @@ -93,88 +95,76 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, df_plot = df_top.fillna(1) if plot_type == 'P-value' else df_top.fillna(0) df_plot = self.scale_data(df = df_plot, scale_by = scale, method = scale_method) + + data_include_negative_and_positive = True if (df_plot.min().min() < 0 and df_plot.max().max() > 0) else False - if return_type == 'fig': - sns_params = { - "center": 0, - "cmap": cmap, - "linewidths": 0.5, - "linecolor": 'gray', - "dendrogram_ratio": (0.1, 0.2), - "figsize": fig_size, - "col_cluster": col_cluster, - "row_cluster": row_cluster, - "method": self.linkage_method, - "metric": self.distance_metric, - "cbar_kws": {"label": plot_type, "shrink": 0.5}, - "standard_scale": scale, - "mask": df_top.isnull(), - "vmin": 0 if plot_type == 'P-value' else None, - "vmax": pvalue if plot_type == 'P-value' else None, - "xticklabels": True if show_all_labels[0] else "auto", - "yticklabels": True if show_all_labels[1] else "auto", - } - - fig = sns.clustermap(df_plot, **sns_params) - fig.ax_heatmap.set_xlabel("Taxa") - fig.ax_heatmap.set_ylabel("Functions") - if title == "": - title = f"Significant Differences between groups in Taxa-Function (Top {top_number} sorted by {plot_type} , scaled by {scale})" - else: - title = f"{title} (Top {top_number} sorted by {plot_type} , scaled by {scale})" - - plt.suptitle(title, weight='bold') - - fig.ax_heatmap.set_xticklabels( - fig.ax_heatmap.get_xmajorticklabels(), - fontsize=font_size, - rotation=90, - ) - fig.ax_heatmap.set_yticklabels( - fig.ax_heatmap.get_ymajorticklabels(), - fontsize=font_size, - rotation=0, - ) - - cbar = fig.ax_heatmap.collections[0].colorbar - cbar.set_label(plot_type, rotation=90, labelpad=1) - cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('right') - - plt.subplots_adjust(left=0.06, bottom=0.35, right=0.5, top=0.96, wspace=0.01, hspace=0.01) - - plt.tight_layout() - plt.show() - return fig + sns_params = { + 'center': 0 if data_include_negative_and_positive else None, + "cmap": cmap, + "linewidths": 0.5, + "linecolor": 'gray', + "dendrogram_ratio": (0.1, 0.2), + "figsize": fig_size if return_type == 'fig' else None, + "col_cluster": col_cluster, + "row_cluster": row_cluster, + "method": self.linkage_method, + "metric": self.distance_metric, + "cbar_kws": {"label": plot_type, "shrink": 0.5}, + "mask": df_top.isnull(), + "xticklabels": (True if show_all_labels[0] else "auto") if return_type == 'fig' else False, + "yticklabels": (True if show_all_labels[1] else "auto") if return_type == 'fig' else False, + } + fig = sns.clustermap(df_plot, **sns_params) - elif return_type == 'table': - sns_params = { - "center": 0, - "cmap": cmap, - "col_cluster": col_cluster, - "row_cluster": row_cluster, - "method": self.linkage_method, - "metric": self.distance_metric, - "mask": df_top.isnull(), - } - fig = sns.clustermap(df_plot, **sns_params) - + if return_type == 'table': # get the sorted dataframe - row_num = len(df_plot) - col_num = len(df_plot.columns) - if row_num > 1 and col_num < 2: - sorted_df = df_plot.iloc[fig.dendrogram_row.reordered_ind, :] if row_cluster else df_plot - elif row_num < 2 and col_num > 1: - sorted_df = df_plot.iloc[:, fig.dendrogram_col.reordered_ind] if col_cluster else df_plot - elif row_num > 1 and col_num > 1: - sorted_df = df_plot.iloc[fig.dendrogram_row.reordered_ind if row_cluster else slice(None), - fig.dendrogram_col.reordered_ind if col_cluster else slice(None)] + if row_cluster and not col_cluster: + sorted_df = df_plot.iloc[fig.dendrogram_row.reordered_ind, :] + elif col_cluster and not row_cluster: + sorted_df = df_plot.iloc[:, fig.dendrogram_col.reordered_ind] + elif row_cluster and col_cluster: + sorted_df = df_plot.iloc[fig.dendrogram_row.reordered_ind, fig.dendrogram_col.reordered_ind] else: sorted_df = df_plot - # remove fig object plt.close(fig.figure) - return sorted_df + return sorted_df + + + fig.ax_heatmap.set_xlabel("Taxa") + fig.ax_heatmap.set_ylabel("Functions") + + scale_title = f", scaled by {scale}" if scale in ['row', 'column', 'all'] else '' + if title == "": + title = f"Significant Differences between groups in Taxa-Function (Top {top_number} sorted by {plot_type}{scale_title})" + else: + title = f"{title} (Top {top_number} sorted by {plot_type}{scale_title})" + + plt.suptitle(title) + + fig.ax_heatmap.set_xticklabels( + fig.ax_heatmap.get_xmajorticklabels(), + fontsize=font_size, + rotation=90, + ) + fig.ax_heatmap.set_yticklabels( + fig.ax_heatmap.get_ymajorticklabels(), + fontsize=font_size, + rotation=0, + ) + + cbar = fig.ax_heatmap.collections[0].colorbar + cbar.set_label(plot_type, rotation=90, labelpad=1) + cbar.ax.yaxis.set_ticks_position('left') + cbar.ax.yaxis.set_label_position('left') + + + plt.subplots_adjust(left=0.06, bottom=0.35, right=0.5, top=0.96, wspace=0.01, hspace=0.01) + + plt.tight_layout() + plt.show() + return fig + except ValueError as e: print(f"Error: {e}") @@ -182,44 +172,31 @@ def plot_top_taxa_func_heatmap_of_test_res(self, df, top_number:int|str= 100, raise ValueError(f"Error: {e}") - # For taxa, func and peptides table + # For taxa, func and peptides table, plot the intensity of significant differences items def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:str = 'p', fig_size:tuple|None = None, pvalue:float = 0.05, scale = None, col_cluster:bool = True, row_cluster:bool = True, cmap:str|None = None, rename_taxa:bool = True, font_size:int = 10, show_all_labels:tuple = (False, False), rename_sample:bool = True, - sort_by:str = 'P-value', scale_method:str = 'maxmin' - ): + sort_by:str = 'P-value', scale_method:str = 'maxmin', return_type:str = 'fig'): dft = df.copy() - scale_map ={None: None, - 'None': None, - 'row': 0, - 'column': 1} - scale = scale_map.get(scale) - - scale_map ={None: None, - 'None': None, - 'row': 0, - 'column': 1} - scale = scale_map.get(scale) - type_map = {'f': ('f-statistic', 'Spectral_r' if scale_method == 'maxmin' else 'RdBu_r'), - 'p': ('P-value', 'RdGy_r' if scale_method == 'maxmin' else 'RdBu_r'), - 't': ('t-statistic', 'RdGy_r' if scale_method == 'maxmin' else 'RdBu_r')} + # type_map = {'f': ('f-statistic', 'OrRd' if scale_method == 'maxmin' else 'RdBu_r'), + # 'p': ('P-value', 'OrRd' if scale_method == 'maxmin' else 'RdBu_r'), + # 't': ('t-statistic', 'OrRd' if scale_method == 'maxmin' else 'RdBu_r')} - if cmap is None: - plot_type, cmap = type_map.get(value_type) - else: - plot_type, _ = type_map.get(value_type) + type_map = {'f': 'f-statistic', 'p': 'P-value', 't': 't-statistic'} + plot_type = type_map.get(value_type) if plot_type is None: raise ValueError("type must be 'p' or 'f' or 't'") if plot_type not in df.columns: + print(f"Warning: [{plot_type}] is not in the dataframe, change to [P-value]") plot_type = 'P-value' @@ -267,34 +244,58 @@ def plot_basic_heatmap_of_test_res(self, df, top_number:int = 100, value_type:st if rename_taxa: mat = self.rename_taxa(mat) - + mat = self.scale_data(df = mat, scale_by = scale, method = scale_method) - + + data_include_negative_and_positive = True if (mat.min().min() < 0 and mat.max().max() > 0) else False + + if cmap is None: + cmap = 'RdBu_r' if data_include_negative_and_positive else 'OrRd' + sns_params = { - "center": 0, + "center": 0 if data_include_negative_and_positive else None, "cmap": cmap, - "figsize": fig_size, + "linewidths": 0.5, + "linecolor": 'gray', + "figsize": fig_size if return_type == 'fig' else None, "cbar_kws": {"label": "Intensity", "shrink": 0.5}, "col_cluster": col_cluster, "row_cluster": row_cluster, "method": self.linkage_method, "metric": self.distance_metric, "col_colors": color_list, - "xticklabels": True if show_all_labels[0] else "auto", - "yticklabels": True if show_all_labels[1] else "auto", + "xticklabels": (True if show_all_labels[0] else "auto") if return_type == 'fig' else False, + "yticklabels": (True if show_all_labels[1] else "auto") if return_type == 'fig' else False, } fig = sns.clustermap(mat, **sns_params) - + if return_type == 'table': + # get the sorted dataframe + if row_cluster and not col_cluster: + sorted_df = mat.iloc[fig.dendrogram_row.reordered_ind, :] + elif col_cluster and not row_cluster: + sorted_df = mat.iloc[:, fig.dendrogram_col.reordered_ind] + elif row_cluster and col_cluster: + sorted_df = mat.iloc[fig.dendrogram_row.reordered_ind, fig.dendrogram_col.reordered_ind] + else: + sorted_df = mat + + plt.close(fig.figure) + + return sorted_df + + # plot heatmap figure fig.ax_heatmap.set_xticklabels(fig.ax_heatmap.get_xmajorticklabels(), fontsize=font_size, rotation=90) fig.ax_heatmap.set_yticklabels(fig.ax_heatmap.get_ymajorticklabels(), fontsize=font_size, rotation=0) + + scale_title = f", scaled by {scale}" if scale in ['row', 'column', 'all'] else '' plt.suptitle( - f"The Heatmap of intensity of Significant differences between groups (top {top_number} sorted by {sort_by.split('(')[0]}, scaled by {scale})" + f"The Heatmap of intensity of Significant differences between groups (top {top_number} sorted by {sort_by.split('(')[0]}{scale_title})" ) cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label("Intensity", rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('right') + cbar.ax.yaxis.set_label_position('left') plt.subplots_adjust(left=0.05, bottom=0.11, right=0.5, top=0.96, wspace=0.01, hspace=0.01) @@ -383,7 +384,7 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label('Intensity', rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('right') + cbar.ax.yaxis.set_label_position('left') plt.subplots_adjust(left=0.05, bottom=0.15, right=0.5, top=0.96, wspace=0.01, hspace=0.01) plt.tight_layout() @@ -392,18 +393,7 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, # For taxa-func heatmap - # get the top intensity matrix of taxa-func table - def get_top_across_table(self, df, top_number:str|int = 100, value_type:str = 'p', pvalue:float = 0.05, - rename_taxa:bool = False, col_cluster:bool = True, row_cluster:bool = True, scale:str|None = None, scale_method:str = 'maxmin'): - ''' - For taxa-func table only - Return a table x, and y are taxa and functions, respectively, and the values are the p-value, f-statistic or t-statistic. - ''' - res = self.plot_top_taxa_func_heatmap_of_test_res(df=df, top_number=top_number, value_type=value_type, pvalue=pvalue, - col_cluster=col_cluster, row_cluster=row_cluster, rename_taxa=rename_taxa, return_type='table', - scale=scale, scale_method=scale_method) - return res - + # plot heatmap for all condtion results of DESeq2All or DunnettAll def plot_heatmap_of_all_condition_res(self, df, pvalue:float = 0.05,scale:str|None = None, log2fc_min:float = 1.0,log2fc_max:float = 30.0, fig_size:tuple = (10,10), col_cluster:bool = True, row_cluster:bool = True, @@ -548,7 +538,7 @@ def plot_heatmap_of_all_condition_res(self, df, pvalue:float = 0.05,scale:str|N cbar.set_label("log2FC" if res_df_type == 'deseq2' else 't-statistic', rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('right') + cbar.ax.yaxis.set_label_position('left') plt.subplots_adjust(left=0.05, bottom=0.15, right=0.5, top=0.96, wspace=0.01, hspace=0.01) @@ -670,7 +660,7 @@ def plot_heatmap_of_dunnett_test_res(self, df, pvalue:float = 0.05,scale:str|No cbar = fig.ax_heatmap.collections[0].colorbar cbar.set_label('t-statistic', rotation=90, labelpad=1) cbar.ax.yaxis.set_ticks_position('left') - cbar.ax.yaxis.set_label_position('right') + cbar.ax.yaxis.set_label_position('left') plt.subplots_adjust(left=0.05, bottom=0.15, right=0.5, top=0.96, wspace=0.01, hspace=0.01) @@ -752,124 +742,20 @@ def get_heatmap_table_of_dunnett_res(self, df, pvalue:float = 0.05,scale:str|No - def get_top_across_table_basic(self, df, top_number:int = 100, value_type:str = 'p', - fig_size:tuple|None = None, pvalue:float = 0.05, scale = None, - col_cluster:bool = True, row_cluster:bool = True, cmap:str|None = None, rename_taxa:bool = False, - scale_method:str = 'maxmin'): - ''' - for the tables of taxa, func, protein, peptides and custom table - Return a intensity matrix of top significant results. - ''' - dft = df.copy() - - - - type_map = {'f': ('f-statistic', 'Spectral_r'), - 'p': ('P-value', 'Reds_r'), - 't': ('t-statistic', 'hot_r')} - - if cmap is None: - plot_type, cmap = type_map.get(value_type) - else: - plot_type, _ = type_map.get(value_type) - - if plot_type is None: - raise ValueError("type must be 'p' or 'f' or 't'") - - - if plot_type not in df.columns: - plot_type = 'P-value' - - - dft = dft[dft['P-value'] < pvalue] - - - if 'f-statistic' in dft.columns.tolist(): - dft = dft.sort_values(by=['P-value', 'f-statistic'], ascending=[True, False]) - mat = dft.head(top_number) - mat= mat.drop(['P-value', 'f-statistic' ], axis=1) - elif 't-statistic' in dft.columns.tolist(): - #! t-statistic incude positive and negative value - dft = dft.sort_values(by=['P-value', 't-statistic'], ascending=[True, False]) - mat = dft.head(top_number) - mat= mat.drop(['P-value', 't-statistic'], axis=1) - - if len(mat) < 2: - row_cluster = False - if len(mat.columns) < 2: - col_cluster = False - - mat = self.scale_data(df = mat, scale_by = scale, method = scale_method) - - # meta_df = self.tfa.meta_df - # meta_name = self.tfa.meta_name - - - if fig_size is None: - fig_size = (5,5) - - - - try: - # create color list for groups & rename columns - col_names = mat.columns.tolist() - groups_list = [] - new_col_names = [] - for i in col_names: - # group = meta_df[meta_df['Sample'] == i] - group = self.tfa.meta_df[self.tfa.meta_df['Sample'] == i] - # group = group[meta_name].values[0] - group = group[self.tfa.meta_name].values[0] - new_col_names.append(f'{i} ({group})') - groups_list.append(group) - color_list = self.assign_colors(groups_list) - mat.columns = new_col_names - - if rename_taxa: - mat = self.rename_taxa(mat) - - sns_params = { - "center": 0, - "cmap": cmap, - "figsize": fig_size, - "cbar_kws": {"label": "Intensity"}, - "col_cluster": col_cluster, - "row_cluster": row_cluster, - "method": self.linkage_method, - "metric": self.distance_metric, - "col_colors": color_list, - } - - fig = sns.clustermap(mat, **sns_params) - - # get the sorted dataframe - if row_cluster and not col_cluster: - sorted_df = mat.iloc[fig.dendrogram_row.reordered_ind, :] - elif col_cluster and not row_cluster: - sorted_df = mat.iloc[:, fig.dendrogram_col.reordered_ind] - elif row_cluster and col_cluster: - sorted_df = mat.iloc[fig.dendrogram_row.reordered_ind, fig.dendrogram_col.reordered_ind] - else: - sorted_df = mat - - - plt.close(fig.fig) - - return sorted_df - except Exception as e: - print(f'Error: {e}') - raise ValueError("Can not get the result table, please check the error message in consel.") - # finally: - # plt.close('all') - - - def scale_data(self, df: pd.DataFrame, scale_by: str|None = None, method: str|None = 'maxmin') -> pd.DataFrame: - scale_by = scale_by.lower() if scale_by else 'all' - method = method.lower() if method else 'maxmin' + scale_by = scale_by.lower() if scale_by else None + method = method.lower() if method else None print(f"Scaling the data by [{scale_by}] using method [{method}]") + + if scale_by == 'none' or method == 'none' or scale_by is None or method is None: + print("No scaling is performed.") + return df + + df = df.copy() + if scale_by not in ['row', 'col', 'all', 'none']: + raise ValueError("scale_by must be 'row', 'col', 'all' or 'none'") try: if method == 'zscore': @@ -912,34 +798,3 @@ def scale_data(self, df: pd.DataFrame, scale_by: str|None = None, method: str|No return df - - - # def scale_data(self, df, scale:str|None = None): - # '''' - # Scale the data by Max-Min scaling method - # ''' - # try: - # scale = scale.lower() if scale else None - - # print(f"Scaling the data by [{scale}]") - # if scale == 'row': - # for index, row in df.iterrows(): - # max_val = abs(row).max() - # if max_val != 0: - # df.loc[index] = row / max_val - # elif scale == 'col': - # for col in df: - # max_val = abs(df[col]).max() - # if max_val != 0: - # df[col] = df[col] / max_val - # elif scale == 'all': - # max_val = abs(df.values).max() - # if max_val != 0: - # df = df / max_val - # else: - # print('No scale applied') - - # except Exception as e: - # print(f'Error in scaling the data: {e}') - - # return df diff --git a/metax/utils/version.py b/metax/utils/version.py index e073248..09dc3dc 100644 --- a/metax/utils/version.py +++ b/metax/utils/version.py @@ -1,2 +1,2 @@ -__version__ = '1.109.10' +__version__ = '1.109.11' API_version = '2' \ No newline at end of file