Skip to content

Commit

Permalink
Added nf-test for geoquery/getgeo
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Sep 5, 2024
1 parent d576f75 commit 7265e98
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 63 deletions.
1 change: 0 additions & 1 deletion modules/nf-core/geoquery/getgeo/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ name: geoquery_getgeo
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::bioconductor-geoquery=2.66.0
2 changes: 1 addition & 1 deletion modules/nf-core/geoquery/getgeo/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tools:
documentation: "https://bioconductor.org/packages/release/bioc/vignettes/GEOquery/inst/doc/GEOquery.html"
tool_dev_url: "https://github.com/seandavi/GEOquery"
doi: "10.1093/bioinformatics/btm254"
licence: "MIT"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
70 changes: 70 additions & 0 deletions modules/nf-core/geoquery/getgeo/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "geoquery"
tag "geoquery/getgeo"

test("test-geoquery-getgeo") {

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
'GSE50790'
]
"""
}
}

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

test("test-geoquery-getgeo-with-metacols") {
config "./nextflow.config"

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
'GSE50790'
]
"""
}
}

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

}
60 changes: 60 additions & 0 deletions modules/nf-core/geoquery/getgeo/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"test-geoquery-getgeo-with-metacols": {
"content": [
"test.eset.rds",
[
[
{
"id": "test"
},
"test.matrix.tsv:md5,230f87f91c0c1a7e2ab354200c4b978c"
]
],
[
[
{
"id": "test"
},
"test.annotation.tsv:md5,40300ae222ae35fa54daf10a1b86e830"
]
],
[
"versions.yml:md5,975445af2def0ea44ea949ff5aee1fc0"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T08:37:33.606465"
},
"test-geoquery-getgeo": {
"content": [
"eset.rds",
[
[
{
"id": "test"
},
"matrix.tsv:md5,230f87f91c0c1a7e2ab354200c4b978c"
]
],
[
[
{
"id": "test"
},
"annotation.tsv:md5,4dbb874b49a11dff13557f58da643ee0"
]
],
[
"versions.yml:md5,975445af2def0ea44ea949ff5aee1fc0"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T08:37:07.718649"
}
}
6 changes: 6 additions & 0 deletions modules/nf-core/geoquery/getgeo/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
process {
withName: 'GEOQUERY_GETGEO' {
ext.args = { "--metacols \"ID,ENTREZ_GENE_ID,Gene Symbol,Sequence Type\"" }
ext.prefix = { "${meta.id}." }
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,6 @@ genotyphi/parse:
genrich:
- modules/nf-core/genrich/**
- tests/modules/nf-core/genrich/**
geoquery/getgeo:
- modules/nf-core/geoquery/getgeo/**
- tests/modules/nf-core/geoquery/getgeo/**
gfaffix:
- modules/nf-core/gfaffix/**
- tests/modules/nf-core/gfaffix/**
Expand Down
23 changes: 0 additions & 23 deletions tests/modules/nf-core/geoquery/getgeo/main.nf

This file was deleted.

10 changes: 0 additions & 10 deletions tests/modules/nf-core/geoquery/getgeo/nextflow.config

This file was deleted.

25 changes: 0 additions & 25 deletions tests/modules/nf-core/geoquery/getgeo/test.yml

This file was deleted.

0 comments on commit 7265e98

Please sign in to comment.