forked from nf-core/rnaseq
-
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.
Merge pull request nf-core#1220 from adamrtalbot/nf-test-init
nf-test at the pipeline level
- Loading branch information
Showing
8 changed files
with
117 additions
and
4 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,8 +1,12 @@ | ||
*.pyc | ||
.DS_Store | ||
.nextflow* | ||
work/ | ||
.nf-test.log | ||
data/ | ||
nf-test | ||
.nf-test* | ||
results/ | ||
.DS_Store | ||
testing/ | ||
test.xml | ||
testing* | ||
*.pyc | ||
testing/ | ||
work/ |
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,12 @@ | ||
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" | ||
|
||
profile "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Function to remove Nextflow version from software_versions.yml | ||
|
||
class UTILS { | ||
public static String removeNextflowVersion(outputDir) { | ||
def softwareVersions = path("$outputDir/pipeline_info/software_versions.yml").yaml | ||
if (softwareVersions.containsKey("Workflow")) { | ||
softwareVersions.Workflow.remove("Nextflow") | ||
} | ||
return softwareVersions | ||
} | ||
} |
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,39 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test pipeline" | ||
script "../main.nf" | ||
tag "rnaseq" | ||
tag "PIPELINE" | ||
|
||
test("Run with profile test") { | ||
|
||
when { | ||
params { | ||
outdir = "$outputDir" | ||
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/7f1614baeb0ddf66e60be78c3d9fa55440465ac8/samplesheet/v3.10/samplesheet_test.csv' | ||
} | ||
} | ||
|
||
then { | ||
assert workflow.success | ||
|
||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("single_end_software_versions") }, | ||
{ assert snapshot(path("$outputDir/bbsplit/").list(), | ||
path("$outputDir/salmon/").list(), | ||
path("$outputDir/star_salmon/").list(), | ||
path("$outputDir/trimgalore/").list()) }, | ||
{ assert new File("$outputDir/fastqc/RAP1_IAA_30M_REP1_1_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/RAP1_IAA_30M_REP1_2_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/RAP1_UNINDUCED_REP1_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/RAP1_UNINDUCED_REP2_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/WT_REP1_1_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/WT_REP1_2_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/WT_REP2_1_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/fastqc/WT_REP2_2_fastqc.html").exists() }, | ||
{ assert new File("$outputDir/multiqc/star_salmon/multiqc_report.html").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,12 @@ | ||
{ | ||
"single_end_software_versions": { | ||
"content": [ | ||
"{BBMAP_BBSPLIT={bbmap=39.01}, BEDTOOLS_GENOMECOV={bedtools=2.30.0}, CAT_ADDITIONAL_FASTA={python=3.9.5}, CAT_FASTQ={cat=8.30}, CUSTOM_DUMPSOFTWAREVERSIONS={python=3.11.7, yaml=5.4.1}, CUSTOM_GETCHROMSIZES={getchromsizes=1.16.1}, DESEQ2_QC_PSEUDO={bioconductor-deseq2=1.28.0, r-base=4.0.3}, DESEQ2_QC_STAR_SALMON={bioconductor-deseq2=1.28.0, r-base=4.0.3}, DUPRADAR={bioconductor-dupradar=1.28.0, r-base=4.2.1}, FASTQC={fastqc=0.12.1}, FQ_SUBSAMPLE={fq=0.9.1 (2022-02-22)}, GTF2BED={perl=5.26.2}, GTF_FILTER={python=3.9.5}, GUNZIP_ADDITIONAL_FASTA={gunzip=1.10}, GUNZIP_GTF={gunzip=1.10}, MULTIQC_CUSTOM_BIOTYPE={python=3.9.5}, PICARD_MARKDUPLICATES={picard=3.0.0}, QUALIMAP_RNASEQ={qualimap=2.3}, RSEQC_BAMSTAT={rseqc=5.0.2}, RSEQC_INFEREXPERIMENT={rseqc=5.0.2}, RSEQC_INNERDISTANCE={rseqc=5.0.2}, RSEQC_JUNCTIONANNOTATION={rseqc=5.0.2}, RSEQC_JUNCTIONSATURATION={rseqc=5.0.2}, RSEQC_READDISTRIBUTION={rseqc=5.0.2}, RSEQC_READDUPLICATION={rseqc=5.0.2}, SALMON_QUANT={salmon=1.10.1}, SAMTOOLS_FLAGSTAT={samtools=1.17}, SAMTOOLS_IDXSTATS={samtools=1.17}, SAMTOOLS_INDEX={samtools=1.17}, SAMTOOLS_SORT={samtools=1.17}, SAMTOOLS_STATS={samtools=1.17}, SE_GENE={bioconductor-summarizedexperiment=1.24.0, r-base=4.1.1}, STAR_ALIGN={gawk=5.1.0, samtools=1.16.1, star=2.7.9a}, STAR_GENOMEGENERATE={gawk=5.1.0, samtools=1.16.1, star=2.7.9a}, STRINGTIE_STRINGTIE={stringtie=2.2.1}, SUBREAD_FEATURECOUNTS={subread=2.0.1}, TRIMGALORE={cutadapt=3.4, trimgalore=0.6.7}, TX2GENE={python=3.9.5}, TXIMPORT={bioconductor-tximeta=1.12.0, r-base=4.1.1}, UCSC_BEDCLIP={ucsc=377}, UCSC_BEDGRAPHTOBIGWIG={ucsc=445}, UNTAR_SALMON_INDEX={untar=1.30}, Workflow={nf-core/rnaseq=3.15.0dev}}" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.1" | ||
}, | ||
"timestamp": "2024-02-09T16:13:24.846838" | ||
} | ||
} |
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 = 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 } |