-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285 from danilodileo/nf-test
Nf test
- Loading branch information
Showing
5 changed files
with
82 additions
and
0 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 |
---|---|---|
|
@@ -12,3 +12,6 @@ eggnog | |
kofam | ||
kofamscan | ||
eukulele | ||
.nf-test.log | ||
nf-test | ||
.nf-test* |
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,10 @@ | ||
config { | ||
// Location of nf-tests | ||
testsDir "." | ||
|
||
// nf-test directory used to create temporary files for each test | ||
workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" | ||
|
||
// Location of an optional nextflow.config file specific for executing pipeline tests | ||
configFile "tests/nextflow.config" | ||
} |
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,35 @@ | ||
nextflow_pipeline { | ||
name "Test pipeline" | ||
script "../main.nf" | ||
tag "PIPELINE" | ||
|
||
test("Run with profile test") { | ||
|
||
when { | ||
params { | ||
outdir = "$outputDir" | ||
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/metatdenovo/samplesheet/samplesheet.csv' | ||
skip_eukulele = true | ||
skip_eggnog = true | ||
skip_kofamscan = true | ||
} | ||
} | ||
|
||
then { | ||
assert workflow.success | ||
|
||
assertAll( | ||
{ assert new File("$outputDir/trimgalore/SAMPLE1_PE_1.fastq.gz_trimming_report.txt").exists() }, | ||
{ assert new File("$outputDir/trimgalore/fastqc/SAMPLE1_PE_1_val_1_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/megahit/megahit_out/megahit_assembly.log").exists() }, | ||
{ assert new File("$outputDir/prodigal/megahit.prodigal.gff.gz").exists() }, | ||
{ assert new File("$outputDir/samtools/SAMPLE1_PE.sorted.bam.bai").exists() }, | ||
{ assert new File("$outputDir/bbmap/logs/SAMPLE1_PE.bbmap.log").exists() }, | ||
{ assert new File("$outputDir/featurecounts/SAMPLE1_PE.featureCounts.txt.summary").exists() }, | ||
{ assert new File("$outputDir/summary_tables/megahit.prodigal.counts.tsv.gz").exists() }, | ||
{ assert new File("$outputDir/summary_tables/megahit.prodigal.overall_stats.tsv.gz").exists() }, | ||
{ assert new File("$outputDir/multiqc/multiqc_report.html").exists() }, | ||
{ assert new File("$outputDir/pipeline_info/nf_core_metatdenovo_software_mqc_versions.yml").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,33 @@ | ||
/* | ||
======================================================================================== | ||
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/rnaseq/3.15/' | ||
} | ||
|
||
// Impose sensible resource limits for testing | ||
process { | ||
withName: '.*' { | ||
cpus = 4 | ||
memory = 4.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 } |