Skip to content

Commit e77b56c

Browse files
committed
add bed file and make it optional
1 parent f372d32 commit e77b56c

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

pages/run_pipeline.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def reset_button_state():
3434
run_pipeline_clicked = ss_values["run_pipeline_clicked"]
3535
button_clicked = ss_values["button_clicked"]
3636
custom_sample_list = ss_values["custom_sample_list"] # only availanle if custom sample is selected
37-
37+
BED_FILE = ss_values["BED_FILE"]
3838
samples = ["all", "demo", "customised"] # , "test"]
3939

4040
# Create the selectbox and update session state
@@ -73,7 +73,12 @@ def reset_button_state():
7373

7474
st.write("Your custom samples:", custom_sample_list)
7575
ss_set("custom_sample_list", custom_sample_list)
76-
76+
# Optional BED file path
77+
BED_FILE = st.text_input(
78+
"Optional BED file path",
79+
value="",
80+
help="Provide a full path to a BED file on Alma server, or leave empty to skip and use full genome",
81+
)
7782
WORK_DIR = st.text_input("Working directory", value=WORK_DIR or SCRATCH)
7883
OUTPUT_DIR = st.text_input("Output directory", value=OUTPUT_DIR or SCRATCH)
7984

@@ -88,6 +93,7 @@ def reset_button_state():
8893
work_dir=WORK_DIR,
8994
output_dir=OUTPUT_DIR,
9095
custom_sample_list=custom_sample_list,
96+
bed_file=BED_FILE
9197
)
9298
save_in_ss(
9399
{
@@ -109,6 +115,7 @@ def reset_button_state():
109115
"run_pipeline_clicked": run_pipeline_clicked,
110116
"button_clicked": button_clicked,
111117
"custom_sample_list": custom_sample_list,
118+
"BED_FILE":BED_FILE,
112119
}
113120
)
114121
else:

shared/ss_defaults.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ keys_defaults:
1818
WORK_DIR: None
1919
OUTPUT_DIR: None
2020
custom_sample_list: []
21+
BED_FILE: ""

tabs/tab_command.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def tab(
1515
work_dir="work",
1616
output_dir="output",
1717
custom_sample_list=[],
18+
bed_file=""
1819
):
1920
# --- Initialize session state ---
2021
st.session_state.setdefault("username", username)
@@ -46,6 +47,7 @@ def run_nextflow():
4647
output_dir=output_dir,
4748
work_dir=work_dir,
4849
custom_sample_list=custom_sample_list,
50+
bed_file=bed_file
4951
)
5052
st.code(cmd_pipeline)
5153
result = MY_SSH.run_cmd(cmd_pipeline)

0 commit comments

Comments
 (0)