From 723852bf3d3b12059b2f53da8bc055206f3019d7 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Tue, 31 May 2022 13:38:18 +0200 Subject: [PATCH 1/2] Fixes running without shortreads, and also ensures all tests produce non-empty fastq.gz files --- modules/filtlong/main.nf | 2 +- tests/modules/filtlong/nextflow.config | 2 ++ tests/modules/filtlong/test.yml | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/filtlong/main.nf b/modules/filtlong/main.nf index 0e6fdd53..67500053 100644 --- a/modules/filtlong/main.nf +++ b/modules/filtlong/main.nf @@ -20,7 +20,7 @@ process FILTLONG { script: def args = task.ext.args ?: '' 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 \\ $short_reads \\ diff --git a/tests/modules/filtlong/nextflow.config b/tests/modules/filtlong/nextflow.config index 8730f1c4..ec9854c2 100644 --- a/tests/modules/filtlong/nextflow.config +++ b/tests/modules/filtlong/nextflow.config @@ -2,4 +2,6 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = "--min_length 10" + } diff --git a/tests/modules/filtlong/test.yml b/tests/modules/filtlong/test.yml index dc5fa5a9..9c465303 100644 --- a/tests/modules/filtlong/test.yml +++ b/tests/modules/filtlong/test.yml @@ -1,23 +1,23 @@ - name: filtlong test_filtlong - command: nextflow run ./tests/modules/filtlong -entry test_filtlong -c ./tests/config/nextflow.config -c ./tests/modules/filtlong/nextflow.config + command: nextflow run ./tests/modules/filtlong -entry test_filtlong -c ./tests/config/nextflow.config -c ./tests/modules/filtlong/nextflow.config tags: - filtlong files: - path: output/filtlong/test_lr_filtlong.fastq.gz - md5sum: 7029066c27ac6f5ef18d660d5741979a + md5sum: ff2b6e10fea0c45f10e8739a5bca25ed - 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 tags: - filtlong files: - path: output/filtlong/test_lr_filtlong.fastq.gz - md5sum: 7029066c27ac6f5ef18d660d5741979a + md5sum: ff2b6e10fea0c45f10e8739a5bca25ed - 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 tags: - filtlong files: - path: output/filtlong/test_lr_filtlong.fastq.gz - md5sum: 7029066c27ac6f5ef18d660d5741979a + md5sum: ff2b6e10fea0c45f10e8739a5bca25ed From 430def06faabbbbfe03da68661c329b85a1296ed Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Tue, 31 May 2022 14:45:41 +0200 Subject: [PATCH 2/2] Switch from md5sum to string due to conda flakiness --- tests/modules/filtlong/test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/modules/filtlong/test.yml b/tests/modules/filtlong/test.yml index 9c465303..93f847ec 100644 --- a/tests/modules/filtlong/test.yml +++ b/tests/modules/filtlong/test.yml @@ -4,7 +4,8 @@ - filtlong files: - path: output/filtlong/test_lr_filtlong.fastq.gz - md5sum: ff2b6e10fea0c45f10e8739a5bca25ed + contains: + - "@00068f7a-51b3-4933-8fc6-7d6e29181ff9" - 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 @@ -12,7 +13,8 @@ - filtlong files: - path: output/filtlong/test_lr_filtlong.fastq.gz - md5sum: ff2b6e10fea0c45f10e8739a5bca25ed + contains: + - "@00068f7a-51b3-4933-8fc6-7d6e29181ff9" - 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 @@ -20,4 +22,5 @@ - filtlong files: - path: output/filtlong/test_lr_filtlong.fastq.gz - md5sum: ff2b6e10fea0c45f10e8739a5bca25ed + contains: + - "@00068f7a-51b3-4933-8fc6-7d6e29181ff9"