Skip to content

Commit

Permalink
Change logic in samplesheet validation, ch_raw_short_reads should be …
Browse files Browse the repository at this point in the history
…empty if no files are given
  • Loading branch information
muabnezor committed Nov 29, 2024
1 parent 75a36f2 commit 67d44d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions subworkflows/local/utils_nfcore_mag_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ workflow PIPELINE_INITIALISATION {
meta.run = meta.run == [] ? "0" : meta.run
meta.single_end = params.single_end

if (params.single_end) {
if (params.single_end && sr1) {
return [meta, [sr1]]
}
else {
else if (sr1 && sr2) {
return [meta, [sr1, sr2]]
}
}
Expand Down Expand Up @@ -323,7 +323,7 @@ def validateInputParameters(hybrid) {
//
def validateInputSamplesheet(meta, sr1, sr2, lr) {

if (!sr2 && !params.single_end) {
if ((!sr2 && !lr) && !params.single_end) {
error("[nf-core/mag] ERROR: Single-end data must be executed with `--single_end`. Note that it is not possible to mix single- and paired-end data in one run! Check input TSV for sample: ${meta.id}")
}
if (sr2 && params.single_end) {
Expand Down

0 comments on commit 67d44d0

Please sign in to comment.