From ec5e4f0af63bf5d319a74074c8b1bd825be2a9dc Mon Sep 17 00:00:00 2001 From: taranewman Date: Thu, 5 Dec 2024 13:44:34 -0800 Subject: [PATCH 1/3] make gubbins flexible --- main.nf | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/main.nf b/main.nf index 4b3fa66..c5651b3 100644 --- a/main.nf +++ b/main.nf @@ -65,16 +65,17 @@ workflow { // The basic idea is to build up a channel with the following structure: // [provenance_file_1.yml, provenance_file_2.yml, provenance_file_3.yml...]] // ...and then concatenate them all together in the 'collect_provenance' process. - ch_pipeline_prov = pipeline_provenance.out - ch_snippy_prov = snippy_core.out.provenance - ch_gubbins_prov = gubbins.out.provenance - ch_snp_sites_prov = snp_sites.out.provenance - ch_iqtree_prov = iqtree.out.provenance - ch_shiptv_prov = shiptv.out.provenance // Now, combine these channels in the desired order if (!params.skip_gubbins) { + ch_pipeline_prov = pipeline_provenance.out + ch_snippy_prov = snippy_core.out.provenance + ch_gubbins_prov = gubbins.out.provenance + ch_snp_sites_prov = snp_sites.out.provenance + ch_iqtree_prov = iqtree.out.provenance + ch_shiptv_prov = shiptv.out.provenance + ch_provenance = ch_pipeline_prov .concat(ch_snippy_prov) .concat(ch_gubbins_prov) @@ -84,6 +85,12 @@ workflow { .collect() } else { + ch_pipeline_prov = pipeline_provenance.out + ch_snippy_prov = snippy_core.out.provenance + ch_snp_sites_prov = snp_sites.out.provenance + ch_iqtree_prov = iqtree.out.provenance + ch_shiptv_prov = shiptv.out.provenance + ch_provenance = ch_pipeline_prov .concat(ch_snippy_prov) .concat(ch_snp_sites_prov) From 81d5d00f40db2b6809cc59dcd60497c56631df55 Mon Sep 17 00:00:00 2001 From: taranewman Date: Thu, 5 Dec 2024 13:53:41 -0800 Subject: [PATCH 2/3] put only gubbins in if statement --- main.nf | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/main.nf b/main.nf index c5651b3..452550a 100644 --- a/main.nf +++ b/main.nf @@ -68,13 +68,14 @@ workflow { // Now, combine these channels in the desired order + ch_pipeline_prov = pipeline_provenance.out + ch_snippy_prov = snippy_core.out.provenance + ch_snp_sites_prov = snp_sites.out.provenance + ch_iqtree_prov = iqtree.out.provenance + ch_shiptv_prov = shiptv.out.provenance + if (!params.skip_gubbins) { - ch_pipeline_prov = pipeline_provenance.out - ch_snippy_prov = snippy_core.out.provenance ch_gubbins_prov = gubbins.out.provenance - ch_snp_sites_prov = snp_sites.out.provenance - ch_iqtree_prov = iqtree.out.provenance - ch_shiptv_prov = shiptv.out.provenance ch_provenance = ch_pipeline_prov .concat(ch_snippy_prov) @@ -85,12 +86,6 @@ workflow { .collect() } else { - ch_pipeline_prov = pipeline_provenance.out - ch_snippy_prov = snippy_core.out.provenance - ch_snp_sites_prov = snp_sites.out.provenance - ch_iqtree_prov = iqtree.out.provenance - ch_shiptv_prov = shiptv.out.provenance - ch_provenance = ch_pipeline_prov .concat(ch_snippy_prov) .concat(ch_snp_sites_prov) From 1ff7f24c5abbb62749f32b9f98473b406c450f25 Mon Sep 17 00:00:00 2001 From: taranewman Date: Thu, 5 Dec 2024 13:55:20 -0800 Subject: [PATCH 3/3] update comment --- main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.nf b/main.nf index 452550a..7c61edc 100644 --- a/main.nf +++ b/main.nf @@ -66,14 +66,14 @@ workflow { // [provenance_file_1.yml, provenance_file_2.yml, provenance_file_3.yml...]] // ...and then concatenate them all together in the 'collect_provenance' process. -// Now, combine these channels in the desired order - ch_pipeline_prov = pipeline_provenance.out ch_snippy_prov = snippy_core.out.provenance ch_snp_sites_prov = snp_sites.out.provenance ch_iqtree_prov = iqtree.out.provenance ch_shiptv_prov = shiptv.out.provenance +// Add gubbins output if applicable and combine these channels in the desired order + if (!params.skip_gubbins) { ch_gubbins_prov = gubbins.out.provenance