Skip to content

Commit 89c52ed

Browse files
committed
final fixes
1 parent d860a2c commit 89c52ed

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

pages/run_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def reset_button_state():
3535
button_clicked = ss_values["button_clicked"]
3636
custom_sample_list = ss_values["custom_sample_list"] # only availanle if custom sample is selected
3737
BED_FILE = ss_values["BED_FILE"]
38-
samples = ["demo", "customised"] # , "test"]
38+
samples = ["demo", "customised"]
3939

4040
# Create the selectbox and update session state
4141
pipeline_options = ["select"] + list(map_pipeline_project.keys())

shared/command_helper.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from typing import Tuple, Optional
2+
import streamlit as st
33

44
def get_path_to_script(
55
selected_pipeline: str,
@@ -27,7 +27,7 @@ def pipe_cmd(
2727
selected_pipeline="",
2828
selected_project="",
2929
cmd_num=0,
30-
selected_samples="all",
30+
selected_samples="",
3131
work_dir="work",
3232
output_dir="output",
3333
custom_sample_list=[],
@@ -74,16 +74,16 @@ def get_pipeline_command():
7474

7575
# Command mappings
7676
command_map = {
77-
0: get_pipeline_command(),
78-
1: f"squeue -u {username}",
79-
2: (
77+
0: get_pipeline_command,
78+
1: lambda: f"squeue -u {username}",
79+
2: lambda: (
8080
f"sacct --user {username} "
8181
"--format UID,User,JobID,JobName,Submit,Elapsed,Partition,"
8282
"NNodes,NCPUS,TotalCPU,CPUTime,ReqMem,MaxRSS,WorkDir,State,"
8383
"Account,AllocTres -P"
8484
),
85-
3: "echo hello from nextflow-on-Alma app",
85+
3: lambda: "echo hello from nextflow-on-Alma app",
8686
}
8787

8888
# Return the corresponding command
89-
return command_map.get(cmd_num, "echo 'Invalid command number'")
89+
return command_map.get(cmd_num, lambda: "echo 'Invalid command number'")()

tabs/tab_command.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def run_nextflow():
102102
with tabQ:
103103
if st.button("Check slurm queues"):
104104
output = st.empty()
105+
st.write(cmd_hlp.pipe_cmd(st.session_state["username"], cmd_num=1))
105106
with st.spinner("Checking queue..."):
106107
with hlp.st_capture(output.code):
107108
cmd_pipeline = cmd_hlp.pipe_cmd(st.session_state["username"], cmd_num=1)

0 commit comments

Comments
 (0)