From 4317ad85aede53086cdb1ac2410a46e85e00bed4 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Fri, 29 Apr 2022 15:07:32 +0200 Subject: [PATCH] Passing test --- modules/sexdeterrmine/main.nf | 2 ++ tests/modules/sexdeterrmine/main.nf | 2 +- tests/modules/sexdeterrmine/nextflow.config | 6 +++++- tests/modules/sexdeterrmine/test.yml | 21 ++++++++++++--------- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/modules/sexdeterrmine/main.nf b/modules/sexdeterrmine/main.nf index f8754764..dd8b5a70 100644 --- a/modules/sexdeterrmine/main.nf +++ b/modules/sexdeterrmine/main.nf @@ -23,6 +23,8 @@ process SEXDETERRMINE { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def sample_list = sample_list_file ? '-f ${sample_list_file}' : '' + if ("$depth" == "${prefix}.tsv") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + """ sexdeterrmine \\ -I $depth \\ diff --git a/tests/modules/sexdeterrmine/main.nf b/tests/modules/sexdeterrmine/main.nf index c9d869f5..2c90d280 100644 --- a/tests/modules/sexdeterrmine/main.nf +++ b/tests/modules/sexdeterrmine/main.nf @@ -9,7 +9,7 @@ workflow test_sexdeterrmine { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true) ] + file("https://github.com/nf-core/test-datasets/raw/eager/testdata/Human/bam/JK2067_downsampled_s0.1.bam", checkIfExists: true) ] SAMTOOLS_DEPTH ( input ) SEXDETERRMINE ( SAMTOOLS_DEPTH.out.tsv, [] ) diff --git a/tests/modules/sexdeterrmine/nextflow.config b/tests/modules/sexdeterrmine/nextflow.config index 763d7ad6..4ba3dfe3 100644 --- a/tests/modules/sexdeterrmine/nextflow.config +++ b/tests/modules/sexdeterrmine/nextflow.config @@ -3,6 +3,10 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName:SAMTOOLS_DEPTH { - ext.args = "-aa -H" + ext.args = "-H" + } + + withName:SEXDETERRMINE { + ext.prefix = { "${meta.id}_sexdet" } } } diff --git a/tests/modules/sexdeterrmine/test.yml b/tests/modules/sexdeterrmine/test.yml index 5eca8a30..54c471ba 100644 --- a/tests/modules/sexdeterrmine/test.yml +++ b/tests/modules/sexdeterrmine/test.yml @@ -1,12 +1,15 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml sexdeterrmine -- name: "sexdeterrmine" - command: nextflow run ./tests/modules/sexdeterrmine -entry test_sexdeterrmine -c ./tests/config/nextflow.config -c ./tests/modules/sexdeterrmine/nextflow.config +- name: sexdeterrmine test_sexdeterrmine + command: nextflow run tests/modules/sexdeterrmine -entry test_sexdeterrmine -c tests/config/nextflow.config tags: - - "sexdeterrmine" - # + - sexdeterrmine files: - - path: "output/sexdeterrmine/test.bam" - md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/samtools/test.tsv + md5sum: c894abd0c78ea7760e0b54bbafb93722 + - path: output/samtools/versions.yml + md5sum: dbd04b700335c8ad236bd667254c8dd8 + - path: output/sexdeterrmine/sexdeterrmine.json + md5sum: 16d9e7891d4c92bc1d66db2e70e9d86f + - path: output/sexdeterrmine/test_sexdet.tsv + md5sum: 7ffc35e478de66939819a9ca4a5df2d7 - path: output/sexdeterrmine/versions.yml - md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b + md5sum: 077361101e8e7997aec3da8a01e59eee