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 bwa mem #3671

Merged
merged 1 commit into from
Jul 26, 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/bwa/mem/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,16 @@ process BWA_MEM {
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//')
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}
41 changes: 41 additions & 0 deletions tests/modules/nf-core/bwa/mem/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,44 @@ workflow test_bwa_mem_paired_end_sort {
BWA_INDEX ( fasta )
BWA_MEM ( input, BWA_INDEX.out.index, true )
}


//
// Test with stub pairedend
//
workflow test_bwa_mem_paired_end_stub {
input = [
[ id:'test', single_end:false ], // meta map
[
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
]
]
fasta = [
[id: 'test'],
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]

BWA_INDEX ( fasta )
BWA_MEM ( input, BWA_INDEX.out.index, false )
}


//
// Test with single-end data stub
//
workflow test_bwa_mem_single_end_stub {
input = [
[ id:'test', single_end:true ], // meta map
[
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
]
]
fasta = [
[id: 'test'],
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]

BWA_INDEX ( fasta )
BWA_MEM ( input, BWA_INDEX.out.index, false )
}
16 changes: 16 additions & 0 deletions tests/modules/nf-core/bwa/mem/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,19 @@
md5sum: 983e3d2cd6f36e2546e6d25a0da78d66
- path: ./output/bwa/bwa/genome.sa
md5sum: ab3952cabf026b48cd3eb5bccbb636d1

- name: bwa mem paired-end stub
command: nextflow run ./tests/modules/nf-core/bwa/mem -entry test_bwa_mem_paired_end_sort -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bwa/mem/nextflow.config -stub
tags:
- bwa
- bwa/mem
files:
- path: ./output/bwa/test.bam

- name: bwa mem single-end stub
command: nextflow run ./tests/modules/nf-core/bwa/mem -entry test_bwa_mem_single_end_stub -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bwa/mem/nextflow.config -stub
tags:
- bwa
- bwa/mem
files:
- path: ./output/bwa/test.bam
Loading