Skip to content

Commit 31940e6

Browse files
committed
add ellie wright; Add new arg for nanopore-pauses
1 parent 3597b22 commit 31940e6

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

custom_files/user_whitelist.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ sstephens dgeraeach None
66
jhouseham UNKNOWN None
77
ahyde1 MOPOPGEN None
88
bdelpino dbiphdaer None
9+
ewright dbiphdaer None

pages/run_pipeline.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def reset_button_state():
3131
JOB_ID = ss_values["JOB_ID"]
3232
WORK_DIR = ss_values["WORK_DIR"]
3333
OUTPUT_DIR = ss_values["OUTPUT_DIR"]
34-
BAM_DIR = ss_values["BAM_DIR"]
34+
IN_DIR = ss_values["IN_DIR"]
3535
run_pipeline_clicked = ss_values["run_pipeline_clicked"]
3636
button_clicked = ss_values["button_clicked"]
3737
custom_sample_list = ss_values["custom_sample_list"] # only availanle if custom sample is selected
@@ -92,7 +92,15 @@ def reset_button_state():
9292
)
9393
WORK_DIR = st.text_input("Working directory", value=WORK_DIR or SCRATCH)
9494
OUTPUT_DIR = st.text_input("Output directory", value=OUTPUT_DIR or SCRATCH)
95-
BAM_DIR = st.text_input("Adapted BAM directory", value=BAM_DIR or "/data/rds/DGE/DUDGE/OGENETIC/Data/Nanopore/samples")
95+
96+
# very specific field for default values that I would like to remove
97+
default_path = ""
98+
if PIPELINE == "icr-nanopore-pauses" and PROJECT == "genomrep-support":
99+
default_path = "/data/rds/DBI/DUDBI/GENOMREP/bdelpino/Nanopore\ Sequencing/Raw\ data/250506_K562_AvsS/no_sample_id"
100+
elif PROJECT == "nf-long-reads":
101+
default_path = "/data/rds/DGE/DUDGE/OGENETIC/Data/Nanopore/samples"
102+
103+
IN_DIR = st.text_input("Sample directory", value=IN_DIR or default_path)
96104

97105
dry_run = st.checkbox("Dry run (do not execute the job)", value=False)
98106

@@ -106,7 +114,7 @@ def reset_button_state():
106114
selected_samples=SAMPLE,
107115
work_dir=WORK_DIR,
108116
output_dir=OUTPUT_DIR,
109-
bam_dir=BAM_DIR,
117+
bam_dir=IN_DIR, # not always bam files, TODO: rename it
110118
custom_sample_list=custom_sample_list,
111119
bed_file=BED_FILE,
112120
dry_run=dry_run,
@@ -129,7 +137,7 @@ def reset_button_state():
129137
# "JOB_ID": JOB_ID,
130138
"WORK_DIR": WORK_DIR,
131139
"OUTPUT_DIR": OUTPUT_DIR,
132-
"BAM_DIR": BAM_DIR,
140+
"IN_DIR": IN_DIR,
133141
"run_pipeline_clicked": run_pipeline_clicked,
134142
"button_clicked": button_clicked,
135143
"custom_sample_list": custom_sample_list,

shared/command_helper.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def pipe_cmd(
3030
selected_samples="",
3131
work_dir="work",
3232
output_dir="output",
33-
bam_dir="",
33+
bam_dir="",# it s not always a bam dir, depending on the pipeline
3434
custom_sample_list=[],
3535
bed_file="",
3636
dry_run=False,
@@ -58,8 +58,13 @@ def get_pipeline_command():
5858
"--work-dir", work_dir,
5959
"--outdir", output_dir,
6060
"--samples", " ".join(custom_sample_list),
61-
"--out_bam_folder", bam_dir,
61+
#"--out_bam_folder", bam_dir,
6262
]
63+
if selected_pipeline == "icr-nanopore-pauses" and selected_project == "genomrep-support":
64+
args+= ["--base-dir", bam_dir]
65+
elif selected_project == "nf-long-reads":
66+
args+= ["--out_bam_folder", bam_dir]
67+
6368
if adapt_samples:
6469
args += ["--adapt-samples"]
6570
if bed_file:
@@ -69,7 +74,11 @@ def get_pipeline_command():
6974
preamble = f"""
7075
mkdir -p {work_dir}/logs
7176
cd {work_dir}
72-
mkdir {bam_dir}
77+
"""
78+
79+
if selected_project == "nf-long-reads":
80+
preamble += f"""
81+
mkdir -p {bam_dir}
7382
"""
7483
# Combine all into the final shell command
7584
cmd_pipeline = preamble + f"{base_cmd} {' '.join(args)}"

shared/ss_defaults.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ keys_defaults:
1919
OUTPUT_DIR: None
2020
custom_sample_list: []
2121
BED_FILE: ""
22-
BAM_DIR: ""
22+
IN_DIR: ""

0 commit comments

Comments
 (0)