Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
byemaxx committed Aug 10, 2024
2 parents c378967 + 1b227d4 commit 031d2f1
Show file tree
Hide file tree
Showing 19 changed files with 4,037 additions and 3,676 deletions.
43 changes: 43 additions & 0 deletions Docs/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
# Version: 1.109.11
## Date: 2024-08-10
### Changes:
- Fix: Fixed the scale method and color bar of heatmap for Cross Test result table.

# Version: 1.109.10
## Date: 2024-08-9
### Changes:
- Fix: Fixed the of test result table, the t-statistic was reversed.
- New: adde z-score for heatmap scale.


# Version: 1.109.9
## Date: 2024-08-7
### Changes:
- Fix: Fixed the bug when restore the object, some cross_test top table was added to the GUI by wrong.
- Change: Changed the "pixel_ratio" from 2 to 3 for the HTML plot to make the plot more clear.


# Version: 1.109.8
## Date: 2024-08-1
### Changes:
- Fix: Fixed title of the static volcano plot.
- New: added theme option for the static volcano plot.


# Version: 1.109.7
## Date: 2024-07-31
### Changes:
- Change: Optimized the volcano plot.

# Version: 1.109.6
## Date: 2024-07-31
### Changes:
- Change: Optimized the Sankey plot.


# Version: 1.109.6
## Date: 2024-07-31
### Changes:
- New: Added a checkbox to enable user to plot 2D or 3D bar plot for the baisc plot part with sub meta.


# Version: 1.109.5
## Date: 2024-07-25
### Changes:
Expand Down
97 changes: 61 additions & 36 deletions metax/gui/main_gui.py

Large diffs are not rendered by default.

3,923 changes: 2,008 additions & 1,915 deletions metax/gui/metax_gui/main_window.ui

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions metax/gui/metax_gui/setting_window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<item row="0" column="0">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="page">
<property name="geometry">
Expand Down Expand Up @@ -159,7 +159,7 @@
<number>100000</number>
</property>
<property name="singleStep">
<number>10</number>
<number>50</number>
</property>
<property name="value">
<number>500</number>
Expand Down Expand Up @@ -316,7 +316,7 @@
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.200000000000000</double>
Expand Down Expand Up @@ -673,6 +673,14 @@
</layout>
</widget>
<widget class="QWidget" name="page_3">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>748</width>
<height>340</height>
</rect>
</property>
<attribute name="label">
<string>Others</string>
</attribute>
Expand Down
2,756 changes: 1,405 additions & 1,351 deletions metax/gui/metax_gui/ui_main_window.py

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions metax/gui/metax_gui/ui_setting_window.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'c:\Users\Qing\OneDrive - University of Ottawa\code\TaxaFunc\MetaX\utils\MetaX_GUI\Setting.ui'
# Form implementation generated from reading ui file 'c:\Users\Qing\OneDrive - University of Ottawa\code\TaxaFunc\MetaX\metax\gui\metax_gui\setting_window.ui'
#
# Created by: PyQt5 UI code generator 5.15.9
#
Expand Down Expand Up @@ -83,7 +83,7 @@ def setupUi(self, Settings):
self.gridLayout_7.addWidget(self.label_18, 2, 0, 1, 1)
self.spinBox_tf_link_net_repulsion = QtWidgets.QSpinBox(self.page_2)
self.spinBox_tf_link_net_repulsion.setMaximum(100000)
self.spinBox_tf_link_net_repulsion.setSingleStep(10)
self.spinBox_tf_link_net_repulsion.setSingleStep(50)
self.spinBox_tf_link_net_repulsion.setProperty("value", 500)
self.spinBox_tf_link_net_repulsion.setObjectName("spinBox_tf_link_net_repulsion")
self.gridLayout_7.addWidget(self.spinBox_tf_link_net_repulsion, 1, 1, 1, 1)
Expand Down Expand Up @@ -145,7 +145,7 @@ def setupUi(self, Settings):
self.gridLayout_7.addWidget(self.label_19, 1, 2, 1, 1)
self.doubleSpinBox_tf_link_net_gravity = QtWidgets.QDoubleSpinBox(self.page_2)
self.doubleSpinBox_tf_link_net_gravity.setMaximum(1.0)
self.doubleSpinBox_tf_link_net_gravity.setSingleStep(0.1)
self.doubleSpinBox_tf_link_net_gravity.setSingleStep(0.01)
self.doubleSpinBox_tf_link_net_gravity.setProperty("value", 0.2)
self.doubleSpinBox_tf_link_net_gravity.setObjectName("doubleSpinBox_tf_link_net_gravity")
self.gridLayout_7.addWidget(self.doubleSpinBox_tf_link_net_gravity, 1, 3, 1, 1)
Expand Down Expand Up @@ -275,6 +275,7 @@ def setupUi(self, Settings):
self.gridLayout_4.addWidget(self.label, 1, 0, 1, 1)
self.toolBox.addItem(self.page_2, "")
self.page_3 = QtWidgets.QWidget()
self.page_3.setGeometry(QtCore.QRect(0, 0, 748, 340))
self.page_3.setObjectName("page_3")
self.gridLayout_11 = QtWidgets.QGridLayout(self.page_3)
self.gridLayout_11.setObjectName("gridLayout_11")
Expand All @@ -296,7 +297,7 @@ def setupUi(self, Settings):
self.gridLayout.addWidget(self.toolBox, 0, 0, 1, 1)

