From 8381a5e5dd73228b3fe744e51f1964d62c28c1e5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 24 May 2022 14:43:40 +0200 Subject: [PATCH] add window test --- tests/modules/mosdepth/main.nf | 16 ++++++++++++++-- tests/modules/mosdepth/nextflow.config | 3 +++ tests/modules/mosdepth/test.yml | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/tests/modules/mosdepth/main.nf b/tests/modules/mosdepth/main.nf index eab47e89..96a9ef20 100644 --- a/tests/modules/mosdepth/main.nf +++ b/tests/modules/mosdepth/main.nf @@ -2,8 +2,9 @@ nextflow.enable.dsl = 2 -include { MOSDEPTH } from '../../../modules/mosdepth/main.nf' -include { MOSDEPTH as MOSDEPTH_FAIL } from '../../../modules/mosdepth/main.nf' +include { MOSDEPTH } from '../../../modules/mosdepth/main.nf' +include { MOSDEPTH as MOSDEPTH_FAIL } from '../../../modules/mosdepth/main.nf' +include { MOSDEPTH as MOSDEPTH_WINDOW } from '../../../modules/mosdepth/main.nf' workflow test_mosdepth { input = [ @@ -49,6 +50,17 @@ workflow test_mosdepth_cram_bed { MOSDEPTH ( input, bed, fasta ) } +workflow test_mosdepth_window { + input = [ + [ id:'test', single_end:true ], + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ], + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] + ] + bed = [ file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) ] + + MOSDEPTH_WINDOW ( input, [], [] ) +} + workflow test_mosdepth_fail { input = [ [ id:'test', single_end:true ], diff --git a/tests/modules/mosdepth/nextflow.config b/tests/modules/mosdepth/nextflow.config index 85674a3c..4a6153e6 100644 --- a/tests/modules/mosdepth/nextflow.config +++ b/tests/modules/mosdepth/nextflow.config @@ -4,4 +4,7 @@ process { withName: MOSDEPTH_FAIL { ext.args = "--by 100" } + withName: MOSDEPTH_WINDOW { + ext.args = "--by 100" + } } diff --git a/tests/modules/mosdepth/test.yml b/tests/modules/mosdepth/test.yml index a927396c..a3115d6e 100644 --- a/tests/modules/mosdepth/test.yml +++ b/tests/modules/mosdepth/test.yml @@ -66,6 +66,26 @@ - path: output/mosdepth/test.regions.bed.gz.csi md5sum: 47669cfe41f3e222e74d81e1b1be191f +- name: mosdepth test_mosdepth_window + command: nextflow run ./tests/modules/mosdepth -entry test_mosdepth_window -c ./tests/config/nextflow.config -c ./tests/modules/mosdepth/nextflow.config + tags: + - mosdepth + files: + - path: output/mosdepth/test.mosdepth.global.dist.txt + md5sum: e82e90c7d508a135b5a8a7cd6933452e + - path: output/mosdepth/test.mosdepth.region.dist.txt + md5sum: 39e0e707ec32feb5176fd20a95f1f468 + - path: output/mosdepth/test.mosdepth.summary.txt + md5sum: 96c037f769974b904beb53edc4f56d82 + - path: output/mosdepth/test.per-base.bed.gz + md5sum: bc1df47d46f818fee5275975925d769a + - path: output/mosdepth/test.per-base.bed.gz.csi + md5sum: 9e649ac749ff6c6073bef5ab63e8aaa4 + - path: output/mosdepth/test.regions.bed.gz + md5sum: f02e2cb49cc050e13d76942d6960827a + - path: output/mosdepth/test.regions.bed.gz.csi + md5sum: 257d67678136963d9dd904330079609d + - name: mosdepth test_mosdepth_fail command: nextflow run ./tests/modules/mosdepth -entry test_mosdepth_fail -c ./tests/config/nextflow.config -c ./tests/modules/mosdepth/nextflow.config tags: