Skip to content

Commit

Permalink
FIX: uninitialized distribution_plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Lebedev committed Jun 2, 2024
1 parent 92d4f6f commit 8a2b392
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 5 additions & 6 deletions alphastats/gui/pages/02_Import Data.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import io
import os

import streamlit as st
import os
import io

try:
from alphastats.DataSet import DataSet
Expand Down Expand Up @@ -167,9 +166,7 @@ def select_sample_column_metadata(df, software):
submitted = st.form_submit_button("Create DataSet")

if submitted:
if len(df[st.session_state.sample_column].to_list()) != len(
df[st.session_state.sample_column].unique()
):
if len(df[st.session_state.sample_column].to_list()) != len(df[st.session_state.sample_column].unique()):
st.error("Sample names have to be unique.")
st.stop()
return True
Expand Down Expand Up @@ -420,6 +417,8 @@ def empty_session_state():
)

load_sample_data()
if "distribution_plot" not in st.session_state:
save_plot_sampledistribution_rawdata()


st.markdown("### To start a new session:")
Expand Down
5 changes: 4 additions & 1 deletion alphastats/gui/pages/03_Preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def preprocessing():

data_completeness = st.number_input(
f"Data completeness across samples cut-off \n(0.7 -> protein has to be detected in at least 70% of the samples)",
value=0, min_value=0, max_value=1
value=0.0,
min_value=0.0,
max_value=1.0,
step=0.1,
)

log2_transform = st.selectbox(
Expand Down

0 comments on commit 8a2b392

Please sign in to comment.