8000 Added nf-test for snippy/run by GallVp · Pull Request #6368 · nf-core/modules · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added nf-test for snippy/run #6368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/nf-core/snippy/run/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ process SNIPPY_RUN {
snippy \\
$args \\
--cpus $task.cpus \\
--ram $task.memory \\
--outdir $prefix \\
--reference $reference \\
--prefix $prefix \\
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/snippy/run/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tools:
homepage: "https://github.com/tseemann/snippy"
documentation: "https://github.com/tseemann/snippy"
tool_dev_url: "https://github.com/tseemann/snippy"
licence: "['GPL v2']"
licence: ["GPL v2"]
input:
- meta:
type: map
Expand Down
59 changes: 59 additions & 0 deletions modules/nf-core/snippy/run/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "snippy"
tag "snippy/run"

test("test-snippy-run") {

when {
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] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.tab,
process.out.csv,
process.out.html,
path(process.out.vcf[0][1]).vcf.summary,
file(process.out.bed[0][1]).name, // empty: d41d8cd98f00b204e9800998ecf8427e
process.out.gff,
bam(process.out.bam[0][1]).getReadsMD5(),
file(process.out.bai[0][1]).name,
file(process.out.log[0][1]).name,
process.out.aligned_fa,
process.out.consensus_fa,
process.out.consensus_subs_fa,
path(process.out.raw_vcf[0][1]).vcf.summary,
path(process.out.filt_vcf[0][1]).vcf.summary,
path(process.out.vcf_gz[0][1]).vcf.summary,
file(process.out.vcf_csi[0][1]).name,
file(process.out.txt[0][1]).readLines()[3..5],
process.out.versions
).match()
}
)
}
}

}
91 changes: 91 additions & 0 deletions modules/nf-core/snippy/run/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"test-snippy-run": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.tab:md5,beb9bde3bce985e53e8feba9ec5b136e"
]
],
[
[
{
"id": "test",
"single_end": false
},
"test.csv:md5,322f942115e5945c2041a88246166703"
]
],
[
8000 [
{
"id": "test",
"single_end": false
},
"test.html:md5,1ccbf0ffcadae1a6b2e11681d24c9938"
]
],
"VcfFile [chromosomes=[], sampleCount=1, variantCount=0, phased=true, phasedAutodetect=true]",
"test.bed",
[
[
{
"id": "test",
"single_end": false
},
"test.gff:md5,df19e1b84ba6f691d20c72b397c88abf"
]
],
"2d64e4363d9f3c0e2167fce49d5087cf",
"test.bam.bai",
"test.log",
[
[
{
"id": "test",
"single_end": false
},
"test.aligned.fa:md5,47e3390d4167edf1955d162d37aca5e3"
]
],
[
[
{
"id": "test",
"single_end": false
},
"test.consensus.fa:md5,483f4a5dfe60171c86ee9b7e6dff908b"
]
],
[
[
{
"id": "test",
"single_end": false
},
"test.consensus.subs.fa:md5,483f4a5dfe60171c86ee9b7e6dff908b"
]
],
"VcfFile [chromosomes=[], sampleCount=1, variantCount=0, phased=true, phasedAutodetect=true]",
"VcfFile [chromosomes=[], sampleCount=1, variantCount=0, phased=true, phasedAutodetect=true]",
"VcfFile [chromosomes=[], sampleCount=1, variantCount=0, phased=true, phasedAutodetect=true]",
"test.vcf.gz.csi",
[
"ReferenceSize\t29829",
"Software\tsnippy 4.6.0",
"VariantTotal\t0"
],
[
"versions.yml:md5,210ffa28e95038dcb8bc4f1ea20adeb0"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-27T10:00:56.080676318"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1089,9 +1089,6 @@ snapaligner/index:
snippy/core:
- modules/nf-core/snippy/core/**
- tests/modules/nf-core/snippy/core/**
snippy/run:
- modules/nf-core/snippy/run/**
- tests/modules/nf-core/snippy/run/**
snpdists:
- modules/nf-core/snpdists/**
- tests/modules/nf-core/snpdists/**
Expand Down
16 changes: 0 additions & 16 deletions tests/modules/nf-core/snippy/run/main.nf

This file was deleted.

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

This file was deleted.

39 changes: 0 additions & 39 deletions tests/modules/nf-core/snippy/run/test.yml

This file was deleted.

Loading
0