Skip to content

Commit

Permalink
Error handling in protein editor
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaS92 committed Jan 21, 2025
1 parent 04b85a2 commit 23e8b39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alphastats/gui/utils/llm_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def protein_selector(df: pd.DataFrame, title: str, state_key: str) -> List[str]:
selected_proteins (List[str]): A list of selected proteins.
"""
st.write(title)
if len(df) == 0:
st.markdown("No significant proteins.")
return []
c1, c2 = st.columns([1, 1])
if c1.button("Select all", help=f"Select all {title} for analysis"):
st.session_state[state_key] = df["Protein"].tolist()
Expand Down

0 comments on commit 23e8b39

Please sign in to comment.