diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index d496eea8..20ffd094 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -12,3 +12,21 @@ report_section_order: order: -1002 export_plots: true + +module_order: + - fastqc: + name: "FastQC (raw)" + info: "This section of the report shows FastQC results on the input files." + path_filters: + - "**/*.raw_fastqc.zip" + - fastqc: + name: "FastQC (trimmed)" + info: "This section of the report shows FastQC results after adapter trimming." + path_filters: + - "**/*.trim_fastqc.zip" + - fastqc: + name: "FastQC (deduplicated)" + info: "This section of the report shows FastQC results after UMI-based deduplication." + path_filters: + - "**/*.deduplicated_fastqc.zip" + diff --git a/conf/modules.config b/conf/modules.config index b57e4f92..cbd7d5d1 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -74,6 +74,8 @@ process { ] } withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { + //the prefix is required for multiqc to pickup the files separately from the other fastqc instances + ext.prefix = { "${meta.id}.raw" } ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/raw" }, @@ -82,6 +84,7 @@ process { ] } withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { + ext.prefix = { "${meta.id}.trim" } ext.args = '--quiet' publishDir = [ path: { "${params.outdir}/fastqc/trimmed" }, @@ -184,6 +187,16 @@ process { ) ] } + withName: '.*:DEDUPLICATE_UMIS:FASTQC_DEDUPLICATED' { + //the prefix is required for multiqc to pickup the files separately from the other fastqc instances + ext.prefix = { "${meta.id}.deduplicated" } + ext.args = '--quiet' + publishDir = [ + path: { "${params.outdir}/fastqc/deduplicated" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } // // MIRTRACE QC diff --git a/subworkflows/local/umi_dedup.nf b/subworkflows/local/umi_dedup.nf index 9f65fa8e..2c7b533b 100644 --- a/subworkflows/local/umi_dedup.nf +++ b/subworkflows/local/umi_dedup.nf @@ -8,6 +8,7 @@ include { BAM_SORT_STATS_SAMTOOLS } from '../../subworkflows/nf-core include { UMICOLLAPSE } from '../../modules/nf-core/umicollapse/main' include { SAMTOOLS_BAM2FQ } from '../../modules/nf-core/samtools/bam2fq/main' include { CAT_CAT } from '../../modules/nf-core/cat/cat/main' +include { FASTQC as FASTQC_DEDUPLICATED } from '../../modules/nf-core/fastqc/main' workflow DEDUPLICATE_UMIS { @@ -34,8 +35,12 @@ workflow DEDUPLICATE_UMIS { ch_dedup_reads = SAMTOOLS_BAM2FQ.out.reads + FASTQC_DEDUPLICATED(ch_dedup_reads) + emit: - reads = ch_dedup_reads + reads = ch_dedup_reads + fastqc_html = FASTQC_DEDUPLICATED.out.html + fastqc_zip = FASTQC_DEDUPLICATED.out.zip indices = bt_index versions = ch_versions } diff --git a/workflows/smrnaseq.nf b/workflows/smrnaseq.nf index 58a4e8ad..1a7b4e64 100644 --- a/workflows/smrnaseq.nf +++ b/workflows/smrnaseq.nf @@ -272,7 +272,9 @@ workflow SMRNASEQ { ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect()) ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) ch_multiqc_files = ch_multiqc_files.mix(FASTQ_FASTQC_UMITOOLS_FASTP.out.fastqc_raw_zip.collect{it[1]}.ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(FASTQ_FASTQC_UMITOOLS_FASTP.out.fastqc_trim_zip.collect{it[1]}.ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(FASTQ_FASTQC_UMITOOLS_FASTP.out.trim_json.collect{it[1]}.ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(DEDUPLICATE_UMIS.out.fastqc_zip.collect{it[1]}.ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(contamination_stats.collect().ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(genome_stats.collect({it[1]}).ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(MIRNA_QUANT.out.mature_stats.collect({it[1]}).ifEmpty([]))