Skip to content

Commit

Permalink
Added nf-tests for ADAPTERREMOVALFIXPREFIX (#6243)
Browse files Browse the repository at this point in the history
* Added nf-tests for ADAPTERREMOVALFIXPREFIX

* Update modules/nf-core/adapterremovalfixprefix/tests/main.nf.test

Co-authored-by: Simon Pearce <[email protected]>

* Update modules/nf-core/adapterremovalfixprefix/tests/main.nf.test

Co-authored-by: Simon Pearce <[email protected]>

---------

Co-authored-by: Simon Pearce <[email protected]>
  • Loading branch information
mberacochea and SPPearce authored Aug 22, 2024
1 parent 1667117 commit 5662e1d
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 38 deletions.
72 changes: 72 additions & 0 deletions modules/nf-core/adapterremovalfixprefix/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
nextflow_process {

name "Test Process ADAPTERREMOVALFIXPREFIX"
script "../main.nf"
process "ADAPTERREMOVALFIXPREFIX"

tag "modules"
tag "modules_nfcore"
tag "adapterremoval"
tag "adapterremovalfixprefix"

setup {
run("ADAPTERREMOVAL") {
script "../../adapterremoval/main.nf"
config "./nextflow.config"
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),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
]
]
input[1] = []
"""
}
}
}

test("paired-end - sarscov2 - [fastq]") {

when {

process {
"""
input[0] = ADAPTERREMOVAL.out.collapsed
"""
}
}

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

}

test("paired-end - sarscov2 - [fastq] - stub") {

options "-stub"

when {
process {
"""
input[0] = ADAPTERREMOVAL.out.collapsed
"""
}
}

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

}

}
72 changes: 72 additions & 0 deletions modules/nf-core/adapterremovalfixprefix/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"paired-end - sarscov2 - [fastq] - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.fq.gz:md5,369452751050a7f1e31b839702d61417"
]
],
"1": [
"versions.yml:md5,76647a727690a8fbafa77a4b77cbe64c"
],
"fixed_fastq": [
[
{
"id": "test",
"single_end": false
},
"test.fq.gz:md5,369452751050a7f1e31b839702d61417"
]
],
"versions": [
"versions.yml:md5,76647a727690a8fbafa77a4b77cbe64c"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-22T08:19:25.477451"
},
"paired-end - sarscov2 - [fastq]": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.fq.gz:md5,369452751050a7f1e31b839702d61417"
]
],
"1": [
"versions.yml:md5,76647a727690a8fbafa77a4b77cbe64c"
],
"fixed_fastq": [
[
{
"id": "test",
"single_end": false
},
"test.fq.gz:md5,369452751050a7f1e31b839702d61417"
]
],
"versions": [
"versions.yml:md5,76647a727690a8fbafa77a4b77cbe64c"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-22T07:57:53.853795"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/adapterremovalfixprefix/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: ADAPTERREMOVAL {
ext.args = "--collapse"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/adapterremovalfixprefix/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
adapterremovalfixprefix:
- "modules/nf-core/adapterremovalfixprefix/**"
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
adapterremovalfixprefix:
- modules/nf-core/adapterremovalfixprefix/**
- tests/modules/nf-core/adapterremovalfixprefix/**
amps:
- modules/nf-core/amps/**
- tests/modules/nf-core/amps/**
Expand Down
19 changes: 0 additions & 19 deletions tests/modules/nf-core/adapterremovalfixprefix/main.nf

This file was deleted.

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

This file was deleted.

7 changes: 0 additions & 7 deletions tests/modules/nf-core/adapterremovalfixprefix/test.yml

This file was deleted.

0 comments on commit 5662e1d

Please sign in to comment.