Skip to content

Commit

Permalink
refactor: Allow mixing kaiju and kraken results
Browse files Browse the repository at this point in the history
  • Loading branch information
jvfe committed Mar 31, 2024
1 parent 86952b5 commit 82059cf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions subworkflows/local/taxonomy.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ workflow TAXONOMY {

main:

tax_report = Channel.empty()
krona_input = Channel.empty()
ch_versions = Channel.empty()

if (params.run_kaiju) {
Expand All @@ -35,10 +37,10 @@ workflow TAXONOMY {
"species"
)

KAIJU_KAIJU2TABLE.out.summary.set { tax_report }
tax_report = tax_report.mix(KAIJU_KAIJU2TABLE.out.summary)

KAIJU_KAIJU2KRONA (kaiju_out, kaiju_db_files)
KAIJU_KAIJU2KRONA.out.txt.set { krona_input }
krona_input = krona_input.mix(KAIJU_KAIJU2KRONA.out.txt)
ch_versions = ch_versions.mix(KAIJU_KAIJU2KRONA.out.versions)
}

Expand All @@ -49,13 +51,13 @@ workflow TAXONOMY {
false,
false
)
KRAKEN2_KRAKEN2.out.report.set { tax_report }
tax_report = tax_report.mix(KRAKEN2_KRAKEN2.out.report)
ch_versions = ch_versions.mix(KRAKEN2_KRAKEN2.out.versions.first())

KRAKENTOOLS_KREPORT2KRONA (
tax_report
KRAKEN2_KRAKEN2.out.report
)
KRAKENTOOLS_KREPORT2KRONA.out.txt.set { krona_input }
krona_input = krona_input.mix(KRAKENTOOLS_KREPORT2KRONA.out.txt)
ch_versions = ch_versions.mix(KRAKENTOOLS_KREPORT2KRONA.out.versions.first())
}

Expand Down

0 comments on commit 82059cf

Please sign in to comment.