From eaa69b65d81b6ede5f0afca7d8f24a56b025ff08 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Wed, 13 Jul 2022 12:38:30 +0200 Subject: [PATCH 1/3] Update mOTUs profile module and mix log for multiqc --- modules.json | 2 +- modules/nf-core/modules/motus/profile/main.nf | 6 ++++-- modules/nf-core/modules/motus/profile/meta.yml | 4 ++++ subworkflows/local/profiling.nf | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/modules.json b/modules.json index 1d40748..faa267d 100644 --- a/modules.json +++ b/modules.json @@ -79,7 +79,7 @@ "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" }, "motus/profile": { - "git_sha": "6b960f0e75bbb4d5bd301cd3875fa078d0eab4d1" + "git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18" }, "multiqc": { "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" diff --git a/modules/nf-core/modules/motus/profile/main.nf b/modules/nf-core/modules/motus/profile/main.nf index 6a1acd3..bd7a127 100644 --- a/modules/nf-core/modules/motus/profile/main.nf +++ b/modules/nf-core/modules/motus/profile/main.nf @@ -15,6 +15,7 @@ process MOTUS_PROFILE { tuple val(meta), path("*.out"), emit: out tuple val(meta), path("*.bam"), optional: true, emit: bam tuple val(meta), path("*.mgc"), optional: true, emit: mgc + tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions when: @@ -36,7 +37,8 @@ process MOTUS_PROFILE { $refdb \\ -t $task.cpus \\ -n $prefix \\ - -o ${prefix}.out + -o ${prefix}.out \\ + 2> ${prefix}.log ## mOTUs version number is not available from command line. ## mOTUs save the version number in index database folder. @@ -48,7 +50,7 @@ process MOTUS_PROFILE { fi cat <<-END_VERSIONS > versions.yml "${task.process}": - mOTUs: \$VERSION + motus: \$VERSION END_VERSIONS """ } diff --git a/modules/nf-core/modules/motus/profile/meta.yml b/modules/nf-core/modules/motus/profile/meta.yml index 19803bd..3c3b660 100644 --- a/modules/nf-core/modules/motus/profile/meta.yml +++ b/modules/nf-core/modules/motus/profile/meta.yml @@ -56,6 +56,10 @@ output: type: file description: Optional intermediate mgc read count table file saved with `-M`. pattern: "*.{mgc}" + - log: + type: file + description: Standard error logging file containing summary statistics + pattern: "*.log" authors: - "@jianhong" diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf index 60963c9..0de726b 100644 --- a/subworkflows/local/profiling.nf +++ b/subworkflows/local/profiling.nf @@ -227,6 +227,7 @@ workflow PROFILING { MOTUS_PROFILE ( ch_input_for_motus.reads, ch_input_for_motus.db ) ch_versions = ch_versions.mix( MOTUS_PROFILE.out.versions.first() ) ch_raw_profiles = ch_raw_profiles.mix( MOTUS_PROFILE.out.out ) + ch_multiqc_files = ch_multiqc_files.mix( MOTUS_PROFILE.out.log ) } From 31119f83c23622783cb647577afffbdfb4f8153b Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Wed, 13 Jul 2022 14:29:47 +0200 Subject: [PATCH 2/3] Send to MQC only the log file not the meta --- subworkflows/local/profiling.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf index 0de726b..38bc9a8 100644 --- a/subworkflows/local/profiling.nf +++ b/subworkflows/local/profiling.nf @@ -227,7 +227,7 @@ workflow PROFILING { MOTUS_PROFILE ( ch_input_for_motus.reads, ch_input_for_motus.db ) ch_versions = ch_versions.mix( MOTUS_PROFILE.out.versions.first() ) ch_raw_profiles = ch_raw_profiles.mix( MOTUS_PROFILE.out.out ) - ch_multiqc_files = ch_multiqc_files.mix( MOTUS_PROFILE.out.log ) + ch_multiqc_files = ch_multiqc_files.mix( MOTUS_PROFILE.out.log.map{it[1]} ) } From 449b6a55537e85e1be45461609c8d9c0fda44bd0 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Wed, 13 Jul 2022 15:25:58 +0200 Subject: [PATCH 3/3] Fix file name output clashing wiht multiqc --- conf/modules.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/modules.config b/conf/modules.config index b858ec3..df90c38 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -391,6 +391,7 @@ process { } withName: MOTUS_PROFILE { + ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } publishDir = [ path: { "${params.outdir}/motus/${meta.db_name}" }, mode: params.publish_dir_mode