Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stubs for samtools idxstats #3665

Merged
merged 4 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading