Skip to content

Commit

Permalink
Merge pull request #17 from BCCDC-PHL/fix_gubbins
Browse files Browse the repository at this point in the history
remove testing num isolates within snippy core module
  • Loading branch information
dfornika authored Nov 20, 2024
2 parents 73352f2 + 1b7d5c1 commit 7db39c6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 </path/to/snippy_output_dirs> \
--ref ref.fa \
[--mask mask.bed] \
Expand Down
9 changes: 3 additions & 6 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 0 additions & 3 deletions modules/gubbins.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down
8 changes: 0 additions & 8 deletions modules/snippy_core.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ 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:
Expand All @@ -26,13 +25,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
"""
}

0 comments on commit 7db39c6

Please sign in to comment.