Skip to content

Commit

Permalink
Added nf-test for samtools/depth (nf-core#6275)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Aug 23, 2024
1 parent 69d6153 commit c57b489
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 52 deletions.
4 changes: 3 additions & 1 deletion modules/nf-core/samtools/depth/environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: samtools_depth

channels:
- conda-forge
- bioconda
- defaults

dependencies:
- bioconda::samtools=1.20
- bioconda::htslib=1.20
- bioconda::samtools=1.20
62 changes: 62 additions & 0 deletions modules/nf-core/samtools/depth/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "samtools"
tag "samtools/depth"

test("test-samtools-depth") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true)
]
input[1] = [[],[]]
"""
}
}

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

test("test-samtools-depth-intervals") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true)
]
input[1] = [
[ id:'bed' ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true)
]
"""
}
}

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

}
72 changes: 72 additions & 0 deletions modules/nf-core/samtools/depth/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"test-samtools-depth-intervals": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,a89e2f8e1b66356c7500599fcadb8784"
]
],
"1": [
"versions.yml:md5,7e29632bc14d18f38d63e78a08a73175"
],
"tsv": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,a89e2f8e1b66356c7500599fcadb8784"
]
],
"versions": [
"versions.yml:md5,7e29632bc14d18f38d63e78a08a73175"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T15:57:20.065271"
},
"test-samtools-depth": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,722d2c060944d6b96ae5ae00d8074657"
]
],
"1": [
"versions.yml:md5,7e29632bc14d18f38d63e78a08a73175"
],
"tsv": [
[
{
"id": "test",
"single_end": false
},
"test.tsv:md5,722d2c060944d6b96ae5ae00d8074657"
]
],
"versions": [
"versions.yml:md5,7e29632bc14d18f38d63e78a08a73175"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T15:57:13.724175"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1268,9 +1268,6 @@ sambamba/markdup:
samtools/collatefastq:
- modules/nf-core/samtools/collatefastq/**
- tests/modules/nf-core/samtools/collatefastq/**
samtools/depth:
- modules/nf-core/samtools/depth/**
- tests/modules/nf-core/samtools/depth/**
samtools/fasta:
- modules/nf-core/samtools/fasta/**
- tests/modules/nf-core/samtools/fasta/**
Expand Down
24 changes: 0 additions & 24 deletions tests/modules/nf-core/samtools/depth/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

0 comments on commit c57b489

Please sign in to comment.