From 223077e5a665e7374f317733fb3756db7774ff39 Mon Sep 17 00:00:00 2001 From: FelixKrueger Date: Tue, 17 Mar 2020 21:46:21 +0000 Subject: [PATCH 1/3] MultiQC module and test workflow --- tools/multiqc/main.nf | 32 ++++++++++++++++++++++ tools/multiqc/test/main.nf | 44 ++++++++++++++++++++++++++++++ tools/multiqc/test/nextflow.config | 2 ++ 3 files changed, 78 insertions(+) create mode 100644 tools/multiqc/main.nf create mode 100755 tools/multiqc/test/main.nf create mode 100644 tools/multiqc/test/nextflow.config diff --git a/tools/multiqc/main.nf b/tools/multiqc/main.nf new file mode 100644 index 00000000..6fe1daac --- /dev/null +++ b/tools/multiqc/main.nf @@ -0,0 +1,32 @@ +nextflow.preview.dsl=2 + +process MULTIQC { + + // tag "FastQC - $sample_id" + + input: + path (file) + val (outdir) + val (multiqc_args) + // multiqc_args are best passed into the workflow in the following manner: + // --multiqc_args="--exlude STAR --title custom_report_title" + val (verbose) + + output: + path "*html", emit: html + + publishDir "${outdir}/multiqc", + mode: "copy", overwrite: true + + script: + + if (verbose){ + println ("[MODULE] MULTIQC ARGS: " + multiqc_args) + } + + """ + module load multiqc + multiqc $multiqc_args -x work . + """ + +} \ No newline at end of file diff --git a/tools/multiqc/test/main.nf b/tools/multiqc/test/main.nf new file mode 100755 index 00000000..6e630211 --- /dev/null +++ b/tools/multiqc/test/main.nf @@ -0,0 +1,44 @@ +#!/usr/bin/env nextflow +nextflow.preview.dsl=2 + +params.outdir = "." +params.verbose = false +params.multiqc_args = '' + +// include '../../../nf-core/module_testing/check_process_outputs.nf' +include '../main.nf' + +if (params.verbose){ + println ("[WORKFLOW] MULTIQC ARGS: " + params.multiqc_args) +} + +multiqc_ch = Channel + .fromPath( ['../../../test-datasets/*trimming_report.txt','../../../test-datasets/*fastqc.zip','../../../test-datasets/*screen.txt','../../../test-datasets/*bowtie2_stats.txt'] ) + .collect() // collect() flattens all channels to single list + // .view() // view the files in the channel + + +// Run the workflow +workflow { + + main: + // This is an example workflow for real reads aligned with Bowtie2. Just for illustration purposes + + // FASTQC (file_ch, params.outdir, params.fastqc_args, params.verbose) + // FASTQ_SCREEN (file_ch, params.outdir, params.fastq_screen_args, params.verbose) + // TRIM_GALORE (file_ch, params.outdir, params.trim_galore_args, params.verbose) + // FASTQC2 (TRIM_GALORE.out.reads, params.outdir, params.fastqc_args, params.verbose) + // BOWTIE2 (TRIM_GALORE.out.reads, params.outdir, params.bowtie2_args, params.verbose) + + // merging channels for MultiQC + // multiqc_ch = FASTQC.out.report.mix( + // TRIM_GALORE.out.report, + // FASTQ_SCREEN.out.report, + // FASTQC2.out.report, + // BOWTIE2.out.stats, + // ).collect() + + MULTIQC (multiqc_ch, params.outdir, params.multiqc_args, params.verbose) + + // .check_output() TODO +} \ No newline at end of file diff --git a/tools/multiqc/test/nextflow.config b/tools/multiqc/test/nextflow.config new file mode 100644 index 00000000..63c458ca --- /dev/null +++ b/tools/multiqc/test/nextflow.config @@ -0,0 +1,2 @@ +// docker.enabled = true +params.outdir = './results' From 974c6168d6dd45bdc505234117e505adaa417966 Mon Sep 17 00:00:00 2001 From: FelixKrueger Date: Wed, 18 Mar 2020 10:06:38 +0000 Subject: [PATCH 2/3] Added short description of MultiQC --- tools/multiqc/meta.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tools/multiqc/meta.yml diff --git a/tools/multiqc/meta.yml b/tools/multiqc/meta.yml new file mode 100644 index 00000000..04e9ca42 --- /dev/null +++ b/tools/multiqc/meta.yml @@ -0,0 +1,26 @@ +name: MultiQC +description: Aggregate results from bioinformatics analyses across many samples into a single report +keywords: + - QC + - bioinformatics tools + - Beautiful stand-alone HTML report +tools: + - fastqc: + description: | + MultiQC searches a given directory for analysis logs and compiles a HTML report. + It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. + homepage: https://multiqc.info/ + documentation: https://multiqc.info/docs/ +input: + - + - reads: + type: file + description: List of report file(s) +output: + - + - multiqc_report: + type: file + description: MultiQC report + pattern: *multiqc*.html +authors: + - @FelixKrueger From 5aaacf8173c5f3fce1961bfffef307b0a6164596 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sat, 11 Jul 2020 13:25:51 +0200 Subject: [PATCH 3/3] Update tools/multiqc/main.nf --- tools/multiqc/main.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/multiqc/main.nf b/tools/multiqc/main.nf index 6fe1daac..493497c1 100644 --- a/tools/multiqc/main.nf +++ b/tools/multiqc/main.nf @@ -25,8 +25,7 @@ process MULTIQC { } """ - module load multiqc multiqc $multiqc_args -x work . """ -} \ No newline at end of file +}