From 84c0bda00e46a356c5eae852a6c8a3f9b64865fc Mon Sep 17 00:00:00 2001 From: Abhinav Sharma Date: Thu, 3 Dec 2020 09:42:34 +0530 Subject: [PATCH] Apply suggestions from code review by @Emiller88 --- tests/software/fastqc/main.nf | 13 +++++++++---- tests/software/multiqc/main.nf | 14 ++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/software/fastqc/main.nf b/tests/software/fastqc/main.nf index 597d56f6..7885c903 100644 --- a/tests/software/fastqc/main.nf +++ b/tests/software/fastqc/main.nf @@ -23,9 +23,14 @@ workflow test_single_end { workflow test_paired_end { def input = [] - input = [ [ id:'test', single_end:false ], // meta map - [ file("${launchDir}/tests/data/fastq/rna/test_R1.fastq.gz", checkIfExists: true), - file("${launchDir}/tests/data/fastq/rna/test_R2.fastq.gz", checkIfExists: true) ] ] + input = [[id: 'test', single_end: false], // meta map + [file("${launchDir}/tests/data/fastq/rna/test_R1.fastq.gz", checkIfExists: true), + file("${launchDir}/tests/data/fastq/rna/test_R2.fastq.gz", checkIfExists: true)]] + + FASTQC_PE(input) + + emit: + html = FASTQC_PE.out.html + zip = FASTQC_PE.out.zip - FASTQC_PE ( input ) } diff --git a/tests/software/multiqc/main.nf b/tests/software/multiqc/main.nf index 9ff15f27..a6ff0082 100644 --- a/tests/software/multiqc/main.nf +++ b/tests/software/multiqc/main.nf @@ -3,17 +3,15 @@ nextflow.enable.dsl = 2 include { MULTIQC } from '../../../software/multiqc/main.nf' addParams(options: [publish_dir: 'test_multiqc']) - +include { test_paired_end } from '../fastqc/main.nf' addParams( options: [ publish_dir:'test_paired_end' ] ) workflow test_multiqc { + test_paired_end() - def input = [] - - input = [[id: 'test'], // meta map - [file("${launchDir}/tests/data/fastqc/test_1_fastqc.html", checkIfExists: true), - file("${launchDir}/tests/data/fastqc/test_1_fastqc.zip", checkIfExists: true), - file("${launchDir}/tests/data/fastqc/test_2_fastqc.html", checkIfExists: true), - file("${launchDir}/tests/data/fastqc/test_2_fastqc.zip", checkIfExists: true)]] + input = [ + [id: 'test'], + test_paired_end.out.html.join(test_paired_end.out.zip, by: 0).flatten().filter(java.nio.file.Path).toList() + ] MULTIQC(input) }