Skip to content

Commit

Permalink
Fix longread hostremoval, and fix --longread_percentidentiy parameter…
Browse files Browse the repository at this point in the history
… in config
  • Loading branch information
muabnezor committed Nov 29, 2024
1 parent 038a87b commit 3ff8de2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
}
Expand Down
5 changes: 3 additions & 2 deletions subworkflows/local/longread_hostremoval.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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 )

Expand Down

0 comments on commit 3ff8de2

Please sign in to comment.