-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1da66a1
commit 5f1a2cd
Showing
16 changed files
with
261 additions
and
57 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 was deleted.
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
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 |
---|---|---|
|
@@ -3,14 +3,16 @@ config { | |
testsDir "." | ||
|
||
// nf-test directory including temporary files for each test | ||
workDir "/tmp" | ||
|
||
// location of library folder that is added automatically to the classpath | ||
libDir "tests/lib/" | ||
workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" | ||
|
||
// location of an optional nextflow.config file specific for executing tests | ||
configFile "nextflow.config" | ||
configFile "tests/nextflow.config" | ||
|
||
// run all test with the defined docker profile from the main nextflow.config | ||
profile "" | ||
profile "test" | ||
|
||
// load the necessary plugins | ||
plugins { | ||
load "[email protected]" | ||
} | ||
} |
File renamed without changes.
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,33 @@ | ||
nextflow_workflow { | ||
|
||
name "Test Workflow BISMARK" | ||
script "../main.nf" | ||
workflow "BISMARK" | ||
|
||
test("Bismark Single-End") { | ||
|
||
when { | ||
params { | ||
// define parameters here. Example: | ||
// outdir = "tests/results" | ||
} | ||
workflow { | ||
""" | ||
input[0] = file("test-file.txt") // reads | ||
input[1] = file("test-file.txt") // bismark_index | ||
input[2] = file("test-file.txt") // skip_deduplication | ||
input[3] = file("test-file.txt") // cytosine_report | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot(workflow.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
File renamed without changes.
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,34 @@ | ||
nextflow_workflow { | ||
|
||
name "Test Workflow BWAMETH" | ||
script "subworkflows/local/bwameth/main.nf" | ||
workflow "BWAMETH" | ||
|
||
test("Should run without failures") { | ||
|
||
when { | ||
params { | ||
// define parameters here. Example: | ||
// outdir = "tests/results" | ||
} | ||
workflow { | ||
""" | ||
input[0] = file("test-file.txt") // reads | ||
input[1] = file("test-file.txt") // bwameth_index | ||
input[2] = file("test-file.txt") // fasta | ||
input[3] = file("test-file.txt") // fasta_index | ||
input[4] = file("test-file.txt") // skip_deduplication | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot(workflow.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
File renamed without changes.
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,33 @@ | ||
nextflow_workflow { | ||
|
||
name "Test Workflow PREPARE_GENOME" | ||
script "subworkflows/local/prepare_genome/main.nf" | ||
workflow "PREPARE_GENOME" | ||
|
||
test("Should run without failures") { | ||
|
||
when { | ||
params { | ||
// define parameters here. Example: | ||
// outdir = "tests/results" | ||
} | ||
workflow { | ||
""" | ||
input[0] = file("test-file.txt") // fasta | ||
input[1] = file("test-file.txt") // ch_fasta_index | ||
input[2] = file("test-file.txt") // ch_bismark_index | ||
input[3] = file("test-file.txt") // ch_bwameth_index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot(workflow.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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,72 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test Workflow main.nf" | ||
script "../main.nf" | ||
|
||
test("Params: default") { | ||
|
||
when { | ||
params { | ||
aligner = "bismark" | ||
save_reference = true | ||
outdir = "$outputDir" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot(path("$outputDir/bismark/deduplicated/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bam"), | ||
path("$outputDir/bismark/deduplicated/SRR389222_sub1_trimmed_bismark_bt2.deduplicated.bam"), | ||
path("$outputDir/bismark/deduplicated/SRR389222_sub2_trimmed_bismark_bt2.deduplicated.bam"), | ||
path("$outputDir/bismark/deduplicated/SRR389222_sub3_trimmed_bismark_bt2.deduplicated.bam"), | ||
path("$outputDir/bismark/methylation_calls/bedGraph/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bedGraph.gz"), | ||
path("$outputDir/bismark/methylation_calls/bedGraph/SRR389222_sub1_trimmed_bismark_bt2.deduplicated.bedGraph.gz"), | ||
path("$outputDir/bismark/methylation_calls/bedGraph/SRR389222_sub2_trimmed_bismark_bt2.deduplicated.bedGraph.gz"), | ||
path("$outputDir/bismark/methylation_calls/bedGraph/SRR389222_sub3_trimmed_bismark_bt2.deduplicated.bedGraph.gz"), | ||
path("$outputDir/bismark/methylation_calls/mbias/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.M-bias.txt"), | ||
path("$outputDir/bismark/methylation_calls/mbias/SRR389222_sub1_trimmed_bismark_bt2.deduplicated.M-bias.txt"), | ||
path("$outputDir/bismark/methylation_calls/mbias/SRR389222_sub2_trimmed_bismark_bt2.deduplicated.M-bias.txt"), | ||
path("$outputDir/bismark/methylation_calls/mbias/SRR389222_sub3_trimmed_bismark_bt2.deduplicated.M-bias.txt"), | ||
path("$outputDir/bismark/methylation_calls/methylation_coverage/Ecoli_1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz"), | ||
path("$outputDir/bismark/methylation_calls/methylation_coverage/SRR389222_sub1_trimmed_bismark_bt2.deduplicated.bismark.cov.gz"), | ||
path("$outputDir/bismark/methylation_calls/methylation_coverage/SRR389222_sub2_trimmed_bismark_bt2.deduplicated.bismark.cov.gz"), | ||
path("$outputDir/bismark/methylation_calls/methylation_coverage/SRR389222_sub3_trimmed_bismark_bt2.deduplicated.bismark.cov.gz"), | ||
path("$outputDir/bismark/methylation_calls/methylation_calls/").list(), | ||
path("$outputDir/bismark/methylation_calls/splitting_report/Ecoli_1_val_1_bismark_bt2_pe.deduplicated_splitting_report.txt"), | ||
path("$outputDir/bismark/methylation_calls/splitting_report/SRR389222_sub1_trimmed_bismark_bt2.deduplicated_splitting_report.txt"), | ||
path("$outputDir/bismark/methylation_calls/splitting_report/SRR389222_sub2_trimmed_bismark_bt2.deduplicated_splitting_report.txt"), | ||
path("$outputDir/bismark/methylation_calls/splitting_report/SRR389222_sub3_trimmed_bismark_bt2.deduplicated_splitting_report.txt"), | ||
path("$outputDir/bismark/reference_genome/BismarkIndex/").list(), | ||
path("$outputDir/qualimap/Ecoli/genome_results.txt"), | ||
path("$outputDir/qualimap/SRR389222_sub1/genome_results.txt"), | ||
path("$outputDir/qualimap/SRR389222_sub2/genome_results.txt"), | ||
path("$outputDir/qualimap/SRR389222_sub3/genome_results.txt")).match("single_end") }, | ||
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("single_end_software_versions") }, | ||
{ assert new File("$outputDir/bismark/alignments/logs/Ecoli_1_val_1_bismark_bt2_PE_report.txt").exists() }, | ||
{ assert new File("$outputDir/bismark/alignments/logs/SRR389222_sub1_trimmed_bismark_bt2_SE_report.txt").exists() }, | ||
{ assert new File("$outputDir/bismark/alignments/logs/SRR389222_sub2_trimmed_bismark_bt2_SE_report.txt").exists() }, | ||
{ assert new File("$outputDir/bismark/alignments/logs/SRR389222_sub3_trimmed_bismark_bt2_SE_report.txt").exists() }, | ||
{ assert new File("$outputDir/bismark/reports/Ecoli_1_val_1_bismark_bt2_PE_report.html").exists() }, | ||
{ assert new File("$outputDir/bismark/reports/SRR389222_sub1_trimmed_bismark_bt2_SE_report.html").exists() }, | ||
{ assert new File("$outputDir/bismark/reports/SRR389222_sub2_trimmed_bismark_bt2_SE_report.html").exists() }, | ||
{ assert new File("$outputDir/bismark/reports/SRR389222_sub3_trimmed_bismark_bt2_SE_report.html").exists() }, | ||
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.html").exists() }, | ||
{ assert new File("$outputDir/bismark/summary/bismark_summary_report.txt").exists() }, | ||
{ assert new File("$outputDir/fastqc/Ecoli_1_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/Ecoli_2_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/SRR389222_sub1_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/SRR389222_sub2_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/SRR389222_sub3_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/multiqc/bismark/multiqc_report.html").exists() }, | ||
{ assert new File("$outputDir/trimgalore/logs/Ecoli_1.fastq.gz_trimming_report.txt").exists() }, | ||
{ assert new File("$outputDir/trimgalore/logs/Ecoli_2.fastq.gz_trimming_report.txt").exists() }, | ||
{ assert new File("$outputDir/trimgalore/logs/SRR389222_sub1.fastq.gz_trimming_report.txt").exists() }, | ||
{ assert new File("$outputDir/trimgalore/logs/SRR389222_sub2.fastq.gz_trimming_report.txt").exists() }, | ||
{ assert new File("$outputDir/trimgalore/logs/SRR389222_sub3.fastq.gz_trimming_report.txt").exists() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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,20 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test Workflow main.nf" | ||
script "../main.nf" | ||
|
||
test("Should run without failures") { | ||
|
||
when { | ||
params { | ||
outdir = "$outputDir" | ||
} | ||
} | ||
|
||
then { | ||
assert workflow.success | ||
} | ||
|
||
} | ||
|
||
} |
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,20 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test Workflow main.nf" | ||
script "../main.nf" | ||
|
||
test("Should run without failures") { | ||
|
||
when { | ||
params { | ||
outdir = "$outputDir" | ||
} | ||
} | ||
|
||
then { | ||
assert workflow.success | ||
} | ||
|
||
} | ||
|
||
} |
This file was deleted.
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,38 @@ | ||
/* | ||
======================================================================================== | ||
Nextflow config file for running tests | ||
======================================================================================== | ||
*/ | ||
|
||
params { | ||
// Base directory for nf-core/modules test data | ||
modules_testdata_base_path = 's3://ngi-igenomes/testdata/nf-core/modules/' | ||
|
||
// Base directory for nf-core/rnaseq test data | ||
pipelines_testdata_base_path = 's3://ngi-igenomes/testdata/nf-core/pipelines/methylseq/2.7.0/' | ||
|
||
fasta = "${params.pipelines_testdata_base_path}/reference/genome.fa" | ||
fasta_index = "${params.pipelines_testdata_base_path}/reference/genome.fa.fai" | ||
|
||
validationSchemaIgnoreParams = 'genomes,igenomes_base,modules_testdata_base_path,pipelines_testdata_base_path' | ||
} | ||
|
||
// Impose sensible resource limits for testing | ||
process { | ||
withName: '.*' { | ||
cpus = 2 | ||
memory = 3.GB | ||
time = 2.h | ||
} | ||
} | ||
|
||
// Impose same minimum Nextflow version as the pipeline for testing | ||
manifest { | ||
nextflowVersion = '!>=23.04.0' | ||
} | ||
|
||
// Disable all Nextflow reporting options | ||
timeline { enabled = false } | ||
report { enabled = false } | ||
trace { enabled = false } | ||
dag { enabled = false } |
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