Skip to content

Commit

Permalink
Include MultiQC report for deduplicated fastqs
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Jan 26, 2024
1 parent e707e28 commit a001dbf
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
18 changes: 18 additions & 0 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

13 changes: 13 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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" },
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion subworkflows/local/umi_dedup.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
2 changes: 2 additions & 0 deletions workflows/smrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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([]))
Expand Down

0 comments on commit a001dbf

Please sign in to comment.