Skip to content

Commit

Permalink
Merge pull request #23 from MannLabs/Reduce_feat_size_in_hiear_clust
Browse files Browse the repository at this point in the history
✅ Change defaults for clustering plot slider
  • Loading branch information
furkanmtorun authored Jun 30, 2023
2 parents b010d64 + ec0e990 commit 5f4f1db
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions omiclearn/utils/ui_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,16 +588,23 @@ def _generate_eda_section(state):
)

if state.eda_method == "Hierarchical clustering":
default_slider_end_point = (
round(len(state.proteins) / 10)
if len(state.proteins) > 499
else round(len(state.proteins) / 3)
)
state["data_range"] = st.slider(
"Data range to be visualized",
0,
len(state.proteins),
(0, round(len(state.proteins) / 2)),
step=3,
(0, default_slider_end_point),
step=1 if len(state.proteins) < 100 else 10,
help="In large datasets, it is not possible to visaulize all the features.",
)

if state.eda_method != "None":
if (state.eda_method != "None") and (
st.button("Perform EDA", key="perform_eda")
):
with st.spinner(f"Performing {state.eda_method}.."):
p = perform_EDA(state)
st.plotly_chart(p, use_container_width=True)
Expand Down

0 comments on commit 5f4f1db

Please sign in to comment.