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

style: use map addition instead of cloning

This commit is contained in:
Moritz E. Beber 2023-03-07 13:40:21 +01:00
parent d17dce5590
commit 07db3c93e2

View file

@ -20,12 +20,7 @@ workflow LONGREAD_PREPROCESSING {
PORECHOP_PORECHOP ( reads ) PORECHOP_PORECHOP ( reads )
ch_processed_reads = PORECHOP_PORECHOP.out.reads ch_processed_reads = PORECHOP_PORECHOP.out.reads
.map { .map { meta, reads -> [ meta + [single_end: 1], reads ] }
meta, reads ->
def meta_new = meta.clone()
meta_new['single_end'] = 1
[ meta_new, reads ]
}
ch_versions = ch_versions.mix(PORECHOP_PORECHOP.out.versions.first()) ch_versions = ch_versions.mix(PORECHOP_PORECHOP.out.versions.first())
ch_multiqc_files = ch_multiqc_files.mix( PORECHOP_PORECHOP.out.log ) ch_multiqc_files = ch_multiqc_files.mix( PORECHOP_PORECHOP.out.log )
@ -39,12 +34,7 @@ workflow LONGREAD_PREPROCESSING {
} else { } else {
PORECHOP_PORECHOP ( reads ) PORECHOP_PORECHOP ( reads )
ch_clipped_reads = PORECHOP_PORECHOP.out.reads ch_clipped_reads = PORECHOP_PORECHOP.out.reads
.map { .map { meta, reads -> [ meta + [single_end: 1], reads ] }
meta, reads ->
def meta_new = meta.clone()
meta_new['single_end'] = 1
[ meta_new, reads ]
}
ch_processed_reads = FILTLONG ( ch_clipped_reads.map { meta, reads -> [meta, [], reads ] } ).reads ch_processed_reads = FILTLONG ( ch_clipped_reads.map { meta, reads -> [meta, [], reads ] } ).reads