Fixes running without shortreads, and also ensures all tests produce non-empty fastq.gz files

This commit is contained in:
James Fellows Yates 2022-05-31 13:38:18 +02:00
parent 3bb32b2def
commit 723852bf3d
3 changed files with 9 additions and 7 deletions

View file

@ -20,7 +20,7 @@ process FILTLONG {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def short_reads = meta.single_end ? "-1 $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}" def short_reads = !shortreads ? "" : meta.single_end ? "-1 $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}"
""" """
filtlong \\ filtlong \\
$short_reads \\ $short_reads \\

View file

@ -2,4 +2,6 @@ process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
ext.args = "--min_length 10"
} }

View file

@ -4,7 +4,7 @@
- filtlong - filtlong
files: files:
- path: output/filtlong/test_lr_filtlong.fastq.gz - path: output/filtlong/test_lr_filtlong.fastq.gz
md5sum: 7029066c27ac6f5ef18d660d5741979a md5sum: ff2b6e10fea0c45f10e8739a5bca25ed
- name: filtlong test_filtlong_illumina_se - name: filtlong test_filtlong_illumina_se
command: nextflow run ./tests/modules/filtlong -entry test_filtlong_illumina_se -c ./tests/config/nextflow.config -c ./tests/modules/filtlong/nextflow.config command: nextflow run ./tests/modules/filtlong -entry test_filtlong_illumina_se -c ./tests/config/nextflow.config -c ./tests/modules/filtlong/nextflow.config
@ -12,7 +12,7 @@
- filtlong - filtlong
files: files:
- path: output/filtlong/test_lr_filtlong.fastq.gz - path: output/filtlong/test_lr_filtlong.fastq.gz
md5sum: 7029066c27ac6f5ef18d660d5741979a md5sum: ff2b6e10fea0c45f10e8739a5bca25ed
- name: filtlong test_filtlong_illumina_pe - name: filtlong test_filtlong_illumina_pe
command: nextflow run ./tests/modules/filtlong -entry test_filtlong_illumina_pe -c ./tests/config/nextflow.config -c ./tests/modules/filtlong/nextflow.config command: nextflow run ./tests/modules/filtlong -entry test_filtlong_illumina_pe -c ./tests/config/nextflow.config -c ./tests/modules/filtlong/nextflow.config
@ -20,4 +20,4 @@
- filtlong - filtlong
files: files:
- path: output/filtlong/test_lr_filtlong.fastq.gz - path: output/filtlong/test_lr_filtlong.fastq.gz
md5sum: 7029066c27ac6f5ef18d660d5741979a md5sum: ff2b6e10fea0c45f10e8739a5bca25ed