From e76b299705152e6ef3015658507cf78213818194 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 26 Jul 2022 08:18:54 +0000 Subject: [PATCH] Start working getting kraken and centrifuge working in MQC --- assets/multiqc_config.yml | 32 ++++++++++++++++++++++++++++++++ conf/modules.config | 6 +++--- subworkflows/local/profiling.nf | 3 ++- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 438fb42..00e09c5 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -13,3 +13,35 @@ export_plots: true custom_logo: "nf-core-taxprofiler_logo_custom_light.png" custom_logo_url: https://nf-co.re/taxprofiler custom_logo_title: "nf-core/taxprofiler" + +run_modules: + - fastqc + - adapterRemoval + - fastp + - bowtie2 + - kraken + - malt + +#extra_fn_clean_exts: +# - '_fastp' +# - '.pe.settings' +# - '.se.settings' + +top_modules: + - 'fastqc': + name: "FastQC (pre-processing)" + path_filters: + - '*_raw.zip' + - 'fastp' + - 'fastqc': + name: "FastQC (post-processing)" + path_filters: + - '*_processed.zip' + - 'kraken': + name: "Kraken" + path_filters: + - '*kraken.report' + - 'kraken': + name: Centrifuge" + path_filters: + - '*centrifuge.kreport' diff --git a/conf/modules.config b/conf/modules.config index 1558a98..ea2f487 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -285,7 +285,7 @@ process { withName: KRAKEN2_KRAKEN2 { ext.args = { "${meta.db_params}" } - ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } + ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}.kraken" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}.kraken" } publishDir = [ path: { "${params.outdir}/kraken2/${meta.db_name}" }, mode: params.publish_dir_mode, @@ -343,12 +343,12 @@ process { pattern: '*.{txt,sam,gz}' ] ext.args = { "${meta.db_params}" } - ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } + ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}.centrifuge" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}.centrifuge" } } withName: CENTRIFUGE_KREPORT { ext.args = { "${meta.db_params}" } - ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } + ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}.centrifuge" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}.centrifuge" } publishDir = [ path: { "${params.outdir}/centrifuge/${meta.db_name}" }, mode: params.publish_dir_mode, diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf index 7c2c90c..921f291 100644 --- a/subworkflows/local/profiling.nf +++ b/subworkflows/local/profiling.nf @@ -127,7 +127,7 @@ workflow PROFILING { } KRAKEN2_KRAKEN2 ( ch_input_for_kraken2.reads, ch_input_for_kraken2.db, params.kraken2_save_reads, params.kraken2_save_readclassification ) - ch_multiqc_files = ch_multiqc_files.mix( KRAKEN2_KRAKEN2.out.report.collect{it[1]}.ifEmpty([]) ) + ch_multiqc_files = ch_multiqc_files.mix( KRAKEN2_KRAKEN2.out.report ) ch_versions = ch_versions.mix( KRAKEN2_KRAKEN2.out.versions.first() ) ch_raw_classifications = ch_raw_classifications.mix( KRAKEN2_KRAKEN2.out.classified_reads_assignment ) ch_raw_profiles = ch_raw_profiles.mix( KRAKEN2_KRAKEN2.out.report ) @@ -152,6 +152,7 @@ workflow PROFILING { ch_versions = ch_versions.mix( CENTRIFUGE_CENTRIFUGE.out.versions.first() ) ch_raw_classifications = ch_raw_classifications.mix( CENTRIFUGE_CENTRIFUGE.out.results ) ch_raw_profiles = ch_raw_profiles.mix( CENTRIFUGE_KREPORT.out.kreport ) + ch_multiqc_files = ch_multiqc_files.mix( CENTRIFUGE_KREPORT.out.kreport ) }