Skip to content

Commit

Permalink
added conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
erinyoung committed Oct 17, 2023
1 parent aa3643c commit 8311517
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subworkflows/phylogenetic_analysis.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ workflow phylogenetic_analysis {
ch_organism = Channel.empty()

if (params.extras) {
ch_organism = ch_organism.mix(ch_top_hit.map { it -> tuple( it[0] , [ it[1].split("_")[0], it[1].split("_")[1]] )})
ch_organism = ch_organism.mix(ch_top_hit.map { it -> if (it) { tuple( it[0] , [ it[1].split("_")[0], it[1].split("_")[1]] )}})

if ( params.fastani_include ) {
ch_top_hit
.map { it -> if (it) { tuple( it[1].split("_", 3)[2], it[2], it[1].split("_")[0, 1]) }}
.groupTuple(by: 0)
.map { it -> tuple( it[1][0].baseName, it[1][0], it[2][0] ) }
.map { it -> if (it) { tuple( it[1][0].baseName, it[1][0], it[2][0] ) }}
.unique()
.set { ch_representative }

Expand Down

0 comments on commit 8311517

Please sign in to comment.