-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added nf-test for angsd/contamination (#6602)
* Added nf-test for angsd/contamination * Swap container version * Update snapshot --------- Co-authored-by: Simon Pearce <[email protected]> Co-authored-by: Phil Ewels <[email protected]>
- Loading branch information
1 parent
9897e69
commit 97504fc
Showing
9 changed files
with
162 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process ANGSD_CONTAMINATION" | ||
script "../main.nf" | ||
process "ANGSD_CONTAMINATION" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "angsd" | ||
tag "angsd/contamination" | ||
tag "angsd/docounts" | ||
|
||
setup { | ||
run("ANGSD_DOCOUNTS") { | ||
script "../../../angsd/docounts/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai', checkIfExists: true), | ||
[] | ||
] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("test-angsd-contamination") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = ANGSD_DOCOUNTS.out.icounts | ||
input[1] = [ [id:'test2'], file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/angsd/HapMapChrX.gz")] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.txt[0][1]).readLines()[3..7], | ||
file(process.out.versions[0]).readLines(), | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-angsd-contamination-stub") { | ||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = ANGSD_DOCOUNTS.out.icounts | ||
input[1] = [ [id:'test2'], file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/angsd/HapMapChrX.gz")] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
} |
60 changes: 60 additions & 0 deletions
60
modules/nf-core/angsd/contamination/tests/main.nf.test.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"test-angsd-contamination": { | ||
"content": [ | ||
[ | ||
"Seed value of 0 (zero) will use time as seed", | ||
"-----------------", | ||
"[readhap] We now have: 58190 snpSites after filtering based on hapMapfile", | ||
"[readicnts] fname:test.icnts.gz minDepth:2 maxDepth:200", | ||
"[readicnts] Has read:1557012 sites, 1517472 sites (after depfilter) from ANGSD icnts file" | ||
], | ||
[ | ||
"\"ANGSD_CONTAMINATION\":", | ||
" angsd: 0.940-dirty" | ||
], | ||
[ | ||
"versions.yml:md5,e496b7eb11be581adf1781883ba2abff" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-09T05:53:42.620175303" | ||
}, | ||
"test-angsd-contamination-stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,e496b7eb11be581adf1781883ba2abff" | ||
], | ||
"txt": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,e496b7eb11be581adf1781883ba2abff" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-09T05:53:56.844309422" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process { | ||
withName: ANGSD_DOCOUNTS { | ||
ext.args = "-iCounts 1 -doDepth -dumpCounts 2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.