Skip to content

Commit

Permalink
Merge pull request #23 from CCBR/filteralign-no-index
Browse files Browse the repository at this point in the history
refactor: don't run index after samtools view
  • Loading branch information
kelly-sovacool authored Oct 24, 2023
2 parents 432ebfc + 13455c8 commit 3f41ae3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
9 changes: 3 additions & 6 deletions modules/CCBR/samtools/filteraligned/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ process SAMTOOLS_FILTERALIGNED {
tuple val(meta), path(bam), path(bai)

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

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

stub:
"""
touch ${meta.id}.unaligned.bam ${meta.id}.unaligned.bam.bai versions.yml
touch ${meta.id}.unaligned.bam versions.yml
"""
}
2 changes: 1 addition & 1 deletion tests/config/test_data_CCBR.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
params {
test_data_base = 'https://raw.githubusercontent.com/CCBR/nf-modules/filter-blacklist-subwf/'
test_data_base = 'https://raw.githubusercontent.com/CCBR/nf-modules/main/'

test_data {
test_1_fastq_gz = "${params.test_data_base}/data/genomics/sarscov2/illumina/fastq/test_1.fastq.gz"
Expand Down
5 changes: 0 additions & 5 deletions tests/modules/CCBR/samtools/filteraligned/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
files:
- path: output/bwa/test.bam
md5sum: 33be5394f2873956dcac679d78c7e559
- path: output/bwa/test.bam.bai
md5sum: 9965a3eaf16130c34ded277653b3811f
- path: output/bwa/versions.yml
- path: output/samtools/test.unaligned.bam
md5sum: 60121474c99a15d030b866f459e83a88
Expand All @@ -21,8 +19,6 @@
files:
- path: output/bwa/test.bam
md5sum: 319a128e8959023f52490030b5ee457c
- path: output/bwa/test.bam.bai
md5sum: 55703b9bdf1b9816853dd5222c31fc2e
- path: output/bwa/versions.yml
- path: output/samtools/test.unaligned.bam
md5sum: 029fb4355a96008d6b30c0dcc0f210cb
Expand All @@ -35,7 +31,6 @@
- samtools
files:
- path: output/bwa/test.bam
- path: output/bwa/test.bam.bai
- path: output/bwa/versions.yml
- path: output/samtools/test.unaligned.bam
- path: output/samtools/versions.yml

0 comments on commit 3f41ae3

Please sign in to comment.