From b43c1f3937c1b1f25644c06e3efa1aa050576e52 Mon Sep 17 00:00:00 2001 From: Abhinav Sharma Date: Tue, 1 Dec 2020 12:19:52 +0530 Subject: [PATCH] Refactor the multiqc test code --- software/multiqc/test/main.nf | 25 ------------------------- software/multiqc/test/nextflow.config | 20 -------------------- tests/software/multiqc/main.nf | 19 +++++++++++++++++++ tests/software/multiqc/test.yml | 9 +++++++++ 4 files changed, 28 insertions(+), 45 deletions(-) delete mode 100755 software/multiqc/test/main.nf delete mode 100644 software/multiqc/test/nextflow.config create mode 100644 tests/software/multiqc/main.nf create mode 100644 tests/software/multiqc/test.yml diff --git a/software/multiqc/test/main.nf b/software/multiqc/test/main.nf deleted file mode 100755 index 60c7e1a0..00000000 --- a/software/multiqc/test/main.nf +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { MULTIQC } from '../main.nf' addParams( options: [ publish_dir:'test_multi' ] ) - -/* - * Test with single-end data - */ -workflow test_multi { - - def input = [] - input = [ - file("${baseDir}/input/test_1_fastqc.html", checkIfExists: true), - file("${baseDir}/input/test_2_fastqc.html", checkIfExists: true), - file("${baseDir}/input/test_1_fastqc.zip", checkIfExists: true), - file("${baseDir}/input/test_2_fastqc.zip", checkIfExists: true) - ] - - MULTIQC ( input ) -} - -workflow { - test_multi() -} diff --git a/software/multiqc/test/nextflow.config b/software/multiqc/test/nextflow.config deleted file mode 100644 index 4149feea..00000000 --- a/software/multiqc/test/nextflow.config +++ /dev/null @@ -1,20 +0,0 @@ - -params { - outdir = "output/" - publish_dir_mode = "copy" - enable_conda = false -} - -profiles { - conda { - params.enable_conda = true - } - docker { - docker.enabled = true - docker.runOptions = '-u \$(id -u):\$(id -g)' - } - singularity { - singularity.enabled = true - singularity.autoMounts = true - } -} diff --git a/tests/software/multiqc/main.nf b/tests/software/multiqc/main.nf new file mode 100644 index 00000000..54fb78ed --- /dev/null +++ b/tests/software/multiqc/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MULTIQC } from '../../../software/multiqc/main.nf' addParams(options: [publish_dir: 'test_multiqc']) + + +workflow test_multiqc { + + def input = [] + + input = [[id: 'test'], // meta map + [file("${launchDir}/tests/data/fastqc/test_1.fastq.html", checkIfExists: true), + file("${launchDir}/tests/data/fastqc/test_1.fastq.zip", checkIfExists: true), + file("${launchDir}/tests/data/fastqc/test_2.fastq.html", checkIfExists: true), + file("${launchDir}/tests/data/fastqc/test_2.fastq.zip", checkIfExists: true)]] + + MULTIQC(input) +} diff --git a/tests/software/multiqc/test.yml b/tests/software/multiqc/test.yml new file mode 100644 index 00000000..664b524e --- /dev/null +++ b/tests/software/multiqc/test.yml @@ -0,0 +1,9 @@ +- name: Run multiqc test workflow + command: nextflow run ./tests/software/multiqc/ -profile docker -entry test_multiqc -c tests/config/nextflow.config + tags: + - multiqc + files: + - path: output/test_multiqc/test_fastqc.html + md5sum: 7027e72c3e55292c1567f12e02565e3b + - path: output/test_multiqc/test_fastqc.html + md5sum: 7027e72c3e55292c1567f12e02565e3b