Skip to content

Commit

Permalink
Added nf-test for blat (#6603)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Pearce <[email protected]>
  • Loading branch information
GallVp and SPPearce authored Sep 6, 2024
1 parent 3545b52 commit 4985203
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 41 deletions.
75 changes: 75 additions & 0 deletions modules/nf-core/blat/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

nextflow_process {

name "Test Process BLAT"
script "../main.nf"
process "BLAT"
config "./nextflow.config"

tag "modules"
tag "modules_nfcore"
tag "blat"
tag "seqtk/seq"

setup {
run("SEQTK_SEQ") {
script "../../seqtk/seq/main.nf"
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
]
"""
}
}
}

test("test-blat") {

when {
process {
"""
input[0] = SEQTK_SEQ.out.fastx
input[1] = [
[ id:'sarscov2' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

test("test-blat-stub") {
options '-stub'
when {
process {
"""
input[0] = SEQTK_SEQ.out.fastx
input[1] = [
[ id:'sarscov2' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

}
72 changes: 72 additions & 0 deletions modules/nf-core/blat/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"test-blat": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.psl:md5,6e2e5b3be48c84877f3c54b32bb9ec33"
]
],
"1": [
"versions.yml:md5,d9cde833b3f9cf6d359ef0f8a119380a"
],
"psl": [
[
{
"id": "test",
"single_end": false
},
"test.psl:md5,6e2e5b3be48c84877f3c54b32bb9ec33"
]
],
"versions": [
"versions.yml:md5,d9cde833b3f9cf6d359ef0f8a119380a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T20:38:03.56409"
},
"test-blat-stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.psl:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,d9cde833b3f9cf6d359ef0f8a119380a"
],
"psl": [
[
{
"id": "test",
"single_end": false
},
"test.psl:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,d9cde833b3f9cf6d359ef0f8a119380a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T20:38:09.736595"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/blat/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: SEQTK_SEQ {
ext.args = '-A'
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ bedtools/unionbedg:
biohansel:
- modules/nf-core/biohansel/**
- tests/modules/nf-core/biohansel/**
blat:
- modules/nf-core/blat/**
- tests/modules/nf-core/blat/**
cadd:
- modules/nf-core/cadd/**
- tests/modules/nf-core/cadd/**
Expand Down
21 changes: 0 additions & 21 deletions tests/modules/nf-core/blat/main.nf

This file was deleted.

9 changes: 0 additions & 9 deletions tests/modules/nf-core/blat/nextflow.config

This file was deleted.

8 changes: 0 additions & 8 deletions tests/modules/nf-core/blat/test.yml

This file was deleted.

0 comments on commit 4985203

Please sign in to comment.