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 dragmap + add nf-test #4379

Merged
merged 34 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8df2221
new module picard/scatterintervalsbyns
nvnieuwk Jun 1, 2023
3780c6c
update annotsv to 3.3.6
nvnieuwk Jun 2, 2023
4a4979c
Merge branch 'master' into annotsv-update
nvnieuwk Jun 2, 2023
5533a7e
update installannotations
nvnieuwk Jun 2, 2023
0b8330f
Merge branch 'annotsv-update' of github.com:nvnieuwk/modules into ann…
nvnieuwk Jun 2, 2023
f772c25
Merge branch 'nf-core:master' into master
nvnieuwk Jun 5, 2023
d84dc41
Merge branch 'nf-core:master' into master
nvnieuwk Jun 20, 2023
f980e00
Merge branch 'nf-core:master' into master
nvnieuwk Jun 20, 2023
e82b71c
Merge branch 'nf-core:master' into master
nvnieuwk Jun 29, 2023
289314b
Merge branch 'nf-core:master' into master
nvnieuwk Jun 29, 2023
eb7ca02
Merge branch 'nf-core:master' into master
nvnieuwk Jun 29, 2023
a228da4
Merge branch 'nf-core:master' into master
nvnieuwk Jul 6, 2023
0ea95a6
Merge branch 'nf-core:master' into master
nvnieuwk Jul 12, 2023
3c261a9
Merge branch 'nf-core:master' into master
nvnieuwk Sep 12, 2023
0fb316e
Merge branch 'nf-core:master' into master
nvnieuwk Sep 14, 2023
9ffac7a
Merge branch 'nf-core:master' into master
nvnieuwk Sep 28, 2023
d8c3233
Merge branch 'nf-core:master' into master
nvnieuwk Oct 9, 2023
0623022
Merge branch 'nf-core:master' into master
nvnieuwk Oct 11, 2023
ecda643
Merge branch 'nf-core:master' into master
nvnieuwk Oct 24, 2023
2786065
Merge branch 'nf-core:master' into master
nvnieuwk Oct 24, 2023
793f1a2
Merge branch 'nf-core:master' into master
nvnieuwk Oct 25, 2023
a77c897
Merge branch 'nf-core:master' into master
nvnieuwk Oct 31, 2023
a849af6
Merge branch 'nf-core:master' into master
nvnieuwk Nov 14, 2023
9cbb88a
Merge branch 'nf-core:master' into master
nvnieuwk Nov 22, 2023
cd8be0d
update dragmap modules + add nf-test
nvnieuwk Nov 22, 2023
64b5432
fix singularity container
nvnieuwk Nov 22, 2023
3757489
add human test + stubs
nvnieuwk Nov 22, 2023
08fc092
fix tests
nvnieuwk Nov 22, 2023
da7bdaa
update mulled containers + conda env
nvnieuwk Nov 22, 2023
aaca843
fix tests
nvnieuwk Nov 23, 2023
47b304d
Merge branch 'master' into update-dragmap
nvnieuwk Nov 23, 2023
548ff0f
Merge branch 'master' into update-dragmap
nvnieuwk Dec 6, 2023
290cb8d
chore: Remove pytest-workflow tests
edmundmiller Dec 7, 2023
a45e945
Merge branch 'master' into update-dragmap
nvnieuwk Dec 7, 2023
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
6 changes: 3 additions & 3 deletions modules/nf-core/dragmap/align/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- bioconda
- defaults
dependencies:
- dragmap=1.2.1
- dragmap=1.3.0
# renovate: datasource=conda depName=bioconda/samtools
- samtools=1.15.1
- pigz=2.3.4
- samtools=1.18
- pigz=2.8
18 changes: 16 additions & 2 deletions modules/nf-core/dragmap/align/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process DRAGMAP_ALIGN {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:5ebebbc128cd624282eaa37d2c7fe01505a91a69-0':
'biocontainers/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:5ebebbc128cd624282eaa37d2c7fe01505a91a69-0' }"
'https://depot.galaxyproject.org/singularity/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:7eed251370ac7f3537c3d9472cdb2f9f5d8da1c5-0':
'biocontainers/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:7eed251370ac7f3537c3d9472cdb2f9f5d8da1c5-0' }"

