diff --git a/flowcraft/generator/templates/unicycler.nf b/flowcraft/generator/templates/unicycler.nf index 89b31ef1..2055da3c 100644 --- a/flowcraft/generator/templates/unicycler.nf +++ b/flowcraft/generator/templates/unicycler.nf @@ -7,6 +7,9 @@ process unicycler_{{pid}} { input: set sample_id, file(fastq_pair) from {{input_channel}} + file long_fastq from params.long_fastq{{param_id}} ? + Channel.fromPath(params.long_fastq{{param_id}}) : + Channel.value("NA") output: set sample_id, file('assembly.fasta') into {{output_channel}} @@ -16,7 +19,10 @@ process unicycler_{{pid}} { {% endwith %} script: - "unicycler -t $task.cpus -o . --no_correct --no_pilon -1 ${fastq_pair[0]} -2 ${fastq_pair[1]}" + command = "unicycler -t $task.cpus -o . --no_correct --no_pilon -1 ${fastq_pair[0]} -2 ${fastq_pair[1]}" + if (params.long_fastq{{param_id}}) + command += " -l ${long_fastq}" + command } {{forks}}