diff --git a/alphastats/gui/pages/05_GPT.py b/alphastats/gui/pages/05_GPT.py deleted file mode 100644 index e69de29b..00000000 diff --git a/alphastats/gui/utils/analysis_helper.py b/alphastats/gui/utils/analysis_helper.py index cb5741ad..78ca1967 100644 --- a/alphastats/gui/utils/analysis_helper.py +++ b/alphastats/gui/utils/analysis_helper.py @@ -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() diff --git a/alphastats/gui/utils/options.py b/alphastats/gui/utils/options.py index 8481304b..c63b3df2 100644 --- a/alphastats/gui/utils/options.py +++ b/alphastats/gui/utils/options.py @@ -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 diff --git a/alphastats/gui/utils/overview_helper.py b/alphastats/gui/utils/overview_helper.py index 15c50ca2..e9ab0552 100644 --- a/alphastats/gui/utils/overview_helper.py +++ b/alphastats/gui/utils/overview_helper.py @@ -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 diff --git a/alphastats/plots/VolcanoPlot.py b/alphastats/plots/VolcanoPlot.py index 7bda7478..24487f81 100644 --- a/alphastats/plots/VolcanoPlot.py +++ b/alphastats/plots/VolcanoPlot.py @@ -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)) diff --git a/alphastats/statistics/DifferentialExpressionAnalysis.py b/alphastats/statistics/DifferentialExpressionAnalysis.py index 2405f6e4..fd862d44 100644 --- a/alphastats/statistics/DifferentialExpressionAnalysis.py +++ b/alphastats/statistics/DifferentialExpressionAnalysis.py @@ -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))