1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-22 12:19:54 +00:00

refactor: make mappings explicit

This commit is contained in:
Moritz E. Beber 2022-11-29 10:14:20 +01:00
parent a383c9ae40
commit ddcf38de22

View file

@ -271,17 +271,14 @@ workflow PROFILING {
ch_input_for_krakenuniq = ch_input_for_profiling.krakenuniq ch_input_for_krakenuniq = ch_input_for_profiling.krakenuniq
.map { .map {
meta, reads, db_meta, db -> meta, reads, db_meta, db ->
def meta_new = [:] [[single_end: meta.single_end], reads, db_meta, db]
meta_new['single_end'] = meta['single_end']
[meta_new, reads, db_meta, db]
} }
.groupTuple(by: [0,2,3]) .groupTuple(by: [0,2,3])
.dump(tag: "krakenuniq_premultimap") .dump(tag: "krakenuniq_premultimap")
.multiMap { .multiMap {
it -> single_meta, reads, db_meta, db ->
reads: [ it[0] + it[2], it[1] ] reads: [ single_meta + db_meta, reads.flatten() ]
db: it[3] db: db
} }
// Hardcode to _always_ produce the report file (which is our basic otput, and goes into) // Hardcode to _always_ produce the report file (which is our basic otput, and goes into)
KRAKENUNIQ_PRELOADEDKRAKENUNIQ ( ch_input_for_krakenuniq.reads.dump(tag: "krakenuniq_input"), ch_input_for_krakenuniq.db.dump(tag: "krakenuniq_db"), params.krakenuniq_ram_chunk_size, params.krakenuniq_save_reads, true, params.krakenuniq_save_readclassifications ) KRAKENUNIQ_PRELOADEDKRAKENUNIQ ( ch_input_for_krakenuniq.reads.dump(tag: "krakenuniq_input"), ch_input_for_krakenuniq.db.dump(tag: "krakenuniq_db"), params.krakenuniq_ram_chunk_size, params.krakenuniq_save_reads, true, params.krakenuniq_save_readclassifications )