Skip to content

Commit

Permalink
test if paired end samplesheet when not --single_end
Browse files Browse the repository at this point in the history
  • Loading branch information
d4straub committed Aug 17, 2023
1 parent fa2c214 commit 2c2ea1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion workflows/ampliseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,15 @@ workflow AMPLISEQ {
.map{ meta, readfw, readrv ->
meta.single_end = single_end.toBoolean()
def reads = single_end ? readfw : [readfw,readrv]
if ( !meta.single_end && !readrv ) { error("Entry `reverseReads` is missing in $params.input for $meta.id, either correct the samplesheet or use `--single_end`, `--pacbio`, or `--iontorrent`") } // make sure that reverse reads are present when single_end isnt specified
return [meta, reads] }
} else if ( params.input_fasta ) {
ch_input_fasta = Channel.fromPath(params.input_fasta, checkIfExists: true)
} else if ( params.input_folder ) {
PARSE_INPUT ( params.input_folder, single_end, params.multiple_sequencing_runs, params.extension )
ch_input_reads = PARSE_INPUT.out.reads
} else {
error "One of --input, --input_fasta, --input_folder must be provided!"
error("One of `--input`, `--input_fasta`, `--input_folder` must be provided!")
}

//Filter empty files
Expand Down

0 comments on commit 2c2ea1e

Please sign in to comment.