Skip to content

Commit

Permalink
Added nf-test for atlas/splitmerge (#6344)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Pearce <[email protected]>
  • Loading branch information
GallVp and SPPearce authored Aug 26, 2024
1 parent 2615871 commit f5884ea
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 38 deletions.
3 changes: 2 additions & 1 deletion modules/nf-core/atlas/splitmerge/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ process ATLAS_SPLITMERGE {
tuple val(meta), path(bam), path(bai), path(read_group_settings), path(blacklist)

output:
tuple val(meta), path("*_mergedReads.bam"), path("*.txt.gz"), emit: data
tuple val(meta), path("*_mergedReads.bam") , emit: bam
tuple val(meta), path("*.txt.gz") , emit: txt
path "versions.yml", emit: versions

when:
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/atlas/splitmerge/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
documentation: "https://bitbucket.org/wegmannlab/atlas/wiki/Home"
tool_dev_url: "https://bitbucket.org/wegmannlab/atlas"
doi: "10.1101/105346"
licence: "['GPL v3']"
licence: ["GPL v3"]
input:
- meta:
type: map
Expand All @@ -27,7 +27,7 @@ input:
type: file
description: The BAI file for the input BAM file
pattern: "*.bai"
- read_group_setting:
- read_group_settings:
type: file
description: |
TXT file containing the split and merge settings for
Expand Down Expand Up @@ -55,7 +55,7 @@ output:
type: file
description: A BAM file with suffix_mergedReads.bam
pattern: "*_mergedReads.bam"
- filelist:
- txt:
type: file
description: A file listing all reads that were filtered out in the merging process with suffix_ignoredReads.txt.gz
pattern: "*.txt.gz"
Expand Down
43 changes: 43 additions & 0 deletions modules/nf-core/atlas/splitmerge/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "atlas"
tag "atlas/splitmerge"

test("test-atlas-splitmerge") {

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

then {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.txt[0][1]).linesGzip[3..7],
bam(process.out.bam[0][1]).getReadsMD5(),
process.out.versions
).match()
}
)
}
}

}
22 changes: 22 additions & 0 deletions modules/nf-core/atlas/splitmerge/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"test-atlas-splitmerge": {
"content": [
[
"Read testN:1, rev : not a proper pair (orphan)",
"Read testN:99, rev : longer than insert size (TLEN)",
"Read testN:99, rev : not a proper pair (orphan)",
"Read testN:830, rev : longer than insert size (TLEN)",
"Read testN:830, fwd : longer than insert size (TLEN)"
],
"66f5f17da47cc4dced99bd17d739b536",
[
"versions.yml:md5,208f6ef7923cec00ddbcd5825f84a4fa"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-26T15:33:41.150912"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ ataqv/ataqv:
ataqv/mkarv:
- modules/nf-core/ataqv/mkarv/**
- tests/modules/nf-core/ataqv/mkarv/**
atlas/splitmerge:
- modules/nf-core/atlas/splitmerge/**
- tests/modules/nf-core/atlas/splitmerge/**
authentict/deam2cont:
- modules/nf-core/authentict/deam2cont/**
- tests/modules/nf-core/authentict/deam2cont/**
Expand Down
15 changes: 0 additions & 15 deletions tests/modules/nf-core/atlas/splitmerge/main.nf

This file was deleted.

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

This file was deleted.

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

This file was deleted.

0 comments on commit f5884ea

Please sign in to comment.