diff --git a/Docs/ChangeLog.md b/Docs/ChangeLog.md index cc089fc..1739fa1 100644 --- a/Docs/ChangeLog.md +++ b/Docs/ChangeLog.md @@ -1,3 +1,9 @@ +# Version: 1.114.4 +## Date: 2024-09-23 +### Changes: +- Fix: Fixed the bug of create taxa table and function table from the OTF only,the option didn't work correctly. +- Change: Changed the message of the result of creating Taxon-Function Table. + # Version: 1.114.3 ## Date: 2024-09-22 ### Changes: diff --git a/metax/gui/main_gui.py b/metax/gui/main_gui.py index 1eee15f..a452c65 100644 --- a/metax/gui/main_gui.py +++ b/metax/gui/main_gui.py @@ -1852,46 +1852,102 @@ def run_after_set_multi_tables(self): # Final message - outlier_detect_method = self.comboBox_outlier_detection.currentText() - - if outlier_detect_method != 'None': - nan_stats_str = '\n\nLeft row after data preprocessing:\n' - for i, j in self.tfa.outlier_status.items(): - if i not in ['peptide', 'custom']: - continue - if j: - nan_stats_str += f'{i}: [{j}]\n' - # print(nan_stats_str) - else: - nan_stats_str = '' - if self.tfa.any_df_mode: num_item = self.tfa.custom_df.shape[0] - msg = f'Custom data is ready! \ - \n{nan_stats_str}\ - \n\nNumber of item: [{num_item}]' + msg = f""" +
+Custom data is ready!
+{nan_stats_str}
+Number of items: [{num_item}]
+ + + """ else: - msg = f'Operational Taxa-Functions (OTF) data is ready! \ - \n{nan_stats_str}\ - \n\nFunction: [{self.tfa.func_name}]\ - \nNumber of peptide: [{num_peptide} ({num_peptide/self.tfa.original_df.shape[0]*100:.2f}% of all peptides)]\ - \nNumber of function: [{num_func}]\ - \nNumber of taxa: [{num_taxa}]\ - \nNumber of taxa-function: [{num_taxa_func}]\ - \nNumber of protein: [{num_protein}]' - - print(f'\n----Multi Table Result----\n{msg}\n---------------------------\n') - self.logger.write_log(msg.replace('\n', '')) - QMessageBox.information(self.MainWindow, 'Information', msg ) - - print("\n---------------------------------- Set Multi Table End ----------------------------------\n") - # go to basic analysis tab and the first tab - self.stackedWidget.setCurrentIndex(0) # go to page_analyzer - self.tabWidget_TaxaFuncAnalyzer.setCurrentIndex(3) - self.tabWidget_4.setCurrentIndex(0) - self.pushButton_set_multi_table.setEnabled(True) - - + original_num_peptide = self.tfa.original_df.shape[0] + + msg = f""" + + + + +Taxa Level: {self.tfa.taxa_level}
+Function Category: {self.tfa.func_name}
+Category | +Number | +Used Peptides | +% of All Peptides | +
---|---|---|---|
Taxa | +{num_taxa} | +{self.tfa.peptide_num_used["taxa"]} | +{self.tfa.peptide_num_used["taxa"] / original_num_peptide * 100:.2f}% | +
Functions | +{num_func} | +{self.tfa.peptide_num_used["func"]} | +{self.tfa.peptide_num_used["func"] / original_num_peptide * 100:.2f}% | +
OTFs | +{num_taxa_func} | +{self.tfa.peptide_num_used["taxa_func"]} | +{self.tfa.peptide_num_used["taxa_func"] / original_num_peptide * 100:.2f}% | +
Clean Peptides | +{num_peptide} | +- | +{num_peptide / original_num_peptide * 100:.2f}% | +
Proteins | +{num_protein} | +{self.tfa.peptide_num_used["protein"]} | +{self.tfa.peptide_num_used["protein"] / original_num_peptide * 100:.2f}% | +