Skip to content

Commit

Permalink
Added nf-test for bedtools/jaccard (#6330)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Aug 26, 2024
1 parent c63d090 commit dbbabc3
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 63 deletions.
66 changes: 66 additions & 0 deletions modules/nf-core/bedtools/jaccard/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "bedtools"
tag "bedtools/jaccard"

test("test-bedtools-jaccard") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true)
]
input[1] = [[],[]]
"""
}
}

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

test("test-bedtools-jaccard-genome") {

config "./nextflow.config"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true)
]
input[1] = [
[ id:'genome' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
]
"""
}
}

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

}
72 changes: 72 additions & 0 deletions modules/nf-core/bedtools/jaccard/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"test-bedtools-jaccard-genome": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,b737742026a3b512a494f3aa7935fded"
]
],
"1": [
"versions.yml:md5,4d8267abd99c41fb6056d5162b380d23"
],
"tsv": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,b737742026a3b512a494f3aa7935fded"
]
],
"versions": [
"versions.yml:md5,4d8267abd99c41fb6056d5162b380d23"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:08:36.70775"
},
"test-bedtools-jaccard": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,b737742026a3b512a494f3aa7935fded"
]
],
"1": [
"versions.yml:md5,4d8267abd99c41fb6056d5162b380d23"
],
"tsv": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,b737742026a3b512a494f3aa7935fded"
]
],
"versions": [
"versions.yml:md5,4d8267abd99c41fb6056d5162b380d23"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T14:08:32.019101"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/bedtools/jaccard/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: "BEDTOOLS_JACCARD" {
ext.args = "-sorted"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ beagle5/beagle:
bedtools/intersect:
- modules/nf-core/bedtools/intersect/**
- tests/modules/nf-core/bedtools/intersect/**
bedtools/jaccard:
- modules/nf-core/bedtools/jaccard/**
- tests/modules/nf-core/bedtools/jaccard/**
bedtools/makewindows:
- modules/nf-core/bedtools/makewindows/**
- tests/modules/nf-core/bedtools/makewindows/**
Expand Down
32 changes: 0 additions & 32 deletions tests/modules/nf-core/bedtools/jaccard/main.nf

This file was deleted.

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

This file was deleted.

19 changes: 0 additions & 19 deletions tests/modules/nf-core/bedtools/jaccard/test.yml

This file was deleted.

0 comments on commit dbbabc3

Please sign in to comment.