Skip to content

Commit 56a8d77

Browse files
committed
Fix up methods and versions passed to MultiQC
1 parent 7dc68d6 commit 56a8d77

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

workflows/rnaseq/main.nf

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ include { multiqcTsvFromList } from '../../subworkflows/nf-core/fast
2222
include { getStarPercentMapped } from '../../subworkflows/local/utils_nfcore_rnaseq_pipeline'
2323
include { biotypeInGtf } from '../../subworkflows/local/utils_nfcore_rnaseq_pipeline'
2424
include { getInferexperimentStrandedness } from '../../subworkflows/local/utils_nfcore_rnaseq_pipeline'
25+
include { methodsDescriptionText } from '../../subworkflows/local/utils_nfcore_rnaseq_pipeline'
2526

2627
/*
2728
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -153,7 +154,7 @@ workflow RNASEQ {
153154
)
154155

155156
ch_multiqc_files = ch_multiqc_files.mix(FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS.out.multiqc_files)
156-
ich_versions = ch_versions.mix(FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS.out.versions)
157+
ch_versions = ch_versions.mix(FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS.out.versions)
157158
ch_strand_inferred_filtered_fastq = FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS.out.reads
158159
ch_trim_read_count = FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS.out.trim_read_count
159160

@@ -717,15 +718,33 @@ workflow RNASEQ {
717718
ch_multiqc_report = Channel.empty()
718719

719720
if (!params.skip_multiqc) {
721+
722+
// Load MultiQC configuration files
720723
ch_multiqc_config = Channel.fromPath("$projectDir/workflows/rnaseq/assets/multiqc/multiqc_config.yml", checkIfExists: true)
721724
ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config) : Channel.empty()
722725
ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo) : Channel.empty()
723-
summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json")
724-
ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params))
725-
ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
726-
ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions)
727-
multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description) : file("$projectDir/workflows/rnaseq/assets/multiqc/methods_description_template.yml", checkIfExists: true)
728-
ch_multiqc_files = ch_multiqc_files.mix(Channel.from(multiqc_custom_methods_description))
726+
727+
// Prepare the workflow summary
728+
ch_workflow_summary = Channel.value(
729+
paramsSummaryMultiqc(
730+
paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json")
731+
)
732+
).collectFile(name: 'workflow_summary_mqc.yaml')
733+
734+
// Prepare the methods section
735+
ch_methods_description = Channel.value(
736+
methodsDescriptionText(
737+
params.multiqc_methods_description
738+
? file(params.multiqc_methods_description)
739+
: file("$projectDir/workflows/rnaseq/assets/multiqc/methods_description_template.yml", checkIfExists: true)
740+
)
741+
).collectFile(name: 'methods_description_mqc.yaml')
742+
743+
// Add summary, versions, and methods to the MultiQC input file list
744+
ch_multiqc_files = ch_multiqc_files
745+
.mix(ch_workflow_summary)
746+
.mix(ch_collated_versions)
747+
.mix(ch_methods_description)
729748

730749
// Provide MultiQC with rename patterns to ensure it uses sample names
731750
// for single-techrep samples not processed by CAT_FASTQ, and trims out

0 commit comments

Comments
 (0)