Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
byemaxx committed Oct 17, 2024
2 parents 01dfd0e + 7343ea1 commit e9432ef
Show file tree
Hide file tree
Showing 13 changed files with 436 additions and 186 deletions.
17 changes: 16 additions & 1 deletion Docs/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# Version: 1.115.4
## Date: 2024-10-07
### Changes:
- Fix: Fixed the bug of when use Anydata moed, the report will raise error.
- Change: changed the approche of filter the minimum number of peptides threshold for the protein.(Avaliable for Razor and Anti-Razor method)

# Version: 1.115.3
## Date: 2024-10-04
### Changes:
- Fix: Fixed the filter of pvalue or padj option not work for functional redundancy analysis in T-Test part.

# Version: 1.115.2
## Date: 2024-10-04
### Changes:
- New: added a new Normalization method: "Trace Shifting" for the data preprossing.

# Version: 1.115.1
## Date: 2024-10-03
### Changes:
- New: added multiprocessing option for LFQ.


# Version: 1.115.0
## Date: 2024-10-02
### Changes:
Expand Down
4 changes: 4 additions & 0 deletions Docs/MetaX_Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ There are several methods for detecting and handling outliers.

- **Data Normalization:**

- **Trace Shifting:** Reframing the Normalization Problem with Intensity traces (inspired by DirectLFQ).
- Note: If <u>both</u> trace shifting and transformation are applied, *<u>normalization will be done before transformation.</u>*

- Standard Scaling (Z-Score), Min-Max Scaling, Pareto Scaling, Mean centring and Normalization by sum.


<u>If you use [Z-Score, Mean centring and Pareto Scaling] data normalization, the data will be given a minimum offset again to avoid negative values.</u>

Expand Down
17 changes: 11 additions & 6 deletions metax/gui/main_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,10 +993,14 @@ def update_method_of_protein_inference(self):
self.checkBox_infrence_protein_by_sample.setChecked(True)
self.checkBox_infrence_protein_by_sample.setEnabled(False)
self.comboBox_protein_ranking_method.setEnabled(False)
# enable the peptide_num_threshold
self.spinBox_peptide_num_threshold_protein.setEnabled(True)
else: # method is ["rank"]
self.checkBox_infrence_protein_by_sample.setEnabled(True)
self.comboBox_protein_ranking_method.setEnabled(True)
self.checkBox_infrence_protein_by_sample.setChecked(False)
# disable the peptide_num_threshold
self.spinBox_peptide_num_threshold_protein.setEnabled(False)



Expand Down Expand Up @@ -1853,12 +1857,11 @@ def run_after_set_multi_tables(self):

