From 3ff8de2a2670904f79f85e179e255dfec349f0d5 Mon Sep 17 00:00:00 2001 From: Adam Rosenbaum Date: Fri, 29 Nov 2024 08:34:22 +0100 Subject: [PATCH] Fix longread hostremoval, and fix --longread_percentidentiy parameter in config --- conf/modules.config | 2 +- subworkflows/local/longread_hostremoval.nf | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index a1b3b1f4..90eca6f0 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -620,7 +620,7 @@ process { } withName: METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS { - ext.args = { meta.assembler in ['FLYE', 'METAMDBG'] ? "--percentIdentity ${params.longred_percentidentity}" : '' } + ext.args = { meta.assembler in ['FLYE', 'METAMDBG'] ? "--percentIdentity ${params.longread_percentidentity}" : '' } publishDir = [path: { "${params.outdir}/GenomeBinning/depths/contigs" }, mode: params.publish_dir_mode, pattern: '*-depth.txt.gz'] ext.prefix = { "${meta.assembler}-${meta.id}-depth" } } diff --git a/subworkflows/local/longread_hostremoval.nf b/subworkflows/local/longread_hostremoval.nf index 4a43e7f7..a8c8bcd5 100644 --- a/subworkflows/local/longread_hostremoval.nf +++ b/subworkflows/local/longread_hostremoval.nf @@ -19,8 +19,9 @@ workflow LONGREAD_HOSTREMOVAL { ch_versions = Channel.empty() ch_multiqc_files = Channel.empty() + ch_host_reference = reference.map { [ [:], it ] } - ch_minimap2_index = MINIMAP2_HOST_INDEX ( [ [], reference ] ).index + ch_minimap2_index = MINIMAP2_HOST_INDEX ( ch_host_reference ).index ch_versions = ch_versions.mix( MINIMAP2_HOST_INDEX.out.versions ) MINIMAP2_HOST_ALIGN ( reads, ch_minimap2_index, true, 'bai', false, false ) @@ -45,7 +46,7 @@ workflow LONGREAD_HOSTREMOVAL { bam_bai = MINIMAP2_HOST_ALIGN.out.bam .join(SAMTOOLS_HOSTREMOVED_INDEX.out.bai) - SAMTOOLS_HOSTREMOVED_STATS ( bam_bai, [[],reference] ) + SAMTOOLS_HOSTREMOVED_STATS ( bam_bai, ch_host_reference ) ch_versions = ch_versions.mix(SAMTOOLS_HOSTREMOVED_STATS.out.versions.first()) ch_multiqc_files = ch_multiqc_files.mix( SAMTOOLS_HOSTREMOVED_STATS.out.stats )