Skip to content

Commit

Permalink
Added nf-test for gappa/examinegraft (#6519)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Sep 2, 2024
1 parent 705b395 commit 406b477
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 36 deletions.
11 changes: 11 additions & 0 deletions modules/nf-core/gappa/examinegraft/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,15 @@ process GAPPA_EXAMINEGRAFT {
gappa: \$(echo \$(gappa --version 2>&1 | sed 's/v//' ))
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.newick
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gappa: \$(echo \$(gappa --version 2>&1 | sed 's/v//' ))
END_VERSIONS
"""
}
6 changes: 4 additions & 2 deletions modules/nf-core/gappa/examinegraft/meta.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: "gappa_examinegraft"
description: grafts query sequences from phylogenetic placement on the reference tree
description: Grafts query sequences from phylogenetic placement on the reference tree
keywords:
- sort
- graft
- phylogeny
tools:
- "gappa":
description: "Genesis Applications for Phylogenetic Placement Analysis"
homepage: "https://github.com/lczech/gappa"
documentation: "https://github.com/lczech/gappa/wiki"
tool_dev_url: "https://github.com/lczech/gappa"
doi: "10.1093/bioinformatics/btaa070"
licence: "['GPL v3']"
licence: ["GPL v3"]
input:
- meta:
type: map
Expand Down
58 changes: 58 additions & 0 deletions modules/nf-core/gappa/examinegraft/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "gappa"
tag "gappa/examinegraft"

test("test-gappa-examinegraft") {

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/gappa/epa_result.jplace.gz', checkIfExists: true)
]
"""
}
}

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

test("test-gappa-examinegraft-stub") {
options '-stub'

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/gappa/epa_result.jplace.gz', checkIfExists: true)
]
"""
}
}

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

}
68 changes: 68 additions & 0 deletions modules/nf-core/gappa/examinegraft/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"test-gappa-examinegraft-stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.newick:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,ea0faa432b03d6ccd726d3ba249ea5b5"
],
"newick": [
[
{
"id": "test"
},
"test.newick:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,ea0faa432b03d6ccd726d3ba249ea5b5"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T12:19:44.870566"
},
"test-gappa-examinegraft": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.epa_result.newick:md5,97e54b6a9576a78b774fd63a050e5474"
]
],
"1": [
"versions.yml:md5,ea0faa432b03d6ccd726d3ba249ea5b5"
],
"newick": [
[
{
"id": "test"
},
"test.epa_result.newick:md5,97e54b6a9576a78b774fd63a050e5474"
]
],
"versions": [
"versions.yml:md5,ea0faa432b03d6ccd726d3ba249ea5b5"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T12:19:40.543312"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@ galah:
gangstr:
- modules/nf-core/gangstr/**
- tests/modules/nf-core/gangstr/**
gappa/examinegraft:
- modules/nf-core/gappa/examinegraft/**
- tests/modules/nf-core/gappa/examinegraft/**
gatk/indelrealigner:
- modules/nf-core/gatk/indelrealigner/**
- tests/modules/nf-core/gatk/indelrealigner/**
Expand Down
15 changes: 0 additions & 15 deletions tests/modules/nf-core/gappa/examinegraft/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/gappa/examinegraft/nextflow.config

This file was deleted.

11 changes: 0 additions & 11 deletions tests/modules/nf-core/gappa/examinegraft/test.yml

This file was deleted.

0 comments on commit 406b477

Please sign in to comment.