diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index 99ff243..6a32722 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,17 @@ +# Version: 1.109.1 +## Date: 2024-07-23 +### Changes: +- New: Added a function to plot the heatmap of the correlation of the taxa, functions, taxa-functions items. +- Fix: Fixed a bug of when plot the taxa-functions network. +- Change: Changed the sankey plot for intensity, split samples to different groups to show. + + +# Version: 1.109.0 +## Date: 2024-07-22 +### Changes: +- Change: Changed the layout of the main window to make the GUI more user-friendly and clear. + + # Version: 1.108.7 ## Date: 2024-07-14 ### Changes: diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index a3be32d..2cf9db3 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -431,8 +431,8 @@ def __init__(self, MainWindow): self.pushButton_deseq2_plot_sankey.clicked.connect(self.deseq2_plot_sankey) # ### Co-Expression - self.pushButton_co_expr_plot.clicked.connect(self.plot_co_expr_network) - self.pushButton_co_expr_heatmap_plot.clicked.connect(self.plot_co_expr_heatmap) + self.pushButton_co_expr_plot.clicked.connect(lambda: self.plot_co_expr('network')) + self.pushButton_co_expr_heatmap_plot.clicked.connect(lambda: self.plot_co_expr('heatmap')) self.comboBox_co_expr_table.currentIndexChanged.connect(self.update_co_expr_select_list) self.pushButton_co_expr_add_to_list.clicked.connect(self.add_co_expr_to_list) self.pushButton_co_expr_drop_item.clicked.connect(self.drop_co_expr_list) @@ -1498,7 +1498,7 @@ def add_theme_to_combobox(self): cmap_list = ['Auto'] + sorted(list(colormaps)) - cmap_combox_list = ['comboBox_basic_hetatmap_theme', 'comboBox_tflink_cmap', 'comboBox_top_heatmap_cmap'] + cmap_combox_list = ['comboBox_basic_corr_cmap','comboBox_basic_hetatmap_theme', 'comboBox_tflink_cmap', 'comboBox_top_heatmap_cmap', 'comboBox_corr_hetatmap_cmap'] for name in cmap_combox_list: old_combobox = getattr(self, name) new_combobox = CmapComboBox(old_combobox.parent()) @@ -3423,7 +3423,8 @@ def plot_basic_list(self, plot_type='heatmap'): rename_sample = self.checkBox_basic_hetatmap_rename_sample_name.isChecked() show_all_labels = (self.checkBox_basic_hetatmap_show_all_labels_x.isChecked(), self.checkBox_basic_hetatmap_show_all_labels_y.isChecked()) plot_mean = self.checkBox_basic_heatmap_plot_mean.isChecked() - + sub_meta = self.comboBox_3dbar_sub_meta.currentText() + table_name = self.comboBox_basic_table.currentText() if cmap == 'Auto': @@ -3537,7 +3538,7 @@ def plot_basic_list(self, plot_type='heatmap'): scale=scale, row_cluster=row_cluster, col_cluster=col_cluster, cmap=cmap, rename_taxa=rename_taxa, font_size=font_size, show_all_labels=show_all_labels, rename_sample=rename_sample, - plot_mean = plot_mean, sub_meta = self.comboBox_3dbar_sub_meta.currentText()) + plot_mean = plot_mean, sub_meta = sub_meta) elif plot_type == 'bar': @@ -3566,14 +3567,17 @@ def plot_basic_list(self, plot_type='heatmap'): elif plot_type == 'get_table': self.show_message('Getting table...') - if plot_mean: + if plot_mean and sub_meta == 'None': # if sub_meta is not None, plot_mean is False df = self.tfa.BasicStats.get_stats_mean_df_by_group(df) + elif 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) else: - if rename_taxa: - df = self.tfa.rename_taxa(df) if rename_sample: df = self.tfa.rename_sample(df) + if rename_taxa: + df = self.tfa.rename_taxa(df) + self.show_table(df=df, title=title) elif plot_type == 'sankey': @@ -3587,12 +3591,13 @@ def plot_basic_list(self, plot_type='heatmap'): self.show_message('Plotting Sankey...') if self.checkBox_basic_heatmap_sankey_title.isChecked(): title_new = title - subtitle = sample_list + subtitle = str(sample_list) else: title_new = '' subtitle = '' pic = SankeyPlot(self.tfa, theme=self.html_theme).plot_intensity_sankey(df=df, width=width, height=height, title=title_new, subtitle=subtitle, font_size=font_size, + sub_meta=sub_meta, plot_mean=plot_mean, show_legend=self.checkBox_basic_bar_show_legend.isChecked()) self.save_and_show_js_plot(pic, title) @@ -4205,6 +4210,7 @@ def get_title_by_table_name(self, table_name): elif method == 'corr': cluster = self.checkBox_corr_cluster.isChecked() show_all_labels = (self.checkBox_corr_show_all_labels_x.isChecked(), self.checkBox_corr_show_all_labels_y.isChecked()) + cmap = self.comboBox_basic_corr_cmap.currentText() # checek if the dataframe has at least 2 rows and 2 columns if df.shape[0] < 2 or df.shape[1] < 2: QMessageBox.warning(self.MainWindow, 'Warning', 'The number of rows or columns is less than 2, correlation cannot be plotted!') @@ -4215,7 +4221,7 @@ def get_title_by_table_name(self, table_name): self.show_message('Correlation is running, please wait...') BasicPlot(self.tfa).plot_corr_sns(df=df, title_name=title_name, cluster= cluster, width=width, height=height, font_size=font_size, - show_all_labels=show_all_labels, theme=theme, + show_all_labels=show_all_labels, theme=theme, cmap=cmap, rename_sample = rename_sample, **self.heatmap_params_dict) elif method == 'alpha_div': @@ -4274,7 +4280,7 @@ def get_title_by_table_name(self, table_name): title = 'Sankey of Taxa' if table_name == 'Taxa' else 'Sankey of Taxa-Functions' pic = SankeyPlot(self.tfa, theme=self.html_theme).plot_intensity_sankey(df=df, width=width, height=height, - font_size = font_size, title='', subtitle='') + font_size = font_size, title='', subtitle='', sub_meta=sub_meta) self.save_and_show_js_plot(pic, title) elif method == 'num_bar': @@ -4957,7 +4963,10 @@ def plot_deseq2_volcano(self): QMessageBox.warning(self.MainWindow, 'Error', f'{error_message} \n\nPlease check your input!') return None - def plot_co_expr_network(self): + def plot_co_expr(self, plot_type = 'network'): + ''' + plot_type: network or heatmap + ''' df_type = self.comboBox_co_expr_table.currentText().lower() corr_method = self.comboBox_co_expr_corr_method.currentText() corr_threshold = self.doubleSpinBox_co_expr_corr_threshold.value() @@ -4990,30 +4999,59 @@ def plot_co_expr_network(self): return None - try: - self.show_message('Co-expression network is plotting...\n\n It may take a long time! Please wait...') - pic = NetworkPlot(self.tfa, - show_labels=show_labels, - rename_taxa=rename_taxa, - font_size=font_size, - theme=self.html_theme, - **self.tf_link_net_params_dict - ).plot_co_expression_network(df_type= df_type, corr_method=corr_method, - corr_threshold=corr_threshold, sample_list=sample_list, width=width, height=height, focus_list=focus_list, plot_list_only=plot_list_only) - self.save_and_show_js_plot(pic, 'co-expression network') - except ValueError as e: - if 'sample_list should have at least 2' in str(e): - QMessageBox.warning(self.MainWindow, 'Error', "At least 2 samples are required!") - except Exception as e: - error_message = traceback.format_exc() - self.logger.write_log(f'plot_co_expr_network error: {error_message}', 'e') - self.logger.write_log(f'plot_co_expr_network: df_type: {df_type}, corr_method: {corr_method}, corr_threshold: {corr_threshold}, width: {width}, height: {height}, focus_list: {focus_list}', 'e') - QMessageBox.warning(self.MainWindow, 'Error', f'{error_message} \n\nPlease check your input!') - return None - - def plot_co_expr_heatmap(self): - pass - + if plot_type == 'heatmap': + self.show_message('Co-expression heatmap is plotting...\n\n It may take a long time! Please wait...') + try: + print(f'Calculate correlation with {corr_method} method...') + df = self.tfa.BasicStats.get_correlation(df_type = df_type, sample_list = sample_list, focus_list = focus_list, plot_list_only = plot_list_only, rename_taxa = rename_taxa, method=corr_method) + # save df to table_dict + self.update_table_dict(f'co-expression heatmap({df_type})', df) + + show_all_labels = ( + self.checkBox_corr_hetatmap_show_all_labels_x.isChecked(), + self.checkBox_corr_hetatmap_show_all_labels_y.isChecked(), + ) + cmap = self.comboBox_corr_hetatmap_cmap.currentText() + BasicPlot(self.tfa).plot_items_corr_heatmap(df=df, + title_name=f'Co-expression heatmap of {df_type}', + cluster=True, + cmap=cmap, + width=width, height=height, + font_size=font_size, + show_all_labels=show_all_labels, + **self.heatmap_params_dict) + + except Exception as e: + error_message = traceback.format_exc() + self.logger.write_log(f'plot_co_expr_heatmap error: {error_message}', 'e') + self.logger.write_log(f'plot_co_expr_heatmap: df_type: {df_type}, corr_method: {corr_method}, corr_threshold: {corr_threshold}, width: {width}, height: {height}, focus_list: {focus_list}', 'e') + QMessageBox.warning(self.MainWindow, 'Error', f'{error_message} \n\nPlease check your input!') + return None + + + elif plot_type == 'network': + try: + self.show_message('Co-expression network is plotting...\n\n It may take a long time! Please wait...') + pic = NetworkPlot(self.tfa, + show_labels=show_labels, + rename_taxa=rename_taxa, + font_size=font_size, + theme=self.html_theme, + **self.tf_link_net_params_dict + ).plot_co_expression_network(df_type= df_type, corr_method=corr_method, + corr_threshold=corr_threshold, sample_list=sample_list, width=width, height=height, focus_list=focus_list, plot_list_only=plot_list_only) + self.save_and_show_js_plot(pic, 'co-expression network') + except ValueError as e: + if 'sample_list should have at least 2' in str(e): + QMessageBox.warning(self.MainWindow, 'Error', "At least 2 samples are required!") + except Exception as e: + error_message = traceback.format_exc() + self.logger.write_log(f'plot_co_expr_network error: {error_message}', 'e') + self.logger.write_log(f'plot_co_expr_network: df_type: {df_type}, corr_method: {corr_method}, corr_threshold: {corr_threshold}, width: {width}, height: {height}, focus_list: {focus_list}', 'e') + QMessageBox.warning(self.MainWindow, 'Error', f'{error_message} \n\nPlease check your input!') + return None + else: + raise ValueError(f'No such plot_type: {plot_type}') #Sankey def deseq2_plot_sankey(self): diff --git a/metax/gui/metax_gui/main_window.ui b/metax/gui/metax_gui/main_window.ui index 329eb79..7136c67 100644 --- a/metax/gui/metax_gui/main_window.ui +++ b/metax/gui/metax_gui/main_window.ui @@ -6,8 +6,8 @@ 0 0 - 941 - 617 + 972 + 721 @@ -46,7 +46,7 @@ Qt::LeftToRight - 3 + 4 false @@ -245,8 +245,8 @@ 0 0 - 437 - 392 + 453 + 500 @@ -1332,7 +1332,7 @@ QTabWidget::Triangular - 0 + 1 @@ -1720,8 +1720,8 @@ 0 0 - 857 - 299 + 888 + 376 @@ -2003,6 +2003,22 @@ + + + + + 0 + 0 + + + + Theme + + + + + + @@ -2955,7 +2971,7 @@ 0 0 - 840 + 888 150 @@ -3502,7 +3518,7 @@ QTabWidget::Triangular - 4 + 3 @@ -4017,6 +4033,104 @@ DESeq2 + + + + + 0 + 0 + + + + Groups + + + + + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + Group 1 + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Group 2 + + + + + + + + 0 + 0 + + + + + + + + + + false + + + + 0 + 0 + + + + + 33 + 0 + + + + + 16777215 + 16777215 + + + + Run DESeq2 + + + @@ -4090,19 +4204,6 @@ - - - - - 0 - 0 - - - - Groups - - - @@ -4153,81 +4254,10 @@ - - - - - - - 0 - 0 - - - - Group 1 - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Group 2 - - - - - - - - 0 - 0 - - - - - - - - - - false - - - - 0 - 0 - - - - - 33 - 0 - - - - - 16777215 - 16777215 - - - - Run DESeq2 + + + + Qt::Horizontal @@ -4246,23 +4276,23 @@ - 0 + 1 0 0 - 174 - 41 + 888 + 146 Plot - - + + false @@ -4273,12 +4303,42 @@ - Plot Volcano + Plot Sankey - - + + + + + + + 0 + 0 + + + + Tables + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + false @@ -4289,7 +4349,7 @@ - Plot Sankey + Plot Volcano @@ -4300,8 +4360,8 @@ 0 0 - 500 - 66 + 888 + 146 @@ -4310,81 +4370,58 @@ - - + + 0 0 + + Qt::LeftToRight + - Tables + Width Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - 0 - 0 - - - - 4 + + + + 1 - 1.000000000000000 + 99 - 0.010000000000000 + 1 - 0.050000000000000 + 10 - - + + 0 0 - - - padj - - - - - pvalue - - - - - - - - - 0 - 0 - - - Log2FC Range + Height Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + @@ -4400,154 +4437,151 @@ - - - - - 0 - 0 - - - - 1 - - - 1.000000000000000 - - - - + - + 0 0 + + + padj + + + + + pvalue + + - - + + 0 0 - + + 1 + + + 99 + + 1 - 20.000000000000000 + 8 - - + + - + 0 0 - - + Log2FC Range Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - 0 - 0 - - - - Qt::LeftToRight - + + - Width + Font Size Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - + + + + + 0 + 0 + + + 1 - - 99 + + 1.000000000000000 - + + + + + 1 - 10 + 12 - - + + - + 0 0 - Height + - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 0 - - 1 - - - 99 - - + 1 - 8 + 20.000000000000000 - - - - Font Size + + + + + 0 + 0 + - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + 4 - - - - - - 1 + + 1.000000000000000 + + + 0.010000000000000 - 12 + 0.050000000000000 @@ -4557,20 +4591,6 @@ - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - @@ -4824,8 +4844,8 @@ 0 0 - 881 - 165 + 912 + 196 @@ -4895,7 +4915,7 @@ false - + 0 0 @@ -4903,7 +4923,7 @@ 16777215 - 50 + 30 @@ -4918,8 +4938,8 @@ 0 0 - 895 - 137 + 912 + 196 @@ -5201,7 +5221,7 @@ - + 0 0 @@ -5216,6 +5236,12 @@ + + + 0 + 0 + + Row Cluster @@ -5287,7 +5313,7 @@ - + 0 0 @@ -5370,7 +5396,7 @@ - + 0 0 @@ -5511,6 +5537,12 @@ + + + 0 + 0 + + Remove Zero Col @@ -6036,15 +6068,15 @@ - 0 + 1 0 0 - 857 - 96 + 309 + 41 @@ -6084,8 +6116,8 @@ 0 0 - 360 - 115 + 888 + 145 @@ -6094,79 +6126,135 @@ - - + + + + + + Show All Labels + + + + + + + X + + + + + + + Y + + + + + + + + + true + - + 0 0 - Threshold for Plot + Rename Taxa - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true - - - - - pearson - - - - - spearman - - - - - - + + - + 0 0 - - - 20 - 0 - - - - 1 - - - 99 - - - 1 + + Threshold for Plot - - 8 + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - 0 - 0 - - - - Width - - + + + + + + + 0 + 0 + + + + Method of Correlation + + + + + + + + pearson + + + + + spearman + + + + + - - + + + + + + + 0 + 0 + + + + Font Size + + + + + + + true + + + + 0 + 0 + + + + 1 + + + 10 + + + + + + + 0 @@ -6174,36 +6262,25 @@ - Height + Show Labels - - - - - 0 - 0 - - - - 1 - - - 99 - - - 1 - - - 10 - - - 10 - - + + + + + + Theme + + + + + + + - + @@ -6222,87 +6299,142 @@ - - - - - 0 - 0 - + + + + + + + 0 + 0 + + + + Height + + + + + + + + 0 + 0 + + + + 1 + + + 99 + + + 1 + + + 10 + + + 10 + + + + + + + + 0 + 0 + + + + Width + + + + + + + + 0 + 0 + + + + + 20 + 0 + + + + 1 + + + 99 + + + 1 + + + 8 + + + + + + + + + + 75 + true + - Method of Correlation + Heatmap - - - - - 0 - 0 - + + + + + 75 + true + - Show Labels + General - - - - true - - - - 0 - 0 - + + + + + 75 + true + - Rename Taxa - - - true + Network - - - - - 0 - 0 - - + + - Font Size + Plot List Only - - - - - + true - - - 0 - 0 - - - - 1 - - - 10 - - - - - Plot List Only + + + + Qt::Horizontal @@ -6345,8 +6477,8 @@ 0 0 - 840 - 81 + 888 + 153 @@ -6472,8 +6604,8 @@ 0 0 - 538 - 63 + 888 + 153 @@ -6491,7 +6623,7 @@ - general + General @@ -6543,7 +6675,7 @@ - + 0 0 @@ -7089,7 +7221,7 @@ Taxa-Func Link - + true @@ -7098,7 +7230,7 @@ QTabWidget::Triangular - 1 + 0 @@ -7360,15 +7492,15 @@ - 1 + 0 0 0 - 203 - 70 + 888 + 196 @@ -7425,7 +7557,7 @@ - Get Intensity Matrix + Get Intensity Table @@ -7436,7 +7568,7 @@ 0 0 - 857 + 888 196 @@ -8045,17 +8177,26 @@ Taxa-Func Network + + + false - + 0 0 + + + 100 + 16777215 + + Add selected item to the drawing box @@ -8064,11 +8205,8 @@ - - - - - + + 0 @@ -8076,386 +8214,86 @@ - Group - - - true + Sample - - - - - - - - - - Qt::Horizontal + + + + false - - - - - - Qt::Horizontal + + + 0 + 0 + + + + + 100 + 16777215 + + + + Add conditionally filtered items to the drawing box + + + Add Top to List - - - - - - Qt::RightToLeft - - - In Condition - - - - - - - false - - - - - - - + + + + + 0 + 150 + + + + + 16777215 + 210 + + + + 0 + + + + + 0 + 0 + 888 + 145 + + + + Plot + + + + - false - - - - - - - - - - - - - - 0 - 0 - - - - Select Top - - - - - - - - 0 - 0 - - - - 1 - - - 99999 - - - 10 - - - - - - - - 0 - 0 - - - - Sort by - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - Total Intensity - - - - - Frequency in Samples - - - - - Number of links - - - - - ANOVA(p-value) - - - - - ANOVA(f-statistic) - - - - - T-TEST(p-value) - - - - - T-TEST(t-statistic) - - - - - Deseq2-up(p-value) - - - - - Deseq2-down(p-value) - - - - - Deseq2-up(log2FC) - - - - - Deseq2-down(log2FC) - - - - - - - - - 0 - 0 - - - - Filter with threshold - - - - - - - - - - - - 0 - 0 - - - - Table - - - - - - - false - - - - Taxa - - - - - Functions - - - - - Taxa-Functions - - - - - - - - Meta - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - - - 0 - 0 - - - - Sample - - - - - - - false - - - - 0 - 0 - - - - Add conditionally filtered items to the drawing box - - - Add Top to List - - - - - - - - 0 - 0 - - - - Focus List - - - - - - - - - false - - - - 0 - 0 - - - - Drop Item - - - - - - - false - - - - 0 - 0 - - - - Clean List - - - - - - - false - - - Add a list to the drawing box, make sure there is one item per line. - - - Add a list - - - - - - - - - - 0 - 150 - - - - - 16777215 - 210 - - - - 0 - - - - - 0 - 0 - 857 - 96 - - - - Plot - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 50 - - - - Plot Ntework - - + false + + + + 0 + 0 + + + + + 16777215 + 50 + + + + Plot Ntework + + false @@ -8467,8 +8305,8 @@ 0 0 - 383 - 68 + 888 + 145 @@ -8643,13 +8481,331 @@ - + 0 0 + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + Group + + + true + + + + + + + + + + + + + 0 + 0 + + + + Select Top + + + + + + + + 0 + 0 + + + + 1 + + + 99999 + + + 10 + + + + + + + + 0 + 0 + + + + Sort by + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Total Intensity + + + + + Frequency in Samples + + + + + Number of links + + + + + ANOVA(p-value) + + + + + ANOVA(f-statistic) + + + + + T-TEST(p-value) + + + + + T-TEST(t-statistic) + + + + + Deseq2-up(p-value) + + + + + Deseq2-down(p-value) + + + + + Deseq2-up(log2FC) + + + + + Deseq2-down(log2FC) + + + + + + + + + 0 + 0 + + + + Filter with threshold + + + + + + + + + + 0 + 0 + + + + Focus List + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + + + + + + + + false + + + + 0 + 0 + + + + Drop Item + + + + + + + false + + + + 0 + 0 + + + + Clean List + + + + + + + false + + + Add a list to the drawing box, make sure there is one item per line. + + + Add a list + + + + + + + + + + + Qt::RightToLeft + + + In Condition + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + 0 + 0 + + + + Table + + + + + + + false + + + + Taxa + + + + + Functions + + + + + Taxa-Functions + + + + + + + + Meta + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + Qt::Horizontal + + + @@ -9471,8 +9627,8 @@ 0 0 - 941 - 23 + 972 + 21 diff --git a/metax/gui/metax_gui/ui_main_window.py b/metax/gui/metax_gui/ui_main_window.py index 1c47789..9b446ca 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 # @@ -14,7 +14,7 @@ class Ui_metaX_main(object): def setupUi(self, metaX_main): metaX_main.setObjectName("metaX_main") - metaX_main.resize(941, 617) + metaX_main.resize(972, 721) 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, 437, 392)) + self.page_2.setGeometry(QtCore.QRect(0, 0, 453, 500)) self.page_2.setObjectName("page_2") self.gridLayout_27 = QtWidgets.QGridLayout(self.page_2) self.gridLayout_27.setObjectName("gridLayout_27") @@ -865,7 +865,7 @@ def setupUi(self, metaX_main): self.gridLayout_40.addLayout(self.gridLayout_54, 0, 0, 1, 1) self.toolBox_4.addItem(self.page_10, "") self.page_11 = QtWidgets.QWidget() - self.page_11.setGeometry(QtCore.QRect(0, 0, 857, 299)) + self.page_11.setGeometry(QtCore.QRect(0, 0, 888, 376)) self.page_11.setObjectName("page_11") self.gridLayout_34 = QtWidgets.QGridLayout(self.page_11) self.gridLayout_34.setObjectName("gridLayout_34") @@ -1008,6 +1008,17 @@ def setupUi(self, metaX_main): 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.page_11) + 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.page_11) + 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_168 = QtWidgets.QLabel(self.page_11) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) @@ -1499,7 +1510,7 @@ def setupUi(self, metaX_main): self.gridLayout_46.addLayout(self.gridLayout_39, 0, 0, 1, 1) self.toolBox.addItem(self.page_7, "") self.page_6 = QtWidgets.QWidget() - self.page_6.setGeometry(QtCore.QRect(0, 0, 840, 150)) + self.page_6.setGeometry(QtCore.QRect(0, 0, 888, 150)) self.page_6.setObjectName("page_6") self.gridLayout_41 = QtWidgets.QGridLayout(self.page_6) self.gridLayout_41.setObjectName("gridLayout_41") @@ -2103,6 +2114,65 @@ 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.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.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_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_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.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_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.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.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.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_61 = QtWidgets.QHBoxLayout() self.horizontalLayout_61.setObjectName("horizontalLayout_61") self.comboBox_table_for_deseq2 = QtWidgets.QComboBox(self.tab_19) @@ -2143,14 +2213,6 @@ def setupUi(self, metaX_main): 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) @@ -2184,52 +2246,11 @@ def setupUi(self, metaX_main): 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_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.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_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.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.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.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.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.toolBox_3 = QtWidgets.QToolBox(self.tab_19) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) @@ -2239,19 +2260,10 @@ def setupUi(self, metaX_main): self.toolBox_3.setMaximumSize(QtCore.QSize(16777215, 200)) self.toolBox_3.setObjectName("toolBox_3") self.page_8 = QtWidgets.QWidget() - self.page_8.setGeometry(QtCore.QRect(0, 0, 174, 41)) + self.page_8.setGeometry(QtCore.QRect(0, 0, 888, 146)) self.page_8.setObjectName("page_8") self.gridLayout_49 = QtWidgets.QGridLayout(self.page_8) self.gridLayout_49.setObjectName("gridLayout_49") - self.pushButton_deseq2_plot_vocano = QtWidgets.QPushButton(self.page_8) - 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_49.addWidget(self.pushButton_deseq2_plot_vocano, 2, 0, 1, 1) self.pushButton_deseq2_plot_sankey = QtWidgets.QPushButton(self.page_8) self.pushButton_deseq2_plot_sankey.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) @@ -2261,15 +2273,9 @@ def setupUi(self, metaX_main): self.pushButton_deseq2_plot_sankey.setSizePolicy(sizePolicy) self.pushButton_deseq2_plot_sankey.setObjectName("pushButton_deseq2_plot_sankey") self.gridLayout_49.addWidget(self.pushButton_deseq2_plot_sankey, 2, 1, 1, 1) - self.toolBox_3.addItem(self.page_8, "") - self.page_9 = QtWidgets.QWidget() - self.page_9.setGeometry(QtCore.QRect(0, 0, 500, 66)) - self.page_9.setObjectName("page_9") - self.gridLayout_48 = QtWidgets.QGridLayout(self.page_9) - self.gridLayout_48.setObjectName("gridLayout_48") - self.gridLayout_53 = QtWidgets.QGridLayout() - self.gridLayout_53.setObjectName("gridLayout_53") - self.label_64 = QtWidgets.QLabel(self.page_9) + self.horizontalLayout_92 = QtWidgets.QHBoxLayout() + self.horizontalLayout_92.setObjectName("horizontalLayout_92") + self.label_64 = QtWidgets.QLabel(self.page_8) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -2277,84 +2283,33 @@ def setupUi(self, metaX_main): 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.gridLayout_53.addWidget(self.label_64, 0, 0, 1, 1) - self.doubleSpinBox_deseq2_pvalue = QtWidgets.QDoubleSpinBox(self.page_9) - 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, 4, 1, 1) - self.comboBox_deseq2_p_type = QtWidgets.QComboBox(self.page_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, 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, 3, 1, 1) - self.label_71 = QtWidgets.QLabel(self.page_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - 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, 5, 1, 1) - self.label_14 = QtWidgets.QLabel(self.page_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, 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, 2, 1, 1) - self.doubleSpinBox_deseq2_log2fc_min = QtWidgets.QDoubleSpinBox(self.page_9) - 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, 6, 1, 1) - self.comboBox_deseq2_tables = QtWidgets.QComboBox(self.page_9) + self.horizontalLayout_92.addWidget(self.label_64) + self.comboBox_deseq2_tables = QtWidgets.QComboBox(self.page_8) 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.gridLayout_53.addWidget(self.comboBox_deseq2_tables, 0, 1, 1, 1) - self.doubleSpinBox_deseq2_log2fc_max = QtWidgets.QDoubleSpinBox(self.page_9) + self.horizontalLayout_92.addWidget(self.comboBox_deseq2_tables) + self.gridLayout_49.addLayout(self.horizontalLayout_92, 0, 0, 1, 1) + self.pushButton_deseq2_plot_vocano = QtWidgets.QPushButton(self.page_8) + 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.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, 8, 1, 1) - self.label_63 = QtWidgets.QLabel(self.page_9) - 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, 7, 1, 1) + 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_49.addWidget(self.pushButton_deseq2_plot_vocano, 0, 1, 1, 1) + self.toolBox_3.addItem(self.page_8, "") + self.page_9 = QtWidgets.QWidget() + self.page_9.setGeometry(QtCore.QRect(0, 0, 888, 146)) + self.page_9.setObjectName("page_9") + self.gridLayout_48 = QtWidgets.QGridLayout(self.page_9) + self.gridLayout_48.setObjectName("gridLayout_48") + self.gridLayout_53 = QtWidgets.QGridLayout() + self.gridLayout_53.setObjectName("gridLayout_53") self.label_16 = QtWidgets.QLabel(self.page_9) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -2381,6 +2336,25 @@ def setupUi(self, metaX_main): 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.page_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, 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.comboBox_deseq2_p_type = QtWidgets.QComboBox(self.page_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, 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.spinBox_fc_plot_height = QtWidgets.QSpinBox(self.page_9) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -2393,30 +2367,70 @@ def setupUi(self, metaX_main): 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) + self.label_71 = QtWidgets.QLabel(self.page_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) + 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.label_156 = QtWidgets.QLabel(self.page_9) 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, 5, 1, 1) + self.gridLayout_53.addWidget(self.label_156, 1, 4, 1, 1) + self.doubleSpinBox_deseq2_log2fc_min = QtWidgets.QDoubleSpinBox(self.page_9) + 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.spinBox_seqeq2_font_size = QtWidgets.QSpinBox(self.page_9) 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, 6, 1, 1) - self.gridLayout_48.addLayout(self.gridLayout_53, 0, 1, 1, 1) - self.toolBox_3.addItem(self.page_9, "") - self.gridLayout_16.addWidget(self.toolBox_3, 6, 0, 1, 3) - 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.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.tabWidget_3.addTab(self.tab_19, "") - self.tab_4 = QtWidgets.QWidget() + self.gridLayout_53.addWidget(self.spinBox_seqeq2_font_size, 1, 5, 1, 1) + self.label_63 = QtWidgets.QLabel(self.page_9) + 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.page_9) + 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.doubleSpinBox_deseq2_pvalue = QtWidgets.QDoubleSpinBox(self.page_9) + 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.gridLayout_48.addLayout(self.gridLayout_53, 0, 1, 1, 1) + self.toolBox_3.addItem(self.page_9, "") + self.gridLayout_16.addWidget(self.toolBox_3, 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") @@ -2549,7 +2563,7 @@ def setupUi(self, metaX_main): self.toolBox_9.setMaximumSize(QtCore.QSize(16777215, 250)) self.toolBox_9.setObjectName("toolBox_9") self.page_20 = QtWidgets.QWidget() - self.page_20.setGeometry(QtCore.QRect(0, 0, 881, 165)) + self.page_20.setGeometry(QtCore.QRect(0, 0, 912, 196)) self.page_20.setObjectName("page_20") self.gridLayout_69 = QtWidgets.QGridLayout(self.page_20) self.gridLayout_69.setObjectName("gridLayout_69") @@ -2587,17 +2601,17 @@ def setupUi(self, metaX_main): self.gridLayout_69.addWidget(self.pushButton_plot_top_heatmap, 0, 1, 1, 1) self.pushButton_get_top_cross_table = QtWidgets.QPushButton(self.page_20) self.pushButton_get_top_cross_table.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_get_top_cross_table.sizePolicy().hasHeightForWidth()) self.pushButton_get_top_cross_table.setSizePolicy(sizePolicy) - self.pushButton_get_top_cross_table.setMaximumSize(QtCore.QSize(16777215, 50)) + 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_69.addWidget(self.pushButton_get_top_cross_table, 1, 1, 1, 1) self.toolBox_9.addItem(self.page_20, "") self.page_21 = QtWidgets.QWidget() - self.page_21.setGeometry(QtCore.QRect(0, 0, 895, 137)) + self.page_21.setGeometry(QtCore.QRect(0, 0, 912, 196)) self.page_21.setObjectName("page_21") self.gridLayout_68 = QtWidgets.QGridLayout(self.page_21) self.gridLayout_68.setObjectName("gridLayout_68") @@ -2742,7 +2756,7 @@ def setupUi(self, metaX_main): self.horizontalLayout_23 = QtWidgets.QHBoxLayout() self.horizontalLayout_23.setObjectName("horizontalLayout_23") self.checkBox_cross_heatmap_col_cluster = QtWidgets.QCheckBox(self.page_21) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + 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()) @@ -2751,6 +2765,11 @@ def setupUi(self, metaX_main): self.checkBox_cross_heatmap_col_cluster.setObjectName("checkBox_cross_heatmap_col_cluster") self.horizontalLayout_23.addWidget(self.checkBox_cross_heatmap_col_cluster) self.checkBox_cross_heatmap_row_cluster = QtWidgets.QCheckBox(self.page_21) + 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.setChecked(True) self.checkBox_cross_heatmap_row_cluster.setObjectName("checkBox_cross_heatmap_row_cluster") self.horizontalLayout_23.addWidget(self.checkBox_cross_heatmap_row_cluster) @@ -2790,7 +2809,7 @@ def setupUi(self, metaX_main): self.label_30.setObjectName("label_30") self.horizontalLayout_16.addWidget(self.label_30) self.doubleSpinBox_top_heatmap_pvalue = QtWidgets.QDoubleSpinBox(self.page_21) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.doubleSpinBox_top_heatmap_pvalue.sizePolicy().hasHeightForWidth()) @@ -2835,7 +2854,7 @@ def setupUi(self, metaX_main): self.horizontalLayout_86.setSpacing(2) self.horizontalLayout_86.setObjectName("horizontalLayout_86") self.label_141 = QtWidgets.QLabel(self.page_21) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_141.sizePolicy().hasHeightForWidth()) @@ -2900,6 +2919,11 @@ def setupUi(self, metaX_main): self.horizontalLayout_84.addWidget(self.doubleSpinBox_max_log2fc_heatmap) self.gridLayout_38.addLayout(self.horizontalLayout_84, 0, 1, 1, 1) self.checkBox_cross_3_level_plot_remove_zero_col = QtWidgets.QCheckBox(self.page_21) + 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.setChecked(True) self.checkBox_cross_3_level_plot_remove_zero_col.setObjectName("checkBox_cross_3_level_plot_remove_zero_col") self.gridLayout_38.addWidget(self.checkBox_cross_3_level_plot_remove_zero_col, 0, 3, 1, 1) @@ -3165,7 +3189,7 @@ def setupUi(self, metaX_main): self.toolBox_5.setMaximumSize(QtCore.QSize(16777215, 250)) self.toolBox_5.setObjectName("toolBox_5") self.page_12 = QtWidgets.QWidget() - self.page_12.setGeometry(QtCore.QRect(0, 0, 857, 96)) + self.page_12.setGeometry(QtCore.QRect(0, 0, 309, 41)) self.page_12.setObjectName("page_12") self.gridLayout_56 = QtWidgets.QGridLayout(self.page_12) self.gridLayout_56.setObjectName("gridLayout_56") @@ -3184,12 +3208,34 @@ def setupUi(self, metaX_main): self.gridLayout_56.addWidget(self.pushButton_co_expr_heatmap_plot, 0, 1, 1, 1) self.toolBox_5.addItem(self.page_12, "") self.page_13 = QtWidgets.QWidget() - self.page_13.setGeometry(QtCore.QRect(0, 0, 360, 115)) + self.page_13.setGeometry(QtCore.QRect(0, 0, 888, 145)) self.page_13.setObjectName("page_13") self.gridLayout_57 = QtWidgets.QGridLayout(self.page_13) self.gridLayout_57.setObjectName("gridLayout_57") self.gridLayout_58 = QtWidgets.QGridLayout() self.gridLayout_58.setObjectName("gridLayout_58") + self.horizontalLayout_60 = QtWidgets.QHBoxLayout() + self.horizontalLayout_60.setObjectName("horizontalLayout_60") + self.label_190 = QtWidgets.QLabel(self.page_13) + self.label_190.setObjectName("label_190") + self.horizontalLayout_60.addWidget(self.label_190) + self.checkBox_corr_hetatmap_show_all_labels_x = QtWidgets.QCheckBox(self.page_13) + self.checkBox_corr_hetatmap_show_all_labels_x.setObjectName("checkBox_corr_hetatmap_show_all_labels_x") + self.horizontalLayout_60.addWidget(self.checkBox_corr_hetatmap_show_all_labels_x) + self.checkBox_corr_hetatmap_show_all_labels_y = QtWidgets.QCheckBox(self.page_13) + self.checkBox_corr_hetatmap_show_all_labels_y.setObjectName("checkBox_corr_hetatmap_show_all_labels_y") + self.horizontalLayout_60.addWidget(self.checkBox_corr_hetatmap_show_all_labels_y) + self.gridLayout_58.addLayout(self.horizontalLayout_60, 4, 1, 1, 1) + self.checkBox_co_expr_rename_taxa = QtWidgets.QCheckBox(self.page_13) + self.checkBox_co_expr_rename_taxa.setEnabled(True) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_co_expr_rename_taxa.sizePolicy().hasHeightForWidth()) + self.checkBox_co_expr_rename_taxa.setSizePolicy(sizePolicy) + self.checkBox_co_expr_rename_taxa.setChecked(True) + self.checkBox_co_expr_rename_taxa.setObjectName("checkBox_co_expr_rename_taxa") + self.gridLayout_58.addWidget(self.checkBox_co_expr_rename_taxa, 1, 1, 1, 1) self.label_66 = QtWidgets.QLabel(self.page_13) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -3198,54 +3244,62 @@ def setupUi(self, metaX_main): self.label_66.setSizePolicy(sizePolicy) self.label_66.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_66.setObjectName("label_66") - self.gridLayout_58.addWidget(self.label_66, 0, 2, 1, 1) + self.gridLayout_58.addWidget(self.label_66, 3, 1, 1, 1) + self.horizontalLayout_54 = QtWidgets.QHBoxLayout() + self.horizontalLayout_54.setObjectName("horizontalLayout_54") + self.label_65 = QtWidgets.QLabel(self.page_13) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_65.sizePolicy().hasHeightForWidth()) + self.label_65.setSizePolicy(sizePolicy) + self.label_65.setObjectName("label_65") + self.horizontalLayout_54.addWidget(self.label_65) self.comboBox_co_expr_corr_method = QtWidgets.QComboBox(self.page_13) self.comboBox_co_expr_corr_method.setObjectName("comboBox_co_expr_corr_method") self.comboBox_co_expr_corr_method.addItem("") self.comboBox_co_expr_corr_method.addItem("") - self.gridLayout_58.addWidget(self.comboBox_co_expr_corr_method, 0, 1, 1, 1) - self.spinBox_co_expr_height = QtWidgets.QSpinBox(self.page_13) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + self.horizontalLayout_54.addWidget(self.comboBox_co_expr_corr_method) + self.gridLayout_58.addLayout(self.horizontalLayout_54, 0, 1, 1, 1) + self.horizontalLayout_30 = QtWidgets.QHBoxLayout() + self.horizontalLayout_30.setObjectName("horizontalLayout_30") + self.label_162 = QtWidgets.QLabel(self.page_13) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_co_expr_height.sizePolicy().hasHeightForWidth()) - self.spinBox_co_expr_height.setSizePolicy(sizePolicy) - self.spinBox_co_expr_height.setMinimumSize(QtCore.QSize(20, 0)) - self.spinBox_co_expr_height.setMinimum(1) - self.spinBox_co_expr_height.setMaximum(99) - self.spinBox_co_expr_height.setSingleStep(1) - self.spinBox_co_expr_height.setProperty("value", 8) - self.spinBox_co_expr_height.setObjectName("spinBox_co_expr_height") - self.gridLayout_58.addWidget(self.spinBox_co_expr_height, 1, 3, 1, 1) - self.label_124 = QtWidgets.QLabel(self.page_13) + sizePolicy.setHeightForWidth(self.label_162.sizePolicy().hasHeightForWidth()) + self.label_162.setSizePolicy(sizePolicy) + self.label_162.setObjectName("label_162") + self.horizontalLayout_30.addWidget(self.label_162) + self.spinBox_co_expr_font_size = QtWidgets.QSpinBox(self.page_13) + self.spinBox_co_expr_font_size.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_124.sizePolicy().hasHeightForWidth()) - self.label_124.setSizePolicy(sizePolicy) - self.label_124.setObjectName("label_124") - self.gridLayout_58.addWidget(self.label_124, 1, 2, 1, 1) - self.label_125 = QtWidgets.QLabel(self.page_13) + sizePolicy.setHeightForWidth(self.spinBox_co_expr_font_size.sizePolicy().hasHeightForWidth()) + self.spinBox_co_expr_font_size.setSizePolicy(sizePolicy) + self.spinBox_co_expr_font_size.setMinimum(1) + self.spinBox_co_expr_font_size.setProperty("value", 10) + self.spinBox_co_expr_font_size.setObjectName("spinBox_co_expr_font_size") + self.horizontalLayout_30.addWidget(self.spinBox_co_expr_font_size) + self.gridLayout_58.addLayout(self.horizontalLayout_30, 0, 3, 1, 1) + self.checkBox_co_expr_show_label = QtWidgets.QCheckBox(self.page_13) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_125.sizePolicy().hasHeightForWidth()) - self.label_125.setSizePolicy(sizePolicy) - self.label_125.setObjectName("label_125") - self.gridLayout_58.addWidget(self.label_125, 1, 0, 1, 1) - self.spinBox_co_expr_width = QtWidgets.QSpinBox(self.page_13) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_co_expr_width.sizePolicy().hasHeightForWidth()) - self.spinBox_co_expr_width.setSizePolicy(sizePolicy) - self.spinBox_co_expr_width.setMinimum(1) - self.spinBox_co_expr_width.setMaximum(99) - self.spinBox_co_expr_width.setSingleStep(1) - self.spinBox_co_expr_width.setProperty("value", 10) - self.spinBox_co_expr_width.setDisplayIntegerBase(10) - self.spinBox_co_expr_width.setObjectName("spinBox_co_expr_width") - self.gridLayout_58.addWidget(self.spinBox_co_expr_width, 1, 1, 1, 1) + sizePolicy.setHeightForWidth(self.checkBox_co_expr_show_label.sizePolicy().hasHeightForWidth()) + self.checkBox_co_expr_show_label.setSizePolicy(sizePolicy) + self.checkBox_co_expr_show_label.setObjectName("checkBox_co_expr_show_label") + self.gridLayout_58.addWidget(self.checkBox_co_expr_show_label, 3, 3, 1, 1) + self.horizontalLayout_62 = QtWidgets.QHBoxLayout() + self.horizontalLayout_62.setObjectName("horizontalLayout_62") + self.label_191 = QtWidgets.QLabel(self.page_13) + self.label_191.setObjectName("label_191") + self.horizontalLayout_62.addWidget(self.label_191) + self.comboBox_corr_hetatmap_cmap = QtWidgets.QComboBox(self.page_13) + self.comboBox_corr_hetatmap_cmap.setObjectName("comboBox_corr_hetatmap_cmap") + self.horizontalLayout_62.addWidget(self.comboBox_corr_hetatmap_cmap) + self.gridLayout_58.addLayout(self.horizontalLayout_62, 4, 2, 1, 1) self.doubleSpinBox_co_expr_corr_threshold = QtWidgets.QDoubleSpinBox(self.page_13) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -3256,55 +3310,82 @@ def setupUi(self, metaX_main): self.doubleSpinBox_co_expr_corr_threshold.setSingleStep(0.01) self.doubleSpinBox_co_expr_corr_threshold.setProperty("value", 0.5) self.doubleSpinBox_co_expr_corr_threshold.setObjectName("doubleSpinBox_co_expr_corr_threshold") - self.gridLayout_58.addWidget(self.doubleSpinBox_co_expr_corr_threshold, 0, 3, 1, 1) - self.label_65 = QtWidgets.QLabel(self.page_13) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_65.sizePolicy().hasHeightForWidth()) - self.label_65.setSizePolicy(sizePolicy) - self.label_65.setObjectName("label_65") - self.gridLayout_58.addWidget(self.label_65, 0, 0, 1, 1) - self.checkBox_co_expr_show_label = QtWidgets.QCheckBox(self.page_13) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + self.gridLayout_58.addWidget(self.doubleSpinBox_co_expr_corr_threshold, 3, 2, 1, 1) + self.horizontalLayout_7 = QtWidgets.QHBoxLayout() + self.horizontalLayout_7.setObjectName("horizontalLayout_7") + self.label_125 = QtWidgets.QLabel(self.page_13) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_co_expr_show_label.sizePolicy().hasHeightForWidth()) - self.checkBox_co_expr_show_label.setSizePolicy(sizePolicy) - self.checkBox_co_expr_show_label.setObjectName("checkBox_co_expr_show_label") - self.gridLayout_58.addWidget(self.checkBox_co_expr_show_label, 2, 0, 1, 1) - self.checkBox_co_expr_rename_taxa = QtWidgets.QCheckBox(self.page_13) - self.checkBox_co_expr_rename_taxa.setEnabled(True) + sizePolicy.setHeightForWidth(self.label_125.sizePolicy().hasHeightForWidth()) + self.label_125.setSizePolicy(sizePolicy) + self.label_125.setObjectName("label_125") + self.horizontalLayout_7.addWidget(self.label_125) + self.spinBox_co_expr_width = QtWidgets.QSpinBox(self.page_13) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_co_expr_rename_taxa.sizePolicy().hasHeightForWidth()) - self.checkBox_co_expr_rename_taxa.setSizePolicy(sizePolicy) - self.checkBox_co_expr_rename_taxa.setChecked(True) - self.checkBox_co_expr_rename_taxa.setObjectName("checkBox_co_expr_rename_taxa") - self.gridLayout_58.addWidget(self.checkBox_co_expr_rename_taxa, 2, 1, 1, 1) - self.label_162 = QtWidgets.QLabel(self.page_13) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHeightForWidth(self.spinBox_co_expr_width.sizePolicy().hasHeightForWidth()) + self.spinBox_co_expr_width.setSizePolicy(sizePolicy) + self.spinBox_co_expr_width.setMinimum(1) + self.spinBox_co_expr_width.setMaximum(99) + self.spinBox_co_expr_width.setSingleStep(1) + self.spinBox_co_expr_width.setProperty("value", 10) + self.spinBox_co_expr_width.setDisplayIntegerBase(10) + self.spinBox_co_expr_width.setObjectName("spinBox_co_expr_width") + self.horizontalLayout_7.addWidget(self.spinBox_co_expr_width) + self.label_124 = QtWidgets.QLabel(self.page_13) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_162.sizePolicy().hasHeightForWidth()) - self.label_162.setSizePolicy(sizePolicy) - self.label_162.setObjectName("label_162") - self.gridLayout_58.addWidget(self.label_162, 2, 2, 1, 1) - self.spinBox_co_expr_font_size = QtWidgets.QSpinBox(self.page_13) - self.spinBox_co_expr_font_size.setEnabled(True) + sizePolicy.setHeightForWidth(self.label_124.sizePolicy().hasHeightForWidth()) + self.label_124.setSizePolicy(sizePolicy) + self.label_124.setObjectName("label_124") + self.horizontalLayout_7.addWidget(self.label_124) + self.spinBox_co_expr_height = QtWidgets.QSpinBox(self.page_13) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_co_expr_font_size.sizePolicy().hasHeightForWidth()) - self.spinBox_co_expr_font_size.setSizePolicy(sizePolicy) - self.spinBox_co_expr_font_size.setMinimum(1) - self.spinBox_co_expr_font_size.setProperty("value", 10) - self.spinBox_co_expr_font_size.setObjectName("spinBox_co_expr_font_size") - self.gridLayout_58.addWidget(self.spinBox_co_expr_font_size, 2, 3, 1, 1) + sizePolicy.setHeightForWidth(self.spinBox_co_expr_height.sizePolicy().hasHeightForWidth()) + self.spinBox_co_expr_height.setSizePolicy(sizePolicy) + self.spinBox_co_expr_height.setMinimumSize(QtCore.QSize(20, 0)) + self.spinBox_co_expr_height.setMinimum(1) + self.spinBox_co_expr_height.setMaximum(99) + self.spinBox_co_expr_height.setSingleStep(1) + self.spinBox_co_expr_height.setProperty("value", 8) + self.spinBox_co_expr_height.setObjectName("spinBox_co_expr_height") + self.horizontalLayout_7.addWidget(self.spinBox_co_expr_height) + self.gridLayout_58.addLayout(self.horizontalLayout_7, 0, 2, 1, 1) + self.label_189 = QtWidgets.QLabel(self.page_13) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_189.setFont(font) + self.label_189.setObjectName("label_189") + self.gridLayout_58.addWidget(self.label_189, 4, 0, 1, 1) + self.label_187 = QtWidgets.QLabel(self.page_13) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_187.setFont(font) + self.label_187.setObjectName("label_187") + self.gridLayout_58.addWidget(self.label_187, 0, 0, 1, 1) + self.label_188 = QtWidgets.QLabel(self.page_13) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_188.setFont(font) + self.label_188.setObjectName("label_188") + self.gridLayout_58.addWidget(self.label_188, 3, 0, 1, 1) self.checkBox_co_expr_plot_list_only = QtWidgets.QCheckBox(self.page_13) + self.checkBox_co_expr_plot_list_only.setChecked(True) self.checkBox_co_expr_plot_list_only.setObjectName("checkBox_co_expr_plot_list_only") - self.gridLayout_58.addWidget(self.checkBox_co_expr_plot_list_only, 3, 0, 1, 1) + self.gridLayout_58.addWidget(self.checkBox_co_expr_plot_list_only, 1, 2, 1, 1) + self.line_30 = QtWidgets.QFrame(self.page_13) + self.line_30.setFrameShape(QtWidgets.QFrame.HLine) + self.line_30.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_30.setObjectName("line_30") + self.gridLayout_58.addWidget(self.line_30, 2, 1, 1, 3) self.gridLayout_57.addLayout(self.gridLayout_58, 1, 0, 1, 1) self.toolBox_5.addItem(self.page_13, "") self.gridLayout_47.addWidget(self.toolBox_5, 8, 0, 1, 4) @@ -3325,7 +3406,7 @@ def setupUi(self, metaX_main): self.toolBox_6.setMaximumSize(QtCore.QSize(16777215, 210)) self.toolBox_6.setObjectName("toolBox_6") self.page_14 = QtWidgets.QWidget() - self.page_14.setGeometry(QtCore.QRect(0, 0, 840, 81)) + self.page_14.setGeometry(QtCore.QRect(0, 0, 888, 153)) self.page_14.setObjectName("page_14") self.gridLayout_62 = QtWidgets.QGridLayout(self.page_14) self.gridLayout_62.setObjectName("gridLayout_62") @@ -3394,7 +3475,7 @@ def setupUi(self, metaX_main): self.gridLayout_62.addLayout(self.gridLayout_61, 0, 0, 1, 1) self.toolBox_6.addItem(self.page_14, "") self.page_15 = QtWidgets.QWidget() - self.page_15.setGeometry(QtCore.QRect(0, 0, 538, 63)) + self.page_15.setGeometry(QtCore.QRect(0, 0, 888, 153)) self.page_15.setObjectName("page_15") self.gridLayout_60 = QtWidgets.QGridLayout(self.page_15) self.gridLayout_60.setObjectName("gridLayout_60") @@ -3434,7 +3515,7 @@ def setupUi(self, metaX_main): self.checkBox_get_trends_cluster_intensity.setObjectName("checkBox_get_trends_cluster_intensity") self.gridLayout_59.addWidget(self.checkBox_get_trends_cluster_intensity, 1, 3, 1, 2) self.label_158 = QtWidgets.QLabel(self.page_15) - 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_158.sizePolicy().hasHeightForWidth()) @@ -3895,7 +3976,7 @@ def setupUi(self, metaX_main): self.toolBox_8.setMaximumSize(QtCore.QSize(16777215, 250)) self.toolBox_8.setObjectName("toolBox_8") self.page_18 = QtWidgets.QWidget() - self.page_18.setGeometry(QtCore.QRect(0, 0, 203, 70)) + self.page_18.setGeometry(QtCore.QRect(0, 0, 888, 196)) self.page_18.setObjectName("page_18") self.gridLayout_66 = QtWidgets.QGridLayout(self.page_18) self.gridLayout_66.setObjectName("gridLayout_66") @@ -3929,7 +4010,7 @@ def setupUi(self, metaX_main): self.gridLayout_66.addWidget(self.pushButton_others_get_intensity_matrix, 1, 1, 1, 1) self.toolBox_8.addItem(self.page_18, "") self.page_19 = QtWidgets.QWidget() - self.page_19.setGeometry(QtCore.QRect(0, 0, 857, 196)) + self.page_19.setGeometry(QtCore.QRect(0, 0, 888, 196)) self.page_19.setObjectName("page_19") self.gridLayout_65 = QtWidgets.QGridLayout(self.page_19) self.gridLayout_65.setObjectName("gridLayout_65") @@ -4263,195 +4344,43 @@ def setupUi(self, metaX_main): self.tab_9.setObjectName("tab_9") self.gridLayout_6 = QtWidgets.QGridLayout(self.tab_9) self.gridLayout_6.setObjectName("gridLayout_6") + self.gridLayout_network_group = QtWidgets.QGridLayout() + self.gridLayout_network_group.setObjectName("gridLayout_network_group") + self.gridLayout_6.addLayout(self.gridLayout_network_group, 2, 2, 1, 1) self.pushButton_tfnet_add_to_list = QtWidgets.QPushButton(self.tab_9) self.pushButton_tfnet_add_to_list.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_tfnet_add_to_list.sizePolicy().hasHeightForWidth()) self.pushButton_tfnet_add_to_list.setSizePolicy(sizePolicy) + self.pushButton_tfnet_add_to_list.setMaximumSize(QtCore.QSize(100, 16777215)) self.pushButton_tfnet_add_to_list.setObjectName("pushButton_tfnet_add_to_list") self.gridLayout_6.addWidget(self.pushButton_tfnet_add_to_list, 6, 2, 1, 1) - self.gridLayout_network_sample = QtWidgets.QGridLayout() - self.gridLayout_network_sample.setObjectName("gridLayout_network_sample") - self.gridLayout_6.addLayout(self.gridLayout_network_sample, 4, 1, 1, 2) - self.radioButton_network_bygroup = QtWidgets.QRadioButton(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.radioButton_network_bygroup.sizePolicy().hasHeightForWidth()) - self.radioButton_network_bygroup.setSizePolicy(sizePolicy) - self.radioButton_network_bygroup.setChecked(True) - self.radioButton_network_bygroup.setObjectName("radioButton_network_bygroup") - self.gridLayout_6.addWidget(self.radioButton_network_bygroup, 2, 0, 1, 1) - self.gridLayout_network_group = QtWidgets.QGridLayout() - self.gridLayout_network_group.setObjectName("gridLayout_network_group") - self.gridLayout_6.addLayout(self.gridLayout_network_group, 2, 2, 1, 1) - self.comboBox_tfnet_select_list = QtWidgets.QComboBox(self.tab_9) - self.comboBox_tfnet_select_list.setObjectName("comboBox_tfnet_select_list") - self.gridLayout_6.addWidget(self.comboBox_tfnet_select_list, 6, 1, 1, 1) - self.line_27 = QtWidgets.QFrame(self.tab_9) - self.line_27.setFrameShape(QtWidgets.QFrame.HLine) - self.line_27.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_27.setObjectName("line_27") - self.gridLayout_6.addWidget(self.line_27, 1, 0, 1, 3) - self.line_28 = QtWidgets.QFrame(self.tab_9) - self.line_28.setFrameShape(QtWidgets.QFrame.HLine) - self.line_28.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_28.setObjectName("line_28") - self.gridLayout_6.addWidget(self.line_28, 5, 0, 1, 3) - self.horizontalLayout_55 = QtWidgets.QHBoxLayout() - self.horizontalLayout_55.setObjectName("horizontalLayout_55") - self.checkBox_tfnetwork_in_condition = QtWidgets.QCheckBox(self.tab_9) - self.checkBox_tfnetwork_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) - self.checkBox_tfnetwork_in_condition.setObjectName("checkBox_tfnetwork_in_condition") - self.horizontalLayout_55.addWidget(self.checkBox_tfnetwork_in_condition) - self.comboBox_tfnetwork_condition_meta = QtWidgets.QComboBox(self.tab_9) - self.comboBox_tfnetwork_condition_meta.setEnabled(False) - self.comboBox_tfnetwork_condition_meta.setObjectName("comboBox_tfnetwork_condition_meta") - self.horizontalLayout_55.addWidget(self.comboBox_tfnetwork_condition_meta) - self.horizontalLayout_80 = QtWidgets.QHBoxLayout() - self.horizontalLayout_80.setObjectName("horizontalLayout_80") - self.comboBox_tfnetwork_condition_group = QtWidgets.QComboBox(self.tab_9) - self.comboBox_tfnetwork_condition_group.setEnabled(False) - self.comboBox_tfnetwork_condition_group.setObjectName("comboBox_tfnetwork_condition_group") - self.horizontalLayout_80.addWidget(self.comboBox_tfnetwork_condition_group) - self.horizontalLayout_55.addLayout(self.horizontalLayout_80) - self.gridLayout_6.addLayout(self.horizontalLayout_55, 2, 1, 1, 1) - self.horizontalLayout_58 = QtWidgets.QHBoxLayout() - self.horizontalLayout_58.setObjectName("horizontalLayout_58") - self.label_78 = QtWidgets.QLabel(self.tab_9) + self.radioButton_network_bysample = QtWidgets.QRadioButton(self.tab_9) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_78.sizePolicy().hasHeightForWidth()) - self.label_78.setSizePolicy(sizePolicy) - self.label_78.setObjectName("label_78") - self.horizontalLayout_58.addWidget(self.label_78) - self.spinBox_tfnet_top_num = QtWidgets.QSpinBox(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.spinBox_tfnet_top_num.sizePolicy().hasHeightForWidth()) - self.spinBox_tfnet_top_num.setSizePolicy(sizePolicy) - self.spinBox_tfnet_top_num.setMinimum(1) - self.spinBox_tfnet_top_num.setMaximum(99999) - self.spinBox_tfnet_top_num.setProperty("value", 10) - self.spinBox_tfnet_top_num.setObjectName("spinBox_tfnet_top_num") - self.horizontalLayout_58.addWidget(self.spinBox_tfnet_top_num) - self.label_79 = QtWidgets.QLabel(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_79.sizePolicy().hasHeightForWidth()) - self.label_79.setSizePolicy(sizePolicy) - self.label_79.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_79.setObjectName("label_79") - self.horizontalLayout_58.addWidget(self.label_79) - self.comboBox_tfnet_top_by = QtWidgets.QComboBox(self.tab_9) - self.comboBox_tfnet_top_by.setObjectName("comboBox_tfnet_top_by") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.comboBox_tfnet_top_by.addItem("") - self.horizontalLayout_58.addWidget(self.comboBox_tfnet_top_by) - self.checkBox_tfnet_top_filtered = QtWidgets.QCheckBox(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.checkBox_tfnet_top_filtered.sizePolicy().hasHeightForWidth()) - self.checkBox_tfnet_top_filtered.setSizePolicy(sizePolicy) - self.checkBox_tfnet_top_filtered.setObjectName("checkBox_tfnet_top_filtered") - self.horizontalLayout_58.addWidget(self.checkBox_tfnet_top_filtered) - self.gridLayout_6.addLayout(self.horizontalLayout_58, 7, 1, 1, 1) - self.horizontalLayout_9 = QtWidgets.QHBoxLayout() - self.horizontalLayout_9.setObjectName("horizontalLayout_9") - self.label_49 = QtWidgets.QLabel(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_49.sizePolicy().hasHeightForWidth()) - self.label_49.setSizePolicy(sizePolicy) - self.label_49.setObjectName("label_49") - self.horizontalLayout_9.addWidget(self.label_49) - self.comboBox_tfnet_table = QtWidgets.QComboBox(self.tab_9) - self.comboBox_tfnet_table.setEnabled(False) - self.comboBox_tfnet_table.setObjectName("comboBox_tfnet_table") - self.comboBox_tfnet_table.addItem("") - self.comboBox_tfnet_table.addItem("") - self.comboBox_tfnet_table.addItem("") - self.horizontalLayout_9.addWidget(self.comboBox_tfnet_table) - self.label_150 = QtWidgets.QLabel(self.tab_9) - self.label_150.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_150.setObjectName("label_150") - self.horizontalLayout_9.addWidget(self.label_150) - self.comboBox_network_meta = QtWidgets.QComboBox(self.tab_9) - self.comboBox_network_meta.setObjectName("comboBox_network_meta") - self.horizontalLayout_9.addWidget(self.comboBox_network_meta) - self.gridLayout_6.addLayout(self.horizontalLayout_9, 0, 0, 1, 3) - self.radioButton_network_bysample = QtWidgets.QRadioButton(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.radioButton_network_bysample.sizePolicy().hasHeightForWidth()) - self.radioButton_network_bysample.setSizePolicy(sizePolicy) - self.radioButton_network_bysample.setObjectName("radioButton_network_bysample") - self.gridLayout_6.addWidget(self.radioButton_network_bysample, 4, 0, 1, 1) - self.pushButton_tfnet_add_top = QtWidgets.QPushButton(self.tab_9) - self.pushButton_tfnet_add_top.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHeightForWidth(self.radioButton_network_bysample.sizePolicy().hasHeightForWidth()) + self.radioButton_network_bysample.setSizePolicy(sizePolicy) + self.radioButton_network_bysample.setObjectName("radioButton_network_bysample") + self.gridLayout_6.addWidget(self.radioButton_network_bysample, 4, 0, 1, 1) + self.pushButton_tfnet_add_top = QtWidgets.QPushButton(self.tab_9) + self.pushButton_tfnet_add_top.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_tfnet_add_top.sizePolicy().hasHeightForWidth()) self.pushButton_tfnet_add_top.setSizePolicy(sizePolicy) + self.pushButton_tfnet_add_top.setMaximumSize(QtCore.QSize(100, 16777215)) self.pushButton_tfnet_add_top.setObjectName("pushButton_tfnet_add_top") self.gridLayout_6.addWidget(self.pushButton_tfnet_add_top, 7, 2, 1, 1) - self.label_77 = QtWidgets.QLabel(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_77.sizePolicy().hasHeightForWidth()) - self.label_77.setSizePolicy(sizePolicy) - self.label_77.setObjectName("label_77") - self.gridLayout_6.addWidget(self.label_77, 6, 0, 1, 1) - self.verticalLayout_5 = QtWidgets.QVBoxLayout() - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.pushButton_tfnet_drop_item = QtWidgets.QPushButton(self.tab_9) - self.pushButton_tfnet_drop_item.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_tfnet_drop_item.sizePolicy().hasHeightForWidth()) - self.pushButton_tfnet_drop_item.setSizePolicy(sizePolicy) - self.pushButton_tfnet_drop_item.setObjectName("pushButton_tfnet_drop_item") - self.verticalLayout_5.addWidget(self.pushButton_tfnet_drop_item) - self.pushButton_tfnet_clean_list = QtWidgets.QPushButton(self.tab_9) - self.pushButton_tfnet_clean_list.setEnabled(False) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_tfnet_clean_list.sizePolicy().hasHeightForWidth()) - self.pushButton_tfnet_clean_list.setSizePolicy(sizePolicy) - self.pushButton_tfnet_clean_list.setObjectName("pushButton_tfnet_clean_list") - self.verticalLayout_5.addWidget(self.pushButton_tfnet_clean_list) - self.pushButton_tfnet_add_a_list = QtWidgets.QPushButton(self.tab_9) - self.pushButton_tfnet_add_a_list.setEnabled(False) - self.pushButton_tfnet_add_a_list.setObjectName("pushButton_tfnet_add_a_list") - self.verticalLayout_5.addWidget(self.pushButton_tfnet_add_a_list) - self.gridLayout_6.addLayout(self.verticalLayout_5, 8, 0, 1, 1) self.toolBox_7 = QtWidgets.QToolBox(self.tab_9) self.toolBox_7.setMinimumSize(QtCore.QSize(0, 150)) self.toolBox_7.setMaximumSize(QtCore.QSize(16777215, 210)) self.toolBox_7.setObjectName("toolBox_7") self.page_16 = QtWidgets.QWidget() - self.page_16.setGeometry(QtCore.QRect(0, 0, 857, 96)) + self.page_16.setGeometry(QtCore.QRect(0, 0, 888, 145)) self.page_16.setObjectName("page_16") self.gridLayout_63 = QtWidgets.QGridLayout(self.page_16) self.gridLayout_63.setObjectName("gridLayout_63") @@ -4468,7 +4397,7 @@ def setupUi(self, metaX_main): self.gridLayout_63.addWidget(self.pushButton_plot_network, 0, 0, 1, 1) self.toolBox_7.addItem(self.page_16, "") self.page_17 = QtWidgets.QWidget() - self.page_17.setGeometry(QtCore.QRect(0, 0, 383, 68)) + self.page_17.setGeometry(QtCore.QRect(0, 0, 888, 145)) self.page_17.setObjectName("page_17") self.gridLayout_64 = QtWidgets.QGridLayout(self.page_17) self.gridLayout_64.setObjectName("gridLayout_64") @@ -4556,15 +4485,175 @@ def setupUi(self, metaX_main): self.toolBox_7.addItem(self.page_17, "") self.gridLayout_6.addWidget(self.toolBox_7, 17, 0, 1, 3) self.listWidget_tfnet_focus_list = QtWidgets.QListWidget(self.tab_9) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.listWidget_tfnet_focus_list.sizePolicy().hasHeightForWidth()) self.listWidget_tfnet_focus_list.setSizePolicy(sizePolicy) self.listWidget_tfnet_focus_list.setObjectName("listWidget_tfnet_focus_list") self.gridLayout_6.addWidget(self.listWidget_tfnet_focus_list, 8, 1, 1, 2) + self.radioButton_network_bygroup = QtWidgets.QRadioButton(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.radioButton_network_bygroup.sizePolicy().hasHeightForWidth()) + self.radioButton_network_bygroup.setSizePolicy(sizePolicy) + self.radioButton_network_bygroup.setMaximumSize(QtCore.QSize(16777215, 50)) + self.radioButton_network_bygroup.setChecked(True) + self.radioButton_network_bygroup.setObjectName("radioButton_network_bygroup") + self.gridLayout_6.addWidget(self.radioButton_network_bygroup, 2, 0, 1, 1) + self.gridLayout_network_sample = QtWidgets.QGridLayout() + self.gridLayout_network_sample.setObjectName("gridLayout_network_sample") + self.gridLayout_6.addLayout(self.gridLayout_network_sample, 4, 1, 1, 2) + self.horizontalLayout_58 = QtWidgets.QHBoxLayout() + self.horizontalLayout_58.setObjectName("horizontalLayout_58") + self.label_78 = QtWidgets.QLabel(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_78.sizePolicy().hasHeightForWidth()) + self.label_78.setSizePolicy(sizePolicy) + self.label_78.setObjectName("label_78") + self.horizontalLayout_58.addWidget(self.label_78) + self.spinBox_tfnet_top_num = QtWidgets.QSpinBox(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.spinBox_tfnet_top_num.sizePolicy().hasHeightForWidth()) + self.spinBox_tfnet_top_num.setSizePolicy(sizePolicy) + self.spinBox_tfnet_top_num.setMinimum(1) + self.spinBox_tfnet_top_num.setMaximum(99999) + self.spinBox_tfnet_top_num.setProperty("value", 10) + self.spinBox_tfnet_top_num.setObjectName("spinBox_tfnet_top_num") + self.horizontalLayout_58.addWidget(self.spinBox_tfnet_top_num) + self.label_79 = QtWidgets.QLabel(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_79.sizePolicy().hasHeightForWidth()) + self.label_79.setSizePolicy(sizePolicy) + self.label_79.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_79.setObjectName("label_79") + self.horizontalLayout_58.addWidget(self.label_79) + self.comboBox_tfnet_top_by = QtWidgets.QComboBox(self.tab_9) + self.comboBox_tfnet_top_by.setObjectName("comboBox_tfnet_top_by") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.comboBox_tfnet_top_by.addItem("") + self.horizontalLayout_58.addWidget(self.comboBox_tfnet_top_by) + self.checkBox_tfnet_top_filtered = QtWidgets.QCheckBox(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkBox_tfnet_top_filtered.sizePolicy().hasHeightForWidth()) + self.checkBox_tfnet_top_filtered.setSizePolicy(sizePolicy) + self.checkBox_tfnet_top_filtered.setObjectName("checkBox_tfnet_top_filtered") + self.horizontalLayout_58.addWidget(self.checkBox_tfnet_top_filtered) + self.gridLayout_6.addLayout(self.horizontalLayout_58, 7, 1, 1, 1) + self.label_77 = QtWidgets.QLabel(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_77.sizePolicy().hasHeightForWidth()) + self.label_77.setSizePolicy(sizePolicy) + self.label_77.setObjectName("label_77") + self.gridLayout_6.addWidget(self.label_77, 6, 0, 1, 1) + self.line_28 = QtWidgets.QFrame(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.line_28.sizePolicy().hasHeightForWidth()) + self.line_28.setSizePolicy(sizePolicy) + self.line_28.setFrameShape(QtWidgets.QFrame.HLine) + self.line_28.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_28.setObjectName("line_28") + self.gridLayout_6.addWidget(self.line_28, 5, 0, 1, 3) + self.comboBox_tfnet_select_list = QtWidgets.QComboBox(self.tab_9) + self.comboBox_tfnet_select_list.setObjectName("comboBox_tfnet_select_list") + self.gridLayout_6.addWidget(self.comboBox_tfnet_select_list, 6, 1, 1, 1) + self.verticalLayout_5 = QtWidgets.QVBoxLayout() + self.verticalLayout_5.setObjectName("verticalLayout_5") + self.pushButton_tfnet_drop_item = QtWidgets.QPushButton(self.tab_9) + self.pushButton_tfnet_drop_item.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_tfnet_drop_item.sizePolicy().hasHeightForWidth()) + self.pushButton_tfnet_drop_item.setSizePolicy(sizePolicy) + self.pushButton_tfnet_drop_item.setObjectName("pushButton_tfnet_drop_item") + self.verticalLayout_5.addWidget(self.pushButton_tfnet_drop_item) + self.pushButton_tfnet_clean_list = QtWidgets.QPushButton(self.tab_9) + self.pushButton_tfnet_clean_list.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButton_tfnet_clean_list.sizePolicy().hasHeightForWidth()) + self.pushButton_tfnet_clean_list.setSizePolicy(sizePolicy) + self.pushButton_tfnet_clean_list.setObjectName("pushButton_tfnet_clean_list") + self.verticalLayout_5.addWidget(self.pushButton_tfnet_clean_list) + self.pushButton_tfnet_add_a_list = QtWidgets.QPushButton(self.tab_9) + self.pushButton_tfnet_add_a_list.setEnabled(False) + self.pushButton_tfnet_add_a_list.setObjectName("pushButton_tfnet_add_a_list") + self.verticalLayout_5.addWidget(self.pushButton_tfnet_add_a_list) + self.gridLayout_6.addLayout(self.verticalLayout_5, 8, 0, 1, 1) + self.horizontalLayout_55 = QtWidgets.QHBoxLayout() + self.horizontalLayout_55.setObjectName("horizontalLayout_55") + self.checkBox_tfnetwork_in_condition = QtWidgets.QCheckBox(self.tab_9) + self.checkBox_tfnetwork_in_condition.setLayoutDirection(QtCore.Qt.RightToLeft) + self.checkBox_tfnetwork_in_condition.setObjectName("checkBox_tfnetwork_in_condition") + self.horizontalLayout_55.addWidget(self.checkBox_tfnetwork_in_condition) + self.comboBox_tfnetwork_condition_meta = QtWidgets.QComboBox(self.tab_9) + self.comboBox_tfnetwork_condition_meta.setEnabled(False) + self.comboBox_tfnetwork_condition_meta.setObjectName("comboBox_tfnetwork_condition_meta") + self.horizontalLayout_55.addWidget(self.comboBox_tfnetwork_condition_meta) + self.horizontalLayout_80 = QtWidgets.QHBoxLayout() + self.horizontalLayout_80.setObjectName("horizontalLayout_80") + self.comboBox_tfnetwork_condition_group = QtWidgets.QComboBox(self.tab_9) + self.comboBox_tfnetwork_condition_group.setEnabled(False) + self.comboBox_tfnetwork_condition_group.setObjectName("comboBox_tfnetwork_condition_group") + self.horizontalLayout_80.addWidget(self.comboBox_tfnetwork_condition_group) + self.horizontalLayout_55.addLayout(self.horizontalLayout_80) + self.gridLayout_6.addLayout(self.horizontalLayout_55, 2, 1, 1, 1) + self.horizontalLayout_9 = QtWidgets.QHBoxLayout() + self.horizontalLayout_9.setObjectName("horizontalLayout_9") + self.label_49 = QtWidgets.QLabel(self.tab_9) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_49.sizePolicy().hasHeightForWidth()) + self.label_49.setSizePolicy(sizePolicy) + self.label_49.setObjectName("label_49") + self.horizontalLayout_9.addWidget(self.label_49) + self.comboBox_tfnet_table = QtWidgets.QComboBox(self.tab_9) + self.comboBox_tfnet_table.setEnabled(False) + self.comboBox_tfnet_table.setObjectName("comboBox_tfnet_table") + self.comboBox_tfnet_table.addItem("") + self.comboBox_tfnet_table.addItem("") + self.comboBox_tfnet_table.addItem("") + self.horizontalLayout_9.addWidget(self.comboBox_tfnet_table) + self.label_150 = QtWidgets.QLabel(self.tab_9) + self.label_150.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_150.setObjectName("label_150") + self.horizontalLayout_9.addWidget(self.label_150) + self.comboBox_network_meta = QtWidgets.QComboBox(self.tab_9) + self.comboBox_network_meta.setObjectName("comboBox_network_meta") + self.horizontalLayout_9.addWidget(self.comboBox_network_meta) + self.gridLayout_6.addLayout(self.horizontalLayout_9, 0, 0, 1, 3) + self.line_27 = QtWidgets.QFrame(self.tab_9) + self.line_27.setFrameShape(QtWidgets.QFrame.HLine) + self.line_27.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_27.setObjectName("line_27") + self.gridLayout_6.addWidget(self.line_27, 1, 0, 1, 3) self.tabWidget_2.addTab(self.tab_9, "") - self.gridLayout_19.addWidget(self.tabWidget_2, 0, 1, 1, 1) + self.gridLayout_19.addWidget(self.tabWidget_2, 0, 0, 1, 1) self.tabWidget_TaxaFuncAnalyzer.addTab(self.tab_others_stats, "") self.tab_table_review = QtWidgets.QWidget() self.tab_table_review.setObjectName("tab_table_review") @@ -4986,7 +5075,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, 941, 23)) + self.menuBar.setGeometry(QtCore.QRect(0, 0, 972, 21)) self.menuBar.setObjectName("menuBar") self.menuTools = QtWidgets.QMenu(self.menuBar) self.menuTools.setObjectName("menuTools") @@ -5046,19 +5135,19 @@ 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(0) + self.tabWidget_4.setCurrentIndex(1) self.toolBox_4.setCurrentIndex(1) self.toolBox.setCurrentIndex(1) - self.tabWidget_3.setCurrentIndex(4) - self.toolBox_3.setCurrentIndex(0) + self.tabWidget_3.setCurrentIndex(3) + self.toolBox_3.setCurrentIndex(1) self.toolBox_9.setCurrentIndex(0) self.tabWidget.setCurrentIndex(0) - self.toolBox_5.setCurrentIndex(0) + self.toolBox_5.setCurrentIndex(1) self.toolBox_6.setCurrentIndex(0) - self.tabWidget_2.setCurrentIndex(1) - self.toolBox_8.setCurrentIndex(1) + self.tabWidget_2.setCurrentIndex(0) + self.toolBox_8.setCurrentIndex(0) self.toolBox_7.setCurrentIndex(0) self.tabWidget_6.setCurrentIndex(1) self.toolBox_metalab_res_anno.setCurrentIndex(0) @@ -5271,6 +5360,7 @@ def retranslateUi(self, metaX_main): self.label_94.setText(_translate("metaX_main", "Width")) self.label_101.setText(_translate("metaX_main", "Height")) self.checkBox_corr_cluster.setText(_translate("metaX_main", "Cluster")) + self.label_192.setText(_translate("metaX_main", "Theme")) self.label_168.setText(_translate("metaX_main", "Correlation Heatmap")) self.label_167.setText(_translate("metaX_main", "Diversity")) self.checkBox_box_if_show_fliers.setText(_translate("metaX_main", "show Fliers")) @@ -5414,29 +5504,29 @@ def retranslateUi(self, metaX_main): self.checkBox_group_control_in_condition.setText(_translate("metaX_main", "In Condition")) self.pushButton_multi_deseq2.setText(_translate("metaX_main", "Run Deseq2")) 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.label_2.setText(_translate("metaX_main", "Group 1")) + self.label_3.setText(_translate("metaX_main", "Group 2")) + self.pushButton_deseq2.setText(_translate("metaX_main", "Run DESeq2")) 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.label_166.setText(_translate("metaX_main", "Groups")) 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.pushButton_deseq2.setText(_translate("metaX_main", "Run DESeq2")) - self.pushButton_deseq2_plot_vocano.setText(_translate("metaX_main", "Plot Volcano")) self.pushButton_deseq2_plot_sankey.setText(_translate("metaX_main", "Plot Sankey")) - self.toolBox_3.setItemText(self.toolBox_3.indexOf(self.page_8), _translate("metaX_main", "Plot")) self.label_64.setText(_translate("metaX_main", "Tables")) + self.pushButton_deseq2_plot_vocano.setText(_translate("metaX_main", "Plot Volcano")) + self.toolBox_3.setItemText(self.toolBox_3.indexOf(self.page_8), _translate("metaX_main", "Plot")) + 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.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_63.setText(_translate("metaX_main", "-")) - self.label_16.setText(_translate("metaX_main", "Width")) - self.label_17.setText(_translate("metaX_main", "Height")) self.label_156.setText(_translate("metaX_main", "Font Size")) + self.label_63.setText(_translate("metaX_main", "-")) self.toolBox_3.setItemText(self.toolBox_3.indexOf(self.page_9), _translate("metaX_main", "Plotting Parameter")) self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_19), _translate("metaX_main", "DESeq2")) self.label_55.setText(_translate("metaX_main", "Taxon")) @@ -5528,15 +5618,22 @@ def retranslateUi(self, metaX_main): self.pushButton_co_expr_plot.setText(_translate("metaX_main", "Plot Co-Expression Network")) self.pushButton_co_expr_heatmap_plot.setText(_translate("metaX_main", "Plot Co-Expression Heatmap")) self.toolBox_5.setItemText(self.toolBox_5.indexOf(self.page_12), _translate("metaX_main", "Plotting")) + self.label_190.setText(_translate("metaX_main", "Show All Labels")) + self.checkBox_corr_hetatmap_show_all_labels_x.setText(_translate("metaX_main", "X")) + self.checkBox_corr_hetatmap_show_all_labels_y.setText(_translate("metaX_main", "Y")) + self.checkBox_co_expr_rename_taxa.setText(_translate("metaX_main", "Rename Taxa")) self.label_66.setText(_translate("metaX_main", "Threshold for Plot")) + self.label_65.setText(_translate("metaX_main", "Method of Correlation")) self.comboBox_co_expr_corr_method.setItemText(0, _translate("metaX_main", "pearson")) self.comboBox_co_expr_corr_method.setItemText(1, _translate("metaX_main", "spearman")) - self.label_124.setText(_translate("metaX_main", "Width")) - self.label_125.setText(_translate("metaX_main", "Height")) - self.label_65.setText(_translate("metaX_main", "Method of Correlation")) - self.checkBox_co_expr_show_label.setText(_translate("metaX_main", "Show Labels")) - self.checkBox_co_expr_rename_taxa.setText(_translate("metaX_main", "Rename Taxa")) self.label_162.setText(_translate("metaX_main", "Font Size")) + self.checkBox_co_expr_show_label.setText(_translate("metaX_main", "Show Labels")) + self.label_191.setText(_translate("metaX_main", "Theme")) + self.label_125.setText(_translate("metaX_main", "Height")) + self.label_124.setText(_translate("metaX_main", "Width")) + self.label_189.setText(_translate("metaX_main", "Heatmap")) + self.label_187.setText(_translate("metaX_main", "General")) + self.label_188.setText(_translate("metaX_main", "Network")) self.checkBox_co_expr_plot_list_only.setText(_translate("metaX_main", "Plot List Only")) self.toolBox_5.setItemText(self.toolBox_5.indexOf(self.page_13), _translate("metaX_main", "Plotting Parameter")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("metaX_main", "Co-Expression")) @@ -5548,7 +5645,7 @@ def retranslateUi(self, metaX_main): self.label_145.setText(_translate("metaX_main", "Calculate Cluster")) self.label_165.setText(_translate("metaX_main", "Plot Specific Cluster")) self.toolBox_6.setItemText(self.toolBox_6.indexOf(self.page_14), _translate("metaX_main", "Plot")) - self.label_174.setText(_translate("metaX_main", "general")) + self.label_174.setText(_translate("metaX_main", "General")) self.label_175.setText(_translate("metaX_main", "Specific cluster")) self.checkBox_get_trends_cluster_intensity.setText(_translate("metaX_main", "Get Intnsity Results")) self.label_158.setText(_translate("metaX_main", "Font Size")) @@ -5605,7 +5702,7 @@ def retranslateUi(self, metaX_main): self.pushButton_others_show_linked_func.setText(_translate("metaX_main", "Show Linked Func Only")) self.pushButton_others_plot_heatmap.setText(_translate("metaX_main", "Plot Heatmap")) self.pushButton_others_plot_line.setText(_translate("metaX_main", "Plot Bar")) - self.pushButton_others_get_intensity_matrix.setText(_translate("metaX_main", "Get Intensity Matrix")) + self.pushButton_others_get_intensity_matrix.setText(_translate("metaX_main", "Get Intensity Table")) self.toolBox_8.setItemText(self.toolBox_8.indexOf(self.page_18), _translate("metaX_main", "Plot")) self.label_176.setText(_translate("metaX_main", "General")) self.label_61.setText(_translate("metaX_main", "Theme")) @@ -5651,8 +5748,20 @@ def retranslateUi(self, metaX_main): self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_8), _translate("metaX_main", "Taxa-Func Link")) self.pushButton_tfnet_add_to_list.setToolTip(_translate("metaX_main", "Add selected item to the drawing box")) self.pushButton_tfnet_add_to_list.setText(_translate("metaX_main", "Add to Focus List")) + self.radioButton_network_bysample.setText(_translate("metaX_main", "Sample")) + self.pushButton_tfnet_add_top.setToolTip(_translate("metaX_main", "Add conditionally filtered items to the drawing box")) + self.pushButton_tfnet_add_top.setText(_translate("metaX_main", "Add Top to List")) + self.pushButton_plot_network.setText(_translate("metaX_main", "Plot Ntework")) + self.toolBox_7.setItemText(self.toolBox_7.indexOf(self.page_16), _translate("metaX_main", "Plot")) + self.label_50.setText(_translate("metaX_main", "Width")) + self.label_51.setText(_translate("metaX_main", "Height")) + self.checkBox_tf_link_net_plot_list_only.setText(_translate("metaX_main", "Plot List Only")) + self.checkBox_tf_link_net_plot_list_only_no_link.setText(_translate("metaX_main", "Without Links")) + self.checkBox_tf_link_net_show_label.setText(_translate("metaX_main", "Show Labels")) + self.checkBox_tf_link_net_rename_taxa.setText(_translate("metaX_main", "Raname Taxa")) + self.label_163.setText(_translate("metaX_main", "Font Size")) + self.toolBox_7.setItemText(self.toolBox_7.indexOf(self.page_17), _translate("metaX_main", "Plotting Parameter")) self.radioButton_network_bygroup.setText(_translate("metaX_main", "Group")) - self.checkBox_tfnetwork_in_condition.setText(_translate("metaX_main", "In Condition")) self.label_78.setText(_translate("metaX_main", "Select Top")) self.label_79.setText(_translate("metaX_main", "Sort by")) self.comboBox_tfnet_top_by.setItemText(0, _translate("metaX_main", "Total Intensity")) @@ -5667,29 +5776,17 @@ def retranslateUi(self, metaX_main): self.comboBox_tfnet_top_by.setItemText(9, _translate("metaX_main", "Deseq2-up(log2FC)")) self.comboBox_tfnet_top_by.setItemText(10, _translate("metaX_main", "Deseq2-down(log2FC)")) self.checkBox_tfnet_top_filtered.setText(_translate("metaX_main", "Filter with threshold")) - self.label_49.setText(_translate("metaX_main", "Table")) - self.comboBox_tfnet_table.setItemText(0, _translate("metaX_main", "Taxa")) - self.comboBox_tfnet_table.setItemText(1, _translate("metaX_main", "Functions")) - self.comboBox_tfnet_table.setItemText(2, _translate("metaX_main", "Taxa-Functions")) - self.label_150.setText(_translate("metaX_main", "Meta")) - self.radioButton_network_bysample.setText(_translate("metaX_main", "Sample")) - self.pushButton_tfnet_add_top.setToolTip(_translate("metaX_main", "Add conditionally filtered items to the drawing box")) - self.pushButton_tfnet_add_top.setText(_translate("metaX_main", "Add Top to List")) self.label_77.setText(_translate("metaX_main", "Focus List")) self.pushButton_tfnet_drop_item.setText(_translate("metaX_main", "Drop Item")) self.pushButton_tfnet_clean_list.setText(_translate("metaX_main", "Clean List")) self.pushButton_tfnet_add_a_list.setToolTip(_translate("metaX_main", "Add a list to the drawing box, make sure there is one item per line.")) self.pushButton_tfnet_add_a_list.setText(_translate("metaX_main", "Add a list")) - self.pushButton_plot_network.setText(_translate("metaX_main", "Plot Ntework")) - self.toolBox_7.setItemText(self.toolBox_7.indexOf(self.page_16), _translate("metaX_main", "Plot")) - self.label_50.setText(_translate("metaX_main", "Width")) - self.label_51.setText(_translate("metaX_main", "Height")) - self.checkBox_tf_link_net_plot_list_only.setText(_translate("metaX_main", "Plot List Only")) - self.checkBox_tf_link_net_plot_list_only_no_link.setText(_translate("metaX_main", "Without Links")) - self.checkBox_tf_link_net_show_label.setText(_translate("metaX_main", "Show Labels")) - self.checkBox_tf_link_net_rename_taxa.setText(_translate("metaX_main", "Raname Taxa")) - self.label_163.setText(_translate("metaX_main", "Font Size")) - self.toolBox_7.setItemText(self.toolBox_7.indexOf(self.page_17), _translate("metaX_main", "Plotting Parameter")) + self.checkBox_tfnetwork_in_condition.setText(_translate("metaX_main", "In Condition")) + self.label_49.setText(_translate("metaX_main", "Table")) + self.comboBox_tfnet_table.setItemText(0, _translate("metaX_main", "Taxa")) + self.comboBox_tfnet_table.setItemText(1, _translate("metaX_main", "Functions")) + self.comboBox_tfnet_table.setItemText(2, _translate("metaX_main", "Taxa-Functions")) + self.label_150.setText(_translate("metaX_main", "Meta")) self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_9), _translate("metaX_main", "Taxa-Func Network")) self.tabWidget_TaxaFuncAnalyzer.setTabText(self.tabWidget_TaxaFuncAnalyzer.indexOf(self.tab_others_stats), _translate("metaX_main", "Taxa-Func Link")) self.pushButton_view_table.setText(_translate("metaX_main", "View Table")) diff --git a/metax/taxafunc_analyzer/analyzer.py b/metax/taxafunc_analyzer/analyzer.py index 146668e..f0b8f1a 100644 --- a/metax/taxafunc_analyzer/analyzer.py +++ b/metax/taxafunc_analyzer/analyzer.py @@ -409,7 +409,28 @@ def replace_if_two_index(self, df): df = df.drop(df.columns[:2], axis=1) return df - def add_group_name_for_sample(self, df: pd.DataFrame) -> tuple: + def add_group_name_for_sample(self, df: pd.DataFrame) -> tuple[pd.DataFrame, list[str]]: + ''' + Adds group names to sample names in the given DataFrame. + + Parameters: + df (pd.DataFrame): The DataFrame containing the samples. + + Returns: + tuple[pd.DataFrame, list[str]]: A tuple containing the modified DataFrame with updated sample names and a list of group names. + + Example: + >>> df = pd.DataFrame({'Sample1': [1, 2, 3], 'Sample2': [4, 5, 6]}) + >>> analyzer = Analyzer() + >>> modified_df, group_names = analyzer.add_group_name_for_sample(df) + >>> modified_df + Sample1 (Group1) Sample2 (Group2) + 0 1 4 + 1 2 5 + 2 3 6 + >>> group_names + ['Group1', 'Group2'] + ''' sample_list = df.columns.tolist() new_sample_list = [] @@ -766,6 +787,11 @@ def get_df(self, table_name:str = 'taxa'): "taxa_func": "taxa_func_df", "func_taxa": "func_taxa_df", "custom": "custom_df", + "functions": "func_df", + "taxa-functions": "taxa_func_df", + "peptides": "peptide_df", + "proteins": "protein_df", + } dft = getattr(self, name_dict[table_name]) # remove peptide_num column if exists diff --git a/metax/taxafunc_analyzer/analyzer_utils/basic_stats.py b/metax/taxafunc_analyzer/analyzer_utils/basic_stats.py index 3a6cd1f..a88243b 100644 --- a/metax/taxafunc_analyzer/analyzer_utils/basic_stats.py +++ b/metax/taxafunc_analyzer/analyzer_utils/basic_stats.py @@ -107,4 +107,75 @@ def get_stats_func_prop(self, func_name:str) -> pd.DataFrame: df_prop['freq'] = (df_prop['n']/df_prop['n'].sum()*100).round(2) df_prop['label'] = df_prop['prop'] + \ ' (' + df_prop['freq'].astype(str) + '%)' - return df_prop \ No newline at end of file + return df_prop + + + def get_correlation(self, df_type: str, + sample_list: list[str]|None = None, + focus_list: list[str]|None = None, + plot_list_only: bool = False, + rename_taxa: bool = False, + method='pearson') -> pd.DataFrame: + ''' + Get correlation between items in a dataframe. + `df_type`: str: 'taxa', 'func', 'taxa_func', 'func_taxa', 'custom' + `sample_list`: a list of samples to calculate correlation + `plot_list_only`: bool: if True, only return the list of samples that can be plotted + `method`: str: 'pearson', 'spearman' + ''' + df = self.tfa.get_df(df_type) + df = self.tfa.replace_if_two_index(df) + if sample_list: + df = df[sample_list] + if plot_list_only: + # extrat the row that index is in the focus_list + if focus_list and len(focus_list) > 0: + df = df.loc[focus_list] + if rename_taxa: + df = self.tfa.rename_taxa(df) + + corr = df.T.corr(method=method) + return corr + + def get_combined_sub_meta_df( + self, + df: pd.DataFrame, + sub_meta: str, + rename_sample: bool = False, + plot_mean: bool = False, + ) -> tuple[pd.DataFrame, list[str]]: + """ + Combines the sub-meta information with the main meta information in the given DataFrame and returns the combined DataFrame and a list of sub-meta groups. + + Args: + df (pd.DataFrame): The DataFrame containing the main meta information. + sub_meta (str): The sub-meta information to be combined with the main meta information. + rename_sample (bool, optional): Whether to rename the samples in the DataFrame. Defaults to False. + plot_mean (bool, optional): Whether to plot the mean values. Defaults to False. + + Returns: + tuple[pd.DataFrame, list[str]]: A tuple containing the combined DataFrame and a list of sub-meta groups. + """ + if sub_meta != 'None': + + sample_groups = {sample: self.tfa.get_group_of_a_sample(sample, self.tfa.meta_name) for sample in df.columns} + sub_groups = {sample: self.tfa.get_group_of_a_sample(sample, sub_meta) for sample in df.columns} + + # Combine samples with the same meta and sub-meta, and calculate the mean value + grouped_data = df.T.groupby([sample_groups, sub_groups]).mean().T + + # group_list is the sub-meta group + group_list = [i[1] for i in grouped_data.columns] if not plot_mean else grouped_data.columns.tolist() + + # Convert multi-index to single index + grouped_data.columns = ['_'.join(col).strip() for col in grouped_data.columns.values] + + df = grouped_data + + else: + if rename_sample: + df, group_list = self.tfa.add_group_name_for_sample(df) + else: + group_list = [self.tfa.get_group_of_a_sample(i) for i in df.columns] if not plot_mean else df.columns.tolist() + + return df, group_list \ No newline at end of file diff --git a/metax/taxafunc_ploter/basic_plot.py b/metax/taxafunc_ploter/basic_plot.py index 4b5ea17..4f597d4 100644 --- a/metax/taxafunc_ploter/basic_plot.py +++ b/metax/taxafunc_ploter/basic_plot.py @@ -359,6 +359,7 @@ def plot_corr_sns( font_size=10, show_all_labels=(False, False), theme: str = None, + cmap: str = "Auto", rename_sample: bool = False, linkage_method: str = "average", distance_metric: str = "euclidean", @@ -369,6 +370,10 @@ def plot_corr_sns( else: group_list = [self.tfa.get_group_of_a_sample(i) for i in dft.columns] + if cmap == 'Auto': + cmap = 'RdYlBu_r' + else: + cmap = cmap color_list = self.assign_colors(group_list) corr = dft.corr() @@ -379,7 +384,7 @@ def plot_corr_sns( plt.style.use(theme) else: sns.set_theme(style="ticks") - sns_params = {"linewidths":.01, "cmap":'coolwarm', "cbar_kws":{ "shrink": 0.5}, + sns_params = {"linewidths":.01, "cmap":cmap, "cbar_kws":{ "shrink": 0.5}, 'col_cluster':True if cluster else False, 'row_cluster':True if cluster else False, 'method':linkage_method, @@ -579,37 +584,53 @@ def create_df_plot_group(df, sub_meta): + def plot_items_corr_heatmap( + self, + df, + title_name="Table", + cluster=False, + cmap = 'RdYlBu_r', + width=10, + height=8, + font_size=10, + show_all_labels=(False, False), + linkage_method: str = "average", + distance_metric: str = "euclidean", + ): + corr = df.copy() + # mask = np.triu(np.ones_like(corr, dtype=bool)) - #! Deprecated function, use plot_taxa_stats_pie chart instead - # def plot_taxa_stats_bar(self, theme:str = 'Auto', res_type = 'pic', font_size = 12): - # df = self.tfa.BasicStats.get_stats_peptide_num_in_taxa() - # # if 'not_found' is 0, then remove it - # if df[df['LCA_level'] == 'notFound']['count'].values[0] == 0: - # df = df[df['LCA_level'] != 'notFound'] - - # if theme is not None and theme != 'Auto': - # plt.style.use(theme) - # else: - # custom_params = {"axes.spines.right": False, "axes.spines.top": False} - - # # plt.figure(figsize=(8, 6)) - # sns.set_theme(style="ticks", rc=custom_params) + try: + if cmap == 'Auto': + cmap = 'RdYlBu_r' + else: + cmap = cmap + + sns_params = {"linewidths":.01, "cmap":cmap, "cbar_kws":{ "shrink": 0.5}, + 'col_cluster':True if cluster else False, + 'row_cluster':True if cluster else False, + 'method':linkage_method, + 'metric':distance_metric, + "linecolor":(0/255, 0/255, 0/255, 0.01), "dendrogram_ratio":(.1, .2), + "figsize":(width, height), "xticklabels":True if show_all_labels[0] else "auto", + "yticklabels":True if show_all_labels[1] else 'auto'} + fig = sns.clustermap(corr, **sns_params) - # plt.figure(figsize=(8, 6)) if res_type == 'show' else plt.figure() + fig.ax_col_dendrogram.set_title(f'Correlation of {title_name}', fontsize=font_size+2, fontweight='bold') + ax = fig.ax_heatmap + ax.set_xticklabels(ax.get_xticklabels(), fontsize=font_size, rotation=90) + ax.set_yticklabels(ax.get_yticklabels(), fontsize=font_size, rotation=0) - # ax = sns.barplot(data=df, x='LCA_level', y='count', hue='label',dodge=False) - # for i in ax.containers: - # ax.bar_label(i, fontsize=font_size) - # ax.set_title('Number of identified peptides in different taxa level', fontsize=font_size+2, fontweight='bold') - # ax.set_xlabel('Taxa level') - # ax.set_ylabel('Number of peptides') - # ax.set_xticklabels(ax.get_xticklabels(), fontsize=font_size) - # ax.set_yticklabels(ax.get_yticklabels(), fontsize=font_size) - # ax.legend(title='Taxa level (frequency)', ncol=2) - # if res_type == 'show': - # plt.tight_layout() - # plt.show() - # else: - # plt.close() - # return ax # use "pic = BasicPlot(self.tfa).plot_taxa_stats().get_figure()" to get the figure object in GUI script + 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') + plt.subplots_adjust(left=0.03, bottom=0.095, right=0.5, top=0.96, wspace=0.01, hspace=0.01) + plt.tight_layout() + plt.show() + # plt.close() + return ax + except Exception as e: + plt.close('all') + raise e diff --git a/metax/taxafunc_ploter/heatmap_plot.py b/metax/taxafunc_ploter/heatmap_plot.py index cb47ebf..303d3b1 100644 --- a/metax/taxafunc_ploter/heatmap_plot.py +++ b/metax/taxafunc_ploter/heatmap_plot.py @@ -293,6 +293,9 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, show_all_labels:tuple = (False, False), rename_sample:bool = True, plot_mean:bool = False, sub_meta: str = "None" ): + ''' + sub_meta is higher plot_mean, if sub_meta provided, plot_mean is False + ''' if plot_mean and sub_meta == 'None': # if sub_meta is not None, plot_mean is False df = self.tfa.BasicStats.get_stats_mean_df_by_group(df) @@ -311,8 +314,6 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, scale = scale_map.get(scale) mat = df.copy() - meta_df = self.tfa.meta_df - meta_name = self.tfa.meta_name # if index is Taxon, rename index if rename_taxa: @@ -323,31 +324,7 @@ def plot_basic_heatmap(self, df, title = 'Heatmap',fig_size:tuple|None = None, if fig_size is None: fig_size = (30,30) - if sub_meta != 'None': - # group_list = ( - # [self.tfa.get_group_of_a_sample(i, sub_meta) for i in mat.columns] - # if not plot_mean - # else mat.columns.tolist() - # ) - sample_groups = {sample: self.tfa.get_group_of_a_sample(sample, self.tfa.meta_name) for sample in mat.columns} - sub_groups = {sample: self.tfa.get_group_of_a_sample(sample, sub_meta) for sample in mat.columns} - - # 合并同一meta和submeta的样本,计算平均值 - grouped_data = mat.T.groupby([sample_groups, sub_groups]).mean().T - - # group_list is the sub_meta group - group_list = [i[1] for i in grouped_data.columns] if not plot_mean else grouped_data.columns.tolist() - - # convert multi-index to single index - grouped_data.columns = ['_'.join(col).strip() for col in grouped_data.columns.values] - - mat = grouped_data - - else: - if rename_sample: - mat, group_list = self.tfa.add_group_name_for_sample(mat) - else: - group_list = [self.tfa.get_group_of_a_sample(i) for i in mat.columns] if not plot_mean else mat.columns.tolist() + mat, group_list = self.tfa.BasicStats.get_combined_sub_meta_df(df=mat, sub_meta=sub_meta, rename_sample=rename_sample, plot_mean=plot_mean) color_list = self.assign_colors(group_list) diff --git a/metax/taxafunc_ploter/network_plot.py b/metax/taxafunc_ploter/network_plot.py index a93c0d4..d0ccce1 100644 --- a/metax/taxafunc_ploter/network_plot.py +++ b/metax/taxafunc_ploter/network_plot.py @@ -149,13 +149,12 @@ def create_nodes_links( df = df.loc[df['taxa'].isin(focus_list) | df['function'].isin(focus_list)] print(f"New df shape: {df.shape}") - # taxa_sum = df.groupby('taxa')['sum'].sum().to_dict() taxa_sum = df[df['taxa'] != ""].groupby('taxa')['sum'].sum().to_dict() - # function_sum = df.groupby('function')['sum'].sum().to_dict() function_sum = df[df['function'] != ""].groupby('function')['sum'].sum().to_dict() - - min_value = min(min(taxa_sum.values()), min(function_sum.values())) - max_value = max(max(taxa_sum.values()), max(function_sum.values())) + + sum_dict = {**taxa_sum, **function_sum} + min_value = min(sum_dict.values()) + max_value = max(sum_dict.values()) def normalize(value): if max_value == min_value: @@ -232,7 +231,7 @@ def plot_tflink_network( """ # preprocess focus_list - if focus_list is not None and focus_list: + if focus_list: new_list = [] for i in focus_list: if i in self.tfa.taxa_df.index.tolist(): @@ -322,12 +321,12 @@ def plot_tflink_network( def plot_co_expression_network(self, df_type:str= 'taxa', corr_method:str = 'pearson', - corr_threshold:float=0.5, sample_list:list = None, - width:int = 12, height:int = 8, focus_list:list = [], plot_list_only:bool = False, + corr_threshold:float=0.5, sample_list:list[str]|None = None, + width:int = 12, height:int = 8, focus_list:list[str] = [], plot_list_only:bool = False, ): from matplotlib import colormaps #check sample_list length - if len(sample_list) < 2: + if sample_list and len(sample_list) < 2: raise ValueError(f"sample_list should have at least 2 samples, but got {len(sample_list)}") df_dict = {'taxa': self.tfa.taxa_df, diff --git a/metax/taxafunc_ploter/sankey_plot.py b/metax/taxafunc_ploter/sankey_plot.py index 4a9355e..96143bb 100644 --- a/metax/taxafunc_ploter/sankey_plot.py +++ b/metax/taxafunc_ploter/sankey_plot.py @@ -20,6 +20,46 @@ def __init__(self, taxa_func_analyzer, theme='white'): self.font_size = 12 self.show_legend = True self.theme = theme + + def convert_df_by_group_for_sankey(self,df, sub_meta, plot_mean) -> dict: + sample_list = df.columns.tolist() + + if plot_mean or sub_meta != 'None': + if plot_mean and sub_meta == 'None': # if sub_meta is not None, plot_mean is False + df = self.tfa.BasicStats.get_stats_mean_df_by_group(df) + elif sub_meta != 'None': + df, _ = self.tfa.BasicStats.get_combined_sub_meta_df(df=df, sub_meta=sub_meta, plot_mean=plot_mean) + group_dict = {col: col for col in df.columns} + + else: + # group_dict = group is key, samples in a list is value + group_dict = {} + for sample in sample_list: + group = self.tfa.get_group_of_a_sample(sample, self.tfa.meta_name) + if group not in group_dict: + group_dict[group] = [sample] + else: + group_dict[group].append(sample) + + df_dict = {} + # add all samples to the dict + df['sum'] = df.sum(axis=1) + df_dict['All'] = self.df_to_sankey_df(df, value_col='sum') + # add samples for each group to the dict + for group, samples in group_dict.items(): + df_temp = df.loc[:, samples] + # convert to dataframe if it is a series, when there is only one sample, it will be a series + if isinstance(df_temp, pd.Series): + df_temp = pd.DataFrame(df_temp) + + df_temp['sum'] = df_temp.sum(axis=1) + # remove values that are 0 + 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 convert_logfc_df_for_sankey(self, df, pvalue: float = 0.05,p_type ='padj', log2fc_min: float = 1,log2fc_max:float = 10) -> dict: @@ -78,6 +118,9 @@ def convert_logfc_df_for_sankey(self, df, pvalue: float = 0.05,p_type ='padj', df_t['value'] = abs(df_t['value']) df_out_dict[key] = [df_t, len(df_t)] # df_out_dict[key] = df_t + # remove normal if other not all empty, + if len(df_out_dict) > 1: + df_out_dict.pop('normal', None) return df_out_dict def df_to_sankey_df(self, df, value_col='value'): @@ -166,7 +209,7 @@ def __plot_sankey(self,link_nodes_dict, width, height, title, subtitle=''): links = value[1] num = value[2] pic.add( - f'{key} (Total items: {num})', + f'{key} ({num})', nodes=nodes, links=links, node_align='left', @@ -179,7 +222,9 @@ def __plot_sankey(self,link_nodes_dict, width, height, title, subtitle=''): pic.set_global_opts( - legend_opts=opts.LegendOpts(selected_mode='single', is_show=self.show_legend), + 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", @@ -228,19 +273,18 @@ def plot_fc_sankey(self, fc_df, width=12, height=8, pvalue=0.05, p_type='padj', link_nodes_dict[key] = [nodes, links, value[1]] pic = self.__plot_sankey(link_nodes_dict, width=width, height=height, title=title) return pic - - - def plot_intensity_sankey(self, df,width=12, height=8, title='Sankey Plot', subtitle='', font_size=12, show_legend=True): + + def plot_intensity_sankey(self,df, width=12, height=8, title="Sankey Plot", subtitle="", + font_size=12, show_legend=True, sub_meta='None', plot_mean=False): df = df.copy() - df['sum'] = df.sum(axis=1) self.font_size = font_size self.show_legend=show_legend - df_sankey = self.df_to_sankey_df(df, value_col='sum') - nodes, links = self.create_nodes_links(df_sankey) - # only state the number of last nodes - link_nodes_dict = {'Intensity Sum': [nodes, links, len(df.index)]} - - pic = self.__plot_sankey(link_nodes_dict, width=width, height=height, title=title, subtitle= subtitle) - return pic - \ No newline at end of file + df_sankey = self.convert_df_by_group_for_sankey(df, sub_meta, 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 \ No newline at end of file diff --git a/metax/utils/version.py b/metax/utils/version.py index eeb9ab9..f83ca68 100644 --- a/metax/utils/version.py +++ b/metax/utils/version.py @@ -1,2 +1,2 @@ -__version__ = '1.109.0' +__version__ = '1.109.1' API_version = '2' \ No newline at end of file