@@ -22,6 +22,7 @@ include { multiqcTsvFromList } from '../../subworkflows/nf-core/fast
2222include { getStarPercentMapped } from ' ../../subworkflows/local/utils_nfcore_rnaseq_pipeline'
2323include { biotypeInGtf } from ' ../../subworkflows/local/utils_nfcore_rnaseq_pipeline'
2424include { 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