self.retranslateUi(Settings)
self.toolBox.setCurrentIndex(2)
self.toolBox.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(Settings)

def retranslateUi(self, Settings):
Expand Down
4 changes: 4 additions & 0 deletions metax/taxafunc_analyzer/analyzer_utils/cross_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ def get_stats_ttest(self, group_list: list = None, df_type: str = 'taxa-func', c
res["t-statistic"].append(t)

res = pd.DataFrame(res)

# print('reverse the t-statistic value due to the order of group_list is not correct')
res['t-statistic'] = -res['t-statistic']

on_values = [primary]
if df_type in ['taxa-func', 'func-taxa']:
on_values.append(secondary)
Expand Down
15 changes: 11 additions & 4 deletions metax/taxafunc_ploter/bar_plot_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None,
show_legend:bool=True, font_size:int=10,
rename_sample:bool=True, plot_mean:bool=False,
plot_percent:bool=False, sub_meta:str="None",
show_all_labels:tuple = (False, False)
show_all_labels:tuple = (False, False), use_3d:bool=False
):
if df is None:
df = self.tfa.GetMatrix.get_intensity_matrix(taxon_name=taxon_name, func_name=func_name, peptide_seq=peptide_seq, sample_list= sample_list)
Expand All @@ -64,6 +64,11 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None,

rename_sample = False

if use_3d:
if sub_meta == "None":
use_3d = False
print('sub_meta must be provided for 3D bar plot, use 2D bar plot instead')

# rename taxa
if rename_taxa:
df = self.rename_taxa(df)
Expand Down Expand Up @@ -121,7 +126,7 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None,
save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(
type_="png",
background_color="black" if self.theme == 'dark' else "white",
pixel_ratio=2,
pixel_ratio=3,
title="Save as PNG",
),
restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"),
Expand Down Expand Up @@ -157,7 +162,9 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None,
}


if sub_meta == "None":
if not use_3d:
if sub_meta != "None":
df, _ = self.tfa.BasicStats.get_combined_sub_meta_df(df=df, sub_meta=sub_meta, rename_sample=rename_sample, plot_mean=plot_mean)
colors = self.get_distinct_colors(col_num, convert=True)

c = (
Expand Down Expand Up @@ -252,7 +259,7 @@ def plot_intensity_bar(self, taxon_name:str=None, sample_list:list = None,
feature=opts.ToolBoxFeatureOpts(
save_as_image=opts.ToolBoxFeatureSaveAsImageOpts(type_="png",
background_color="black" if self.theme == 'dark' else "white",
pixel_ratio=2,
pixel_ratio=3,
title="Save as PNG"),
restore=opts.ToolBoxFeatureRestoreOpts(title="Restore"),
data_zoom=opts.ToolBoxFeatureDataZoomOpts(zoom_title="Zoom",
Expand Down
Loading

0 comments on commit 031d2f1

Please sign in to comment.