Skip to content

Commit

Permalink
bugfix: pair each blocklist with its BAM file
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Feb 9, 2024
1 parent ccf3f63 commit fd4f989
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/local/pacbio_filter.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ process PACBIO_FILTER {
tuple val(meta), path(txt)

output:
path("*.blocklist"), emit: list
path "versions.yml", emit: versions
tuple val(meta), path("*.blocklist"), emit: list
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand Down
11 changes: 10 additions & 1 deletion subworkflows/local/filter_pacbio.nf
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,18 @@ workflow FILTER_PACBIO {
// Create filtered BAM file
SAMTOOLS_CONVERT.out.bam
| join ( SAMTOOLS_CONVERT.out.csi )
| join ( PACBIO_FILTER.out.list )
| set { ch_reads_and_list }

ch_reads_and_list
| map { meta, bam, csi, list -> [meta, bam, csi] }
| set { ch_reads }

SAMTOOLS_FILTER ( ch_reads, [ [], [] ], PACBIO_FILTER.out.list )
ch_reads_and_list
| map { meta, bam, csi, list -> list }
| set { ch_lists }

SAMTOOLS_FILTER ( ch_reads, [ [], [] ], ch_lists )
ch_versions = ch_versions.mix ( SAMTOOLS_FILTER.out.versions.first() )


Expand Down

0 comments on commit fd4f989

Please sign in to comment.