mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-25 23:09:55 +00:00
Add comments about MALT id replacement and refactor for simplicity
This commit is contained in:
parent
800c0dd2aa
commit
621b6a3d09
1 changed files with 12 additions and 5 deletions
|
@ -66,13 +66,20 @@ workflow PROFILING {
|
||||||
.filter { it[0]['instrument_platform'] == 'ILLUMINA' }
|
.filter { it[0]['instrument_platform'] == 'ILLUMINA' }
|
||||||
.map {
|
.map {
|
||||||
meta, reads, db_meta, db ->
|
meta, reads, db_meta, db ->
|
||||||
def sam_format = params.malt_save_reads ? ' --alignments ./ -za false' : ""
|
def new_meta = meta.clone()
|
||||||
def temp_meta = [ id: meta['db_name'] ]
|
|
||||||
def new_db_meta = db_meta.clone()
|
def new_db_meta = db_meta.clone()
|
||||||
|
|
||||||
|
// Add the saving of alignments in SAM format to params
|
||||||
|
def sam_format = params.malt_save_reads ? ' --alignments ./ -za false' : ""
|
||||||
new_db_meta['db_params'] = db_meta['db_params'] + sam_format
|
new_db_meta['db_params'] = db_meta['db_params'] + sam_format
|
||||||
def new_meta = temp_meta + new_db_meta
|
|
||||||
new_meta['id'] = new_meta['db_name']
|
// As MALT has huge databases, we don't run on a per-sample basis but multiple
|
||||||
[ new_meta, reads, db ]
|
// samples at once. This replaces the ID of the particular process with the
|
||||||
|
// db_name instead to prevent `null` in job name, and in publishDir)
|
||||||
|
def updated_meta = new_meta + new_db_meta
|
||||||
|
updated_meta['id'] = updated_meta['db_name']
|
||||||
|
|
||||||
|
[ updated_meta, reads, db ]
|
||||||
}
|
}
|
||||||
.groupTuple(by: [0,2])
|
.groupTuple(by: [0,2])
|
||||||
.multiMap {
|
.multiMap {
|
||||||
|
|
Loading…
Reference in a new issue