mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-24 22:19:55 +00:00
style: use map addition instead of cloning
This commit is contained in:
parent
d17dce5590
commit
07db3c93e2
1 changed files with 4 additions and 14 deletions
|
@ -20,33 +20,23 @@ workflow LONGREAD_PREPROCESSING {
|
|||
PORECHOP_PORECHOP ( reads )
|
||||
|
||||
ch_processed_reads = PORECHOP_PORECHOP.out.reads
|
||||
.map {
|
||||
meta, reads ->
|
||||
def meta_new = meta.clone()
|
||||
meta_new['single_end'] = 1
|
||||
[ meta_new, reads ]
|
||||
}
|
||||
.map { meta, reads -> [ meta + [single_end: 1], reads ] }
|
||||
|
||||
ch_versions = ch_versions.mix(PORECHOP_PORECHOP.out.versions.first())
|
||||
ch_multiqc_files = ch_multiqc_files.mix( PORECHOP_PORECHOP.out.log )
|
||||
|
||||
} else if ( params.longread_qc_skipadaptertrim && !params.longread_qc_skipqualityfilter) {
|
||||
|
||||
ch_processed_reads = FILTLONG ( reads.map{ meta, reads -> [meta, [], reads ]} )
|
||||
ch_processed_reads = FILTLONG ( reads.map { meta, reads -> [meta, [], reads ] } )
|
||||
ch_versions = ch_versions.mix(FILTLONG.out.versions.first())
|
||||
ch_multiqc_files = ch_multiqc_files.mix( FILTLONG.out.log )
|
||||
|
||||
} else {
|
||||
PORECHOP_PORECHOP ( reads )
|
||||
ch_clipped_reads = PORECHOP_PORECHOP.out.reads
|
||||
.map {
|
||||
meta, reads ->
|
||||
def meta_new = meta.clone()
|
||||
meta_new['single_end'] = 1
|
||||
[ meta_new, reads ]
|
||||
}
|
||||
.map { meta, reads -> [ meta + [single_end: 1], 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
|
||||
|
||||
ch_versions = ch_versions.mix(PORECHOP_PORECHOP.out.versions.first())
|
||||
ch_versions = ch_versions.mix(FILTLONG.out.versions.first())
|
||||
|
|
Loading…
Reference in a new issue