From b480bb478ec500b7a2c6f89a5cdea6d8fb085c33 Mon Sep 17 00:00:00 2001 From: taranewman Date: Wed, 20 Nov 2024 11:31:13 -0800 Subject: [PATCH 1/4] remove testing num isolates within snippy core module --- main.nf | 9 +++------ modules/gubbins.nf | 3 --- modules/snippy_core.nf | 9 +-------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/main.nf b/main.nf index ee30ed6..744c847 100644 --- a/main.nf +++ b/main.nf @@ -34,12 +34,9 @@ workflow { if (!params.skip_gubbins) { - gubbins(snippy_core.out.clean_full_alignment, snippy_core.out.run_gubbins) - if (snippy_core.out.run_gubbins == "true") { - ch_alignment = gubbins.out.filtered_polymorphic_sites - } else { - ch_alignment = snippy_core.out.clean_full_alignment - } + gubbins(snippy_core.out.clean_full_alignment) + ch_alignment = gubbins.out.filtered_polymorphic_sites + } else { ch_alignment = snippy_core.out.clean_full_alignment } diff --git a/modules/gubbins.nf b/modules/gubbins.nf index b1de688..5f04078 100644 --- a/modules/gubbins.nf +++ b/modules/gubbins.nf @@ -6,15 +6,12 @@ process gubbins { input: path(alignment) - val(run_gubbins) output: path('gubbins.filtered_polymorphic_sites.fasta'), emit: filtered_polymorphic_sites path('gubbins.recombination_predictions.gff'), emit: recombination_predictions_gff path('gubbins.per_branch_statistics.tsv'), emit: per_branch_statistics - when: - run_gubbins == "true" script: """ diff --git a/modules/snippy_core.nf b/modules/snippy_core.nf index b521c6d..1edb064 100644 --- a/modules/snippy_core.nf +++ b/modules/snippy_core.nf @@ -12,10 +12,10 @@ process snippy_core { path('core.tsv'), emit: core_stats path('core.full.aln'), emit: full_alignment path('clean.full.aln'), emit: clean_full_alignment - val('run_gubbins'), emit: run_gubbins script: + """ snippy-core \ --ref ${ref} \ @@ -26,13 +26,6 @@ process snippy_core { add_percent_used.py core.txt > core.tsv - num_isolates=\$(echo "\$snippy_dirs" | tr -s ' ' | wc -w) - if [ "\$num_isolates" -ge 3 ]; then - run_gubbins='true' - else - run_gubbins='false' - fi - """ } From 809fdaeba07c0908916856cfebedb2f7869c8248 Mon Sep 17 00:00:00 2001 From: taranewman Date: Wed, 20 Nov 2024 11:33:50 -0800 Subject: [PATCH 2/4] correct pipeline name in readme --- README.md | 2 +- modules/snippy_core.nf | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ad6f5f..c7c5eb8 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Note: the process WITHOUT gubbins occurs if --skip_gubbins is true, or if there ## Usage ``` -nextflow run BCCDC-PHL/snippy-phylogenomics-nf \ +nextflow run BCCDC-PHL/snippy-core-phylogenomics \ --snippy_dirs \ --ref ref.fa \ [--mask mask.bed] \ diff --git a/modules/snippy_core.nf b/modules/snippy_core.nf index 1edb064..9408ccb 100644 --- a/modules/snippy_core.nf +++ b/modules/snippy_core.nf @@ -15,7 +15,6 @@ process snippy_core { script: - """ snippy-core \ --ref ${ref} \ From e2f3d15ac97eb5e9a8dec5a16ff1573f7f9d2896 Mon Sep 17 00:00:00 2001 From: taranewman Date: Wed, 20 Nov 2024 11:34:50 -0800 Subject: [PATCH 3/4] remove defaults --- environments/environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environments/environment.yml b/environments/environment.yml index 8b206d6..6c72e7d 100644 --- a/environments/environment.yml +++ b/environments/environment.yml @@ -2,7 +2,6 @@ name: snippy-phylogenomics channels: - conda-forge - bioconda - - defaults dependencies: - python - snippy=4.6.0 From 1b7d5c149240f9180e07392ba386473c62b27a8c Mon Sep 17 00:00:00 2001 From: taranewman Date: Wed, 20 Nov 2024 12:55:44 -0800 Subject: [PATCH 4/4] restore defaults due to conda issue --- environments/environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environments/environment.yml b/environments/environment.yml index 6c72e7d..8b206d6 100644 --- a/environments/environment.yml +++ b/environments/environment.yml @@ -2,6 +2,7 @@ name: snippy-phylogenomics channels: - conda-forge - bioconda + - defaults dependencies: - python - snippy=4.6.0