forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nf-test: Migrate phispy tests to nf-test (nf-core#5292)
* nf-test: Migrate phispy tests * chore: Remove pytest test for phispy * style: Change name to lowercase and fix license * refactor: Change to test data base path Signed-off-by: jvfe <jvfecav@gmail.com> * refactor: Use with instead of variables Signed-off-by: jvfe <jvfecav@gmail.com> * refactor: Wrap with statements in assertAll Signed-off-by: jvfe <jvfecav@gmail.com> * refactor: Check the snapshot of every output except gbk Signed-off-by: jvfe <jvfecav@gmail.com> * fix: Change biopython version in environment Signed-off-by: jvfe <jvfecav@gmail.com> --------- Signed-off-by: jvfe <jvfecav@gmail.com>
- Loading branch information
Showing
9 changed files
with
199 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
name: PhiSpy | ||
name: phispy | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- bioconda::phispy=4.2.21 | ||
- conda-forge::biopython=1.81 |
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,87 @@ | ||
// nf-core modules test phispy | ||
nextflow_process { | ||
|
||
name "Test Process PHISPY" | ||
script "../main.nf" | ||
process "PHISPY" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "phispy" | ||
|
||
test("bacteroides_fragilis - gbff") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file( params.modules_testdata_base_path + "/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gbff.gz", checkIfExists: true ) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ | ||
with(process.out.log[0]) { | ||
assert path(get(1)).text.contains('NZ_CP069563.1') | ||
assert path(get(1)).text.contains('91') | ||
assert path(get(1)).text.contains('Kept') | ||
} | ||
}, | ||
{ | ||
with(process.out.coordinates[0]) { | ||
assert path(get(1)).text.contains('NZ_CP069563.1') | ||
assert path(get(1)).text.contains('pp1') | ||
assert path(get(1)).text.contains('Longest Repeat flanking phage and within 2000 bp') | ||
} | ||
}, | ||
{ assert path(process.out.gbk[0][1]).linesGzip.toString().contains('5150703 bp') }, | ||
{ assert snapshot(process.out.versions).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("bacteroides_fragilis - gbff - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file( params.modules_testdata_base_path + "/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gbff.gz", checkIfExists: true ) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert path(process.out.gbk[0][1]).exists() }, | ||
{ assert snapshot( | ||
process.out.coordinates, | ||
process.out.log, | ||
process.out.information, | ||
process.out.bacteria_fasta, | ||
process.out.bacteria_gbk, | ||
process.out.phage_fasta, | ||
process.out.phage_gbk, | ||
process.out.prophage_gff, | ||
process.out.prophage_tbl, | ||
process.out.prophage_tsv, | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,2 @@ | ||
phispy: | ||
- "modules/nf-core/phispy/**" |
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.