input:
tuple val(meta) , path(reads)
Expand Down Expand Up @@ -43,4 +43,18 @@ process DRAGMAP_ALIGN {
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS
"""

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
dragmap: \$(echo \$(dragen-os --version 2>&1))
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS
"""
}
276 changes: 276 additions & 0 deletions modules/nf-core/dragmap/align/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
nextflow_process {

name "Test Process DRAGMAP_ALIGN"
script "../main.nf"
process "DRAGMAP_ALIGN"
tag "modules"
tag "modules_nfcore"
tag "dragmap"
tag "dragmap/align"

test("sarscov2 - fastq, hashtable, false") {

setup {
run("DRAGMAP_HASHTABLE") {
script "../../hashtable/main.nf"
process {
"""
input[0] = [
[id:'test'],
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
"""
}
}
}

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
]
input[1] = DRAGMAP_HASHTABLE.out.hashmap
input[2] = false //sort
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") },
file(process.out.versions[0]).name
).match() }
)
}

}

test("sarscov2 - fastq, hashtable, true") {

setup {
run("DRAGMAP_HASHTABLE") {
script "../../hashtable/main.nf"
process {
"""
input[0] = [
[id:'test'],
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
"""
}
}
}

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
]
input[1] = DRAGMAP_HASHTABLE.out.hashmap
input[2] = true //sort
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") },
file(process.out.versions[0]).name
).match() }
)
}

}

test("sarscov2 - [fastq1, fastq2], hashtable, false") {

setup {
run("DRAGMAP_HASHTABLE") {
script "../../hashtable/main.nf"
process {
"""
input[0] = [
[id:'test'],
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
"""
}
}
}

when {
process {
"""
input[0] = [
[ 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)
]
]
input[1] = DRAGMAP_HASHTABLE.out.hashmap
input[2] = false //sort
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") },
file(process.out.versions[0]).name
).match() }
)
}

}

test("sarscov2 - [fastq1, fastq2], hashtable, true") {

setup {
run("DRAGMAP_HASHTABLE") {
script "../../hashtable/main.nf"
process {
"""
input[0] = [
[id:'test'],
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
"""
}
}
}

when {
process {
"""
input[0] = [
[ 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)
]
]
input[1] = DRAGMAP_HASHTABLE.out.hashmap
input[2] = true //sort
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") },
file(process.out.versions[0]).name
).match() }
)
}

}

test("homo_sapiens - [fastq1, fastq2], hashtable, true") {

setup {
run("DRAGMAP_HASHTABLE") {
script "../../hashtable/main.nf"
process {
"""
input[0] = [
[id:'test'],
file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
]
"""
}
}
}

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[
file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_2_fastq_gz'], checkIfExists: true)
]
]
input[1] = DRAGMAP_HASHTABLE.out.hashmap
input[2] = true //sort
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
file(process.out.log[0][1]).readLines().findAll { it.startsWith("decompHash") },
file(process.out.versions[0]).name
).match() }
)
}

}

test("sarscov2 - [fastq1, fastq2], hashtable, true - stub") {

options "-stub"
setup {
run("DRAGMAP_HASHTABLE") {
script "../../hashtable/main.nf"
process {
"""
input[0] = [
[id:'test'],
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
"""
}
}
}

when {
process {
"""
input[0] = [
[ 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)
]
]
input[1] = DRAGMAP_HASHTABLE.out.hashmap
input[2] = true //sort
"""
}
}

then {
assertAll (
{ assert process.success },
{ assert snapshot(
file(process.out.bam[0][1]).name,
file(process.out.log[0][1]).name,
file(process.out.versions[0]).name
).match() }
)
}

}

}
Loading