Update src/streamlit_app.py
Browse files- src/streamlit_app.py +10 -10
src/streamlit_app.py
CHANGED
|
@@ -2534,24 +2534,24 @@ if st.button("π Merge Files and Generate QC Report", type="secondary"):
|
|
| 2534 |
|
| 2535 |
log("performing across-group linear regression...")
|
| 2536 |
log("... this will take very long time")
|
| 2537 |
-
|
| 2538 |
gc.collect()
|
| 2539 |
log("β
Created across-group scatter plots")
|
| 2540 |
|
| 2541 |
log("performing within-group linear regression")
|
| 2542 |
log("... this will take very long time")
|
| 2543 |
-
|
| 2544 |
gc.collect()
|
| 2545 |
log("β
Created within-group scatter plots")
|
| 2546 |
|
| 2547 |
# Organize plots
|
| 2548 |
-
|
| 2549 |
-
|
| 2550 |
|
| 2551 |
-
|
| 2552 |
-
|
| 2553 |
-
|
| 2554 |
-
|
| 2555 |
|
| 2556 |
# Create report
|
| 2557 |
today_str = str(date.today())
|
|
@@ -2562,8 +2562,8 @@ if st.button("π Merge Files and Generate QC Report", type="secondary"):
|
|
| 2562 |
layout = column(
|
| 2563 |
row(p1, p2, p3, p4),
|
| 2564 |
row(*pca_plots, p5),
|
| 2565 |
-
|
| 2566 |
-
|
| 2567 |
column(footer)
|
| 2568 |
)
|
| 2569 |
save(layout)
|
|
|
|
| 2534 |
|
| 2535 |
log("performing across-group linear regression...")
|
| 2536 |
log("... this will take very long time")
|
| 2537 |
+
group_average_scatter = plot_across_group_pairwise_matrix(df, sample_group_map, custom_sample_names, num_cpu_workers)
|
| 2538 |
gc.collect()
|
| 2539 |
log("β
Created across-group scatter plots")
|
| 2540 |
|
| 2541 |
log("performing within-group linear regression")
|
| 2542 |
log("... this will take very long time")
|
| 2543 |
+
within_group_scatter = plot_within_group_pairwise_matrix(df, sample_group_map, custom_sample_names, num_cpu_workers)
|
| 2544 |
gc.collect()
|
| 2545 |
log("β
Created within-group scatter plots")
|
| 2546 |
|
| 2547 |
# Organize plots
|
| 2548 |
+
num_plots = len(within_group_scatter)
|
| 2549 |
+
plots_per_row = 3 if num_plots == 6 else 2
|
| 2550 |
|
| 2551 |
+
within_group_scatter_layout = [
|
| 2552 |
+
row(*within_group_scatter[i:i + plots_per_row])
|
| 2553 |
+
for i in range(0, num_plots, plots_per_row)
|
| 2554 |
+
]
|
| 2555 |
|
| 2556 |
# Create report
|
| 2557 |
today_str = str(date.today())
|
|
|
|
| 2562 |
layout = column(
|
| 2563 |
row(p1, p2, p3, p4),
|
| 2564 |
row(*pca_plots, p5),
|
| 2565 |
+
row(column(heatmap_with_title), Spacer(width=20), column(group_average_scatter)),
|
| 2566 |
+
column(*within_group_scatter_layout),
|
| 2567 |
column(footer)
|
| 2568 |
)
|
| 2569 |
save(layout)
|