From cb095acca3be3244c7610de3bc1653e71116f3d4 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Tue, 26 Sep 2023 13:42:53 +0200 Subject: [PATCH 1/2] Output concatenated ffn files from Prokka --- conf/modules.config | 9 +++++++++ subworkflows/local/prokka_subsets.nf | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/conf/modules.config b/conf/modules.config index f3e90bb6..b67b15c8 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -192,6 +192,15 @@ process { ] } + withName: 'FFN_CAT' { + ext.prefix = 'prokka.ffn.gz' + publishDir = [ + path: { "${params.outdir}/prokka" }, + mode: 'copy', + pattern: "*.gz" + ] + } + withName: 'FNA_CAT' { ext.prefix = 'prokka.fna.gz' publishDir = [ diff --git a/subworkflows/local/prokka_subsets.nf b/subworkflows/local/prokka_subsets.nf index f40cb4de..aacf307c 100644 --- a/subworkflows/local/prokka_subsets.nf +++ b/subworkflows/local/prokka_subsets.nf @@ -5,6 +5,7 @@ include { PROKKA } from '../../modules/nf-core/prokka/main' include { CAT_CAT as GFF_CAT } from '../../modules/nf-core/cat/cat/main' include { CAT_CAT as FAA_CAT } from '../../modules/nf-core/cat/cat/main' +include { CAT_CAT as FFN_CAT } from '../../modules/nf-core/cat/cat/main' include { CAT_CAT as FNA_CAT } from '../../modules/nf-core/cat/cat/main' include { PROKKAGFF2TSV } from '../../modules/local/prokkagff2tsv' @@ -31,6 +32,12 @@ workflow PROKKA_SUBSETS { FAA_CAT ( ch_faa ) ch_versions = ch_versions.mix(FAA_CAT.out.versions) + contigs.map{ [ id:"${it[0].id}.prokka" ] } + .combine(PROKKA.out.ffn.collect { it[1] }.map { [ it ] }) + .set { ch_ffn } + FFN_CAT ( ch_ffn ) + ch_versions = ch_versions.mix(FFN_CAT.out.versions) + contigs.map{ [ id:"${it[0].id}.prokka" ] } .combine(PROKKA.out.fna.collect { it[1] }.map { [ it ] }) .set { ch_fna } From be351ba93589f568ab2dfc1b20e08805adeb7b70 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Tue, 26 Sep 2023 14:02:37 +0200 Subject: [PATCH 2/2] Remove concatenation of Prokka fna files --- conf/modules.config | 9 --------- subworkflows/local/prokka_subsets.nf | 9 +-------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index b67b15c8..88e09321 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -201,15 +201,6 @@ process { ] } - withName: 'FNA_CAT' { - ext.prefix = 'prokka.fna.gz' - publishDir = [ - path: { "${params.outdir}/prokka" }, - mode: 'copy', - pattern: "*.gz" - ] - } - withName: 'GFF_CAT' { ext.prefix = 'prokka.gff.gz' publishDir = [ diff --git a/subworkflows/local/prokka_subsets.nf b/subworkflows/local/prokka_subsets.nf index aacf307c..7445461e 100644 --- a/subworkflows/local/prokka_subsets.nf +++ b/subworkflows/local/prokka_subsets.nf @@ -6,7 +6,6 @@ include { PROKKA } from '../../modules/nf-core/prokka/main' include { CAT_CAT as GFF_CAT } from '../../modules/nf-core/cat/cat/main' include { CAT_CAT as FAA_CAT } from '../../modules/nf-core/cat/cat/main' include { CAT_CAT as FFN_CAT } from '../../modules/nf-core/cat/cat/main' -include { CAT_CAT as FNA_CAT } from '../../modules/nf-core/cat/cat/main' include { PROKKAGFF2TSV } from '../../modules/local/prokkagff2tsv' workflow PROKKA_SUBSETS { @@ -38,19 +37,13 @@ workflow PROKKA_SUBSETS { FFN_CAT ( ch_ffn ) ch_versions = ch_versions.mix(FFN_CAT.out.versions) - contigs.map{ [ id:"${it[0].id}.prokka" ] } - .combine(PROKKA.out.fna.collect { it[1] }.map { [ it ] }) - .set { ch_fna } - FNA_CAT ( ch_fna ) - ch_versions = ch_versions.mix(FNA_CAT.out.versions) - PROKKAGFF2TSV ( GFF_CAT.out.file_out) ch_versions = ch_versions.mix(PROKKAGFF2TSV.out.versions) emit: gff = GFF_CAT.out.file_out faa = FAA_CAT.out.file_out - fna = FNA_CAT.out.file_out + ffn = FFN_CAT.out.file_out gfftsv = PROKKAGFF2TSV.out.tsv prokka_log = ch_log versions = ch_versions