Skip to content

Commit 88f2cfb

Browse files
Add workflow checks that a study is provided otherwise pipeline could hang silently
1 parent 43587ea commit 88f2cfb

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

workflows/assemblysubmit.nf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ workflow ASSEMBLYSUBMIT {
151151
'true' // skip_header - we want to keep the header from the first file and skip it for the rest
152152
)
153153

154+
if (!submission_study && !study_metadata) {
155+
error("Either --submission_study or --study_metadata must be provided")
156+
}
154157
def study_accession_ch
155158
if (submission_study) {
156159
// Use provided study accession directly

workflows/genomesubmit.nf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ workflow GENOMESUBMIT {
262262
)
263263

264264
// --------- Register study if accession not provided
265+
if (!submission_study && !study_metadata) {
266+
error("Either --submission_study or --study_metadata must be provided")
267+
}
265268
def study_accession_ch
266269
if (submission_study) {
267270
study_accession_ch = channel.of(submission_study)

workflows/readsubmit.nf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ workflow READSUBMIT {
6969
}
7070
}
7171

72+
if (!submission_study && !study_metadata) {
73+
error("Either --submission_study or --study_metadata must be provided")
74+
}
7275
def study_accession_ch
7376
if (submission_study) {
7477
// Use provided study accession directly

0 commit comments

Comments
 (0)