Skip to content

Commit

Permalink
Merge pull request #343 from MannLabs/fix_if_condition_dev
Browse files Browse the repository at this point in the history
Fix if condition dev
  • Loading branch information
mschwoer authored Sep 20, 2024
2 parents 68dbd34 + 985719d commit 6222756
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
Empty file removed alphastats/gui/pages/05_GPT.py
Empty file.
13 changes: 12 additions & 1 deletion alphastats/gui/utils/analysis_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,19 @@ def gui_volcano_plot_differential_expression_analysis(
"""
initalize volcano plot object with differential expression analysis results
"""
dataset = st.session_state[StateKeys.DATASET]

# TODO this is just a quickfix, a simple interface needs to be provided by DataSet
volcano_plot = VolcanoPlot(
dataset=st.session_state[StateKeys.DATASET], **chosen_parameter_dict, plot=False
mat=dataset.mat,
rawinput=dataset.rawinput,
metadata=dataset.metadata,
sample=dataset.sample,
index_column=dataset.index_column,
gene_names=dataset._gene_names,
preprocessing_info=dataset.preprocessing_info,
**chosen_parameter_dict,
plot=False,
)
volcano_plot._perform_differential_expression_analysis()
volcano_plot._add_hover_data_columns()
Expand Down
1 change: 1 addition & 0 deletions alphastats/gui/utils/options.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from alphastats import SpectronautLoader
from alphastats.gui.utils.ui_helper import StateKeys
from alphastats.loader.AlphaPeptLoader import AlphaPeptLoader
from alphastats.loader.DIANNLoader import DIANNLoader
Expand Down
1 change: 1 addition & 0 deletions alphastats/gui/utils/overview_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import streamlit as st

from alphastats.DataSet import DataSet
from alphastats.DataSet_Preprocess import PreprocessingStateKeys
from alphastats.gui.utils.ui_helper import StateKeys, convert_df


Expand Down
2 changes: 1 addition & 1 deletion alphastats/plots/VolcanoPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _sam(self): # TODO duplicated?

transposed = self.mat.transpose()

if self.preprocessing_info[PreprocessingStateKeys.LOG2_TRANSFORMED] is None:
if not self.preprocessing_info[PreprocessingStateKeys.LOG2_TRANSFORMED]:
# needs to be lpog2 transformed for fold change calculations
transposed = transposed.transform(lambda x: np.log2(x))

Expand Down
2 changes: 1 addition & 1 deletion alphastats/statistics/DifferentialExpressionAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _sam(self) -> pd.DataFrame: # TODO duplicated?

transposed = self.mat.transpose()

if self.preprocessing_info[PreprocessingStateKeys.LOG2_TRANSFORMED] is None:
if not self.preprocessing_info[PreprocessingStateKeys.LOG2_TRANSFORMED]:
# needs to be lpog2 transformed for fold change calculations
transposed = transposed.transform(lambda x: np.log2(x))

Expand Down

0 comments on commit 6222756

Please sign in to comment.