# Final message
if self.tfa.any_df_mode:
num_item = self.tfa.custom_df.shape[0]
original_num_peptide = self.tfa.custom_df.shape[0]
msg = f"""<html>
<body>
<p>Custom data is ready!</p>
<p>{nan_stats_str}</p>
<p>Number of items: [{num_item}]</p>
<p>Number of items: [{original_num_peptide}]</p>
</body>
</html>
"""
Expand Down Expand Up @@ -1890,7 +1893,7 @@ def run_after_set_multi_tables(self):
<table>
<tr>
<th>Category</th>
<th>Number</th>
<th>Number (After Filtering)</th>
<th>Used Peptides</th>
<th>% of All Peptides</th>
</tr>
Expand Down Expand Up @@ -2619,6 +2622,7 @@ def set_multi_table(self, restore_taxafunc=False, saved_obj=None):
}
normalize_dict = {
"None": None,
"Trace Shifting": "trace_shift",
"Mean centering": "mean",
"Standard Scaling (Z-Score)": "zscore",
"Min-Max Scaling": "minmax",
Expand Down Expand Up @@ -4880,12 +4884,13 @@ def t_test(self):
try:
self.pushButton_ttest.setEnabled(False)
group_list = [group1, group2]
table_names = []
table_names = [] # reset table_names as empty list
if df_type == 'Significant Taxa-Func'.lower():
p_value = self.doubleSpinBox_top_heatmap_pvalue.value()
p_value = round(p_value, 4)
p_type = self.comboBox_top_heatmap_p_type.currentText()

ttest_sig_tf_params = {'group_list': group_list, 'p_value': p_value, 'condition': condition}
ttest_sig_tf_params = {'group_list': group_list, 'p_value': p_value, 'condition': condition, "p_type": p_type}
self.run_in_new_window(self.tfa.CrossTest.get_stats_diff_taxa_but_func, callback= self.callback_after_ttest, **ttest_sig_tf_params)


Expand Down
147 changes: 76 additions & 71 deletions metax/gui/metax_gui/main_window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="currentIndex">
<number>2</number>
<number>4</number>
</property>
<property name="documentMode">
<bool>false</bool>
Expand Down Expand Up @@ -939,6 +939,11 @@
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Trace Shifting</string>
</property>
</item>
<item>
<property name="text">
<string>Standard Scaling (Z-Score)</string>
Expand Down Expand Up @@ -1471,7 +1476,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>280</height>
<height>300</height>
</size>
</property>
<property name="title">
Expand Down Expand Up @@ -1500,7 +1505,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>660</width>
<width>1016</width>
<height>232</height>
</rect>
</property>
Expand Down Expand Up @@ -2754,7 +2759,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>280</height>
<height>300</height>
</size>
</property>
<property name="title">
Expand Down Expand Up @@ -3745,7 +3750,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>240</height>
<height>280</height>
</size>
</property>
<property name="title">
Expand Down Expand Up @@ -4796,7 +4801,7 @@
<enum>QTabWidget::Triangular</enum>
</property>
<property name="currentIndex">
<number>3</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab_3">
<attribute name="title">
Expand Down Expand Up @@ -5139,7 +5144,7 @@
</property>
</widget>
</item>
<item row="10" column="1" colspan="2">
<item row="10" column="1">
<widget class="QPushButton" name="pushButton_dunnett_test">
<property name="enabled">
<bool>false</bool>
Expand Down Expand Up @@ -5234,64 +5239,11 @@
</item>
</layout>
</item>
<item row="9" column="1" colspan="2">
<widget class="Line" name="line_26">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="11" column="1" colspan="2">
<widget class="QPushButton" name="pushButton_multi_deseq2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Run Deseq2</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<layout class="QGridLayout" name="gridLayout_72">
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_dunnett_group"/>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_114">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Groups (Default all)</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QComboBox" name="comboBox_dunnett_control_group"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_115">
<property name="text">
<string>Control Group</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBox_comparing_group_control_in_condition">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Comparing in Each Condition</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_24">
<item>
Expand All @@ -5316,8 +5268,61 @@
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBox_comparing_group_control_in_condition">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Comparing in Each Condition</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_dunnett_group"/>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_114">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Groups (Default all)</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_115">
<property name="text">
<string>Control Group</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="1" colspan="2">
<widget class="Line" name="line_26">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QPushButton" name="pushButton_multi_deseq2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Run Deseq2</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_19">
Expand Down Expand Up @@ -5668,8 +5673,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>996</width>
<height>103</height>
<width>535</width>
<height>94</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_68">
Expand Down Expand Up @@ -6202,7 +6207,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>220</height>
<height>240</height>
</size>
</property>
<property name="title">
Expand Down Expand Up @@ -7432,7 +7437,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>220</height>
<height>240</height>
</size>
</property>
<property name="title">
Expand Down Expand Up @@ -7814,7 +7819,7 @@
<enum>QTabWidget::Triangular</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tab_8">
<attribute name="title">
Expand Down Expand Up @@ -8141,7 +8146,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>220</height>
<height>240</height>
</size>
</property>
<property name="title">
Expand All @@ -8158,8 +8163,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1016</width>
<height>185</height>
<width>775</width>
<height>102</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_69">
Expand Down Expand Up @@ -9253,7 +9258,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>220</height>
<height>240</height>
</size>
</property>
<property name="title">
Expand All @@ -9270,8 +9275,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>383</width>
<height>68</height>
<width>1016</width>
<height>141</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_66">
Expand Down
Loading

0 comments on commit e9432ef

Please sign in to comment.