-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update genomescope2 module and add nf-tests (#5399)
* Add genomescope nf-test * Add stub and fitted histogram lookup table Co-authored-by: rodtheo <[email protected]> * Add snapshot * Update build version * Fix output channel contents * Update channel tests * Update tests * Lint licence Co-authored-by: rodtheo <[email protected]> * Fix linting and output file * Fix snapshot for missing file --------- Co-authored-by: rodtheo <[email protected]>
- Loading branch information
1 parent
faf85d1
commit 9bc4822
Showing
10 changed files
with
365 additions
and
67 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,84 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GENOMESCOPE2" | ||
script "../main.nf" | ||
config "./nextflow.config" | ||
process "GENOMESCOPE2" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "genomescope2" | ||
tag "meryl/count" | ||
tag "meryl/histogram" | ||
|
||
setup { | ||
run('MERYL_COUNT'){ | ||
script "../../../../modules/nf-core/meryl/count/main.nf" | ||
process { | ||
""" | ||
input[0] = Channel.value([ | ||
[ id: 'test', single_end: true ], // meta map | ||
file( params.modules_testdata_base_path + "/genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_1.fastq.gz", checkIfExists: true ) | ||
]) | ||
""" | ||
} | ||
} | ||
run('MERYL_HISTOGRAM'){ | ||
script "../../../../modules/nf-core/meryl/histogram/main.nf" | ||
process { | ||
""" | ||
input[0] = MERYL_COUNT.out.meryl_db | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("bacteroides_fragilis - fastq") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = MERYL_HISTOGRAM.out.hist | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert file(process.out.linear_plot_png[0][1]).exists() }, // PNG md5sum mismatches using conda | ||
{ assert file(process.out.transformed_linear_plot_png[0][1]).exists() }, // PNG md5sum mismatches using conda | ||
{ assert file(process.out.log_plot_png[0][1]).exists() }, // PNG md5sum mismatches using conda | ||
{ assert file(process.out.transformed_log_plot_png[0][1]).exists() }, // PNG md5sum mismatches using conda | ||
{ assert snapshot(process.out.model).match("model") }, | ||
{ assert snapshot(process.out.summary).match("summary") }, | ||
{ assert snapshot(process.out.lookup_table).match("lookup_table") }, | ||
{ assert file(process.out.fitted_histogram_png[0][1]).exists() }, // PNG md5sum mismatches using conda | ||
{ assert snapshot(process.out.versions).match("versions") } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("bacteroides_fragilis - fastq - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = MERYL_HISTOGRAM.out.hist | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.