From d1a7dd2c7259132d138b4b7b93c48cbc3287641c Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Thu, 9 Jun 2022 08:54:31 -0500 Subject: [PATCH] Add tests for kreport2krona --- tests/config/pytest_modules.yml | 4 ++++ .../modules/krakentools/kreport2krona/main.nf | 20 +++++++++++++++++++ .../krakentools/kreport2krona/nextflow.config | 5 +++++ .../krakentools/kreport2krona/test.yml | 8 ++++++++ 4 files changed, 37 insertions(+) create mode 100644 tests/modules/krakentools/kreport2krona/main.nf create mode 100644 tests/modules/krakentools/kreport2krona/nextflow.config create mode 100644 tests/modules/krakentools/kreport2krona/test.yml diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 578d8252..7999940e 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1146,6 +1146,10 @@ kraken2/kraken2: - modules/untar/** - tests/modules/kraken2/kraken2/** +krakentools/kreport2krona: + - modules/krakentools/kreport2krona/** + - tests/modules/krakentools/kreport2krona/** + krona/kronadb: - modules/krona/kronadb/** - tests/modules/krona/kronadb/** diff --git a/tests/modules/krakentools/kreport2krona/main.nf b/tests/modules/krakentools/kreport2krona/main.nf new file mode 100644 index 00000000..c9c626fd --- /dev/null +++ b/tests/modules/krakentools/kreport2krona/main.nf @@ -0,0 +1,20 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../modules/untar/main' +include { KRAKEN2_KRAKEN2 } from '../../../../modules/kraken2/kraken2/main' +include { KRAKENTOOLS_KREPORT2KRONA } from '../../../../modules/krakentools/kreport2krona/main' + +workflow test_krakentools_kreport2krona { + + input = Channel.of([ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ]) + db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] + + UNTAR ( db ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, false, false ) + KRAKENTOOLS_KREPORT2KRONA ( KRAKEN2_KRAKEN2.out.report ) +} diff --git a/tests/modules/krakentools/kreport2krona/nextflow.config b/tests/modules/krakentools/kreport2krona/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/krakentools/kreport2krona/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/krakentools/kreport2krona/test.yml b/tests/modules/krakentools/kreport2krona/test.yml new file mode 100644 index 00000000..6525e915 --- /dev/null +++ b/tests/modules/krakentools/kreport2krona/test.yml @@ -0,0 +1,8 @@ +- name: krakentools kreport2krona test_krakentools_kreport2krona + command: nextflow run ./tests/modules/krakentools/kreport2krona -entry test_krakentools_kreport2krona -c ./tests/config/nextflow.config -c ./tests/modules/krakentools/kreport2krona/nextflow.config + tags: + - krakentools/kreport2krona + - krakentools + files: + - path: output/krakentools/test.txt + md5sum: c89a9db7acbdba9dea0fe246bcaa85c1