Skip to content

Commit

Permalink
feat: index bam
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Oct 19, 2023
1 parent 6efe2f3 commit c4212df
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/CCBR/samtools/filter_aligned/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ process FILTER_ALIGNED {
tuple val(meta), path(bam), path(bai)

output:
tuple val(meta), path("*.unaligned.bam"), emit: bam
path "versions.yml" , emit: versions
tuple val(meta), path("*.unaligned.bam"), path('*.unaligned.bam.bai'), emit: bam
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -28,6 +28,9 @@ process FILTER_ALIGNED {
-b \\
-o ${prefix}.unaligned.bam \\
${prefix}.bam
samtools index \\
-@ ${task.cpus} \\
${prefix}.unaligned.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -37,6 +40,6 @@ process FILTER_ALIGNED {

stub:
"""
touch ${meta.id}.unaligned.bam versions.yml
touch ${meta.id}.unaligned.bam ${meta.id}.unaligned.bam.bai versions.yml
"""
}

0 comments on commit c4212df

Please sign in to comment.