mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-23 11:49:55 +00:00
feat: introduce sample batches for krakenuniq
This commit is contained in:
parent
b299a25bc7
commit
70dd7cade9
2 changed files with 15 additions and 10 deletions
|
@ -125,6 +125,7 @@ params {
|
||||||
krakenuniq_ram_chunk_size = '16G'
|
krakenuniq_ram_chunk_size = '16G'
|
||||||
krakenuniq_save_reads = false // added directly to module in profiling.nf
|
krakenuniq_save_reads = false // added directly to module in profiling.nf
|
||||||
krakenuniq_save_readclassifications = false // added directly to module in profiling.nf
|
krakenuniq_save_readclassifications = false // added directly to module in profiling.nf
|
||||||
|
krakenuniq_batch_size = 20
|
||||||
|
|
||||||
// Bracken
|
// Bracken
|
||||||
run_bracken = false
|
run_bracken = false
|
||||||
|
|
|
@ -315,16 +315,20 @@ workflow PROFILING {
|
||||||
|
|
||||||
if ( params.run_krakenuniq ) {
|
if ( params.run_krakenuniq ) {
|
||||||
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 ->
|
||||||
[[id: db_meta.db_name, single_end: meta.single_end], reads, db_meta, db]
|
[[id: db_meta.db_name, single_end: meta.single_end], reads, db_meta, db]
|
||||||
}
|
}
|
||||||
.groupTuple(by: [0,2,3])
|
.groupTuple(by: [0,2,3])
|
||||||
.multiMap {
|
.flatMap { single_meta, reads, db_meta, db ->
|
||||||
single_meta, reads, db_meta, db ->
|
def batches = reads.collate(params.krakenuniq_batch_size)
|
||||||
reads: [ single_meta + db_meta, reads.flatten() ]
|
return batches.colect { batch -> [ single_meta + db_meta, batch.flatten(), db ]}
|
||||||
db: db
|
}
|
||||||
}
|
.multiMap {
|
||||||
|
meta, reads, db ->
|
||||||
|
reads: [ meta, reads ]
|
||||||
|
db: db
|
||||||
|
}
|
||||||
// Hardcode to _always_ produce the report file (which is our basic output, and goes into)
|
// Hardcode to _always_ produce the report file (which is our basic output, and goes into)
|
||||||
KRAKENUNIQ_PRELOADEDKRAKENUNIQ ( ch_input_for_krakenuniq.reads, ch_input_for_krakenuniq.db, params.krakenuniq_ram_chunk_size, params.krakenuniq_save_reads, true, params.krakenuniq_save_readclassifications )
|
KRAKENUNIQ_PRELOADEDKRAKENUNIQ ( ch_input_for_krakenuniq.reads, ch_input_for_krakenuniq.db, params.krakenuniq_ram_chunk_size, params.krakenuniq_save_reads, true, params.krakenuniq_save_readclassifications )
|
||||||
ch_multiqc_files = ch_multiqc_files.mix( KRAKENUNIQ_PRELOADEDKRAKENUNIQ.out.report )
|
ch_multiqc_files = ch_multiqc_files.mix( KRAKENUNIQ_PRELOADEDKRAKENUNIQ.out.report )
|
||||||
|
|
Loading…
Reference in a new issue