From 3128c7216fc6b79cc45a8f90d839d731e3ae7e5e Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Mon, 14 Oct 2024 14:20:04 +0200 Subject: [PATCH] Add working nf-test for the subworkflow --- .../tests/main.nf.test | 25 ++++++------------- .../tests/main.nf.test.snap | 6 ++--- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/subworkflows/local/generate_downstream_samplesheets/tests/main.nf.test b/subworkflows/local/generate_downstream_samplesheets/tests/main.nf.test index 5363926..d1bcfed 100644 --- a/subworkflows/local/generate_downstream_samplesheets/tests/main.nf.test +++ b/subworkflows/local/generate_downstream_samplesheets/tests/main.nf.test @@ -8,36 +8,25 @@ nextflow_workflow { tag "subworkflows_local" tag "subworkflows/generate_downstream_samplesheets" - test("databases - taxprofiler") { + test("generate_downstream_samplesheets - taxprofiler") { when { params { - outdir = "$outputDir" + modules_testdata_base_path = "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/" + outdir = "." generate_pipeline_samplesheets = 'taxprofiler' } workflow { """ input[0] = Channel.of( [ - [id:'database', tool:'krakenuniq'], - file('/workspace/createtaxdb/work/af/59cb1f95d809c3de6520bb0c0d0f6c/database') - ], - [ - [id:'database', tool:'centrifuge'], - file('/workspace/createtaxdb/work/59/3a1df5c9f4b84a4ec3c8014aa13774/database') + [id:'database', tool:'kraken2'], + file(params.modules_testdata_base_path + "genomics/sarscov2/genome/db/kraken2.tar.gz", checkIfExists: true) ], [ - [id:'database', tool:'kaiju'], - file('/workspace/createtaxdb/work/87/865072d7fce3bbf8c5dfd867d16064/database.fmi') - ], - [ - [id:'database', tool:'diamond'], - file('/workspace/createtaxdb/work/1b/f20ef16fbc0f4708db40d76410be5c/database.dmnd') + [id:'database', tool:'krakenuniq'], + file(params.modules_testdata_base_path + "genomics/sarscov2/genome/db/krakenuniq.tar.gz", checkIfExists: true) ], - [ - [id:'database', tool:'malt'], - file('/workspace/createtaxdb/work/4f/c630a9baab2c2f31f15fab1feec4f2/malt_index') - ] ) """ } diff --git a/subworkflows/local/generate_downstream_samplesheets/tests/main.nf.test.snap b/subworkflows/local/generate_downstream_samplesheets/tests/main.nf.test.snap index ef7ea51..3116e6d 100644 --- a/subworkflows/local/generate_downstream_samplesheets/tests/main.nf.test.snap +++ b/subworkflows/local/generate_downstream_samplesheets/tests/main.nf.test.snap @@ -1,12 +1,12 @@ { - "databases - taxprofiler": { + "generate_downstream_samplesheets - taxprofiler": { "content": [ - "taxprofiler.csv:md5,dc4cb1c64d2d48273eb2125266b315bf" + "./downstream_samplesheets/taxprofiler.csv" ], "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-10T22:10:48.802711152" + "timestamp": "2024-10-14T14:19:50.381431215" } } \ No newline at end of file