diff --git a/CHANGELOG.md b/CHANGELOG.md index 0693863f..36a21226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` +- [#405] Fix database to tool mismatching in KAIJU2KRONA input (❤️ to @MajoroMask for reporting, fix by @jfy133) + ### `Dependencies` ### `Deprecated` diff --git a/subworkflows/local/visualization_krona.nf b/subworkflows/local/visualization_krona.nf index 7d8e4f01..7c3d6604 100644 --- a/subworkflows/local/visualization_krona.nf +++ b/subworkflows/local/visualization_krona.nf @@ -50,8 +50,8 @@ workflow VISUALIZATION_KRONA { Combine Kaiju profiles with their databases */ ch_input_for_kaiju2krona = ch_input_classifications.kaiju - .map{ [it[0]['db_name'], it[0], it[1]] } - .combine( databases.map{ [it[0]['db_name'], it[1]] }, by: 0 ) + .map{ meta, profiles -> [[meta['tool'], meta['db_name']], meta, profiles] } + .combine( databases.map{ meta, db -> [[meta['tool'], meta['db_name']], db] }, by: 0 ) .multiMap{ it -> profiles: [it[1], it[2]]