Skip to content

Commit

Permalink
Update stubs for samtools idxstats (nf-core#3665)
Browse files Browse the repository at this point in the history
* Update stubs

* Update stubs for samtools idxstats

---------

Co-authored-by: Ram Nanduri <ram@MTLUCMDS1.lund.skane.se>
  • Loading branch information
2 people authored and snesic committed Oct 10, 2023
1 parent f288d50 commit 3685123
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
12 changes: 12 additions & 0 deletions modules/nf-core/samtools/idxstats/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,16 @@ process SAMTOOLS_IDXSTATS {
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"

"""
touch ${prefix}.idxstats
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}
15 changes: 12 additions & 3 deletions tests/modules/nf-core/samtools/idxstats/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ include { SAMTOOLS_IDXSTATS } from '../../../../../modules/nf-core/samtools/idxs

workflow test_samtools_idxstats {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
]
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
]

SAMTOOLS_IDXSTATS ( input )
}

workflow test_samtools_idxstats_stub {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
]

SAMTOOLS_IDXSTATS ( input )
}
9 changes: 9 additions & 0 deletions tests/modules/nf-core/samtools/idxstats/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@
- path: output/samtools/test.idxstats
md5sum: df60a8c8d6621100d05178c93fb053a2
- path: output/samtools/versions.yml

- name: samtools idxstats test_samtools_idxstats_stub
command: nextflow run ./tests/modules/nf-core/samtools/idxstats -entry test_samtools_idxstats_stub -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/idxstats/nextflow.config -stub
tags:
- samtools/idxstats
- samtools
files:
- path: output/samtools/test.idxstats
- path: output/samtools/versions.yml

0 comments on commit 3685123

Please sign in to comment.