1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-14 17:03:08 +00:00

refactor: use shorter and more explicit syntax

This commit is contained in:
Moritz E. Beber 2022-12-04 21:54:10 +01:00
parent b2088bcbb3
commit 24e5bc5410

View file

@ -40,9 +40,7 @@ workflow SHORTREAD_ADAPTERREMOVAL {
ADAPTERREMOVAL_PAIRED.out.paired_truncated ADAPTERREMOVAL_PAIRED.out.paired_truncated
) )
.map { meta, reads -> .map { meta, reads ->
def meta_new = meta.clone() [meta + [single_end: true], reads]
meta_new.single_end = true
[meta_new, reads]
} }
.groupTuple() .groupTuple()
// Paired-end reads cause a nested tuple during grouping. // Paired-end reads cause a nested tuple during grouping.
@ -63,9 +61,7 @@ workflow SHORTREAD_ADAPTERREMOVAL {
ADAPTERREMOVAL_PAIRED.out.collapsed_truncated ADAPTERREMOVAL_PAIRED.out.collapsed_truncated
) )
.map { meta, reads -> .map { meta, reads ->
def meta_new = meta.clone() [meta + [single_end: true], reads]
meta_new.single_end = true
[meta_new, reads]
} }
.groupTuple() .groupTuple()
.map { meta, fastq -> [meta, fastq.flatten()] } .map { meta, fastq -> [meta, fastq.flatten()] }