Skip to content

Commit a614b09

Browse files
committed
nf-test snapshots
1 parent a1d12cb commit a614b09

11 files changed

+242
-12
lines changed

tests/nextflow.config

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/pipeline/test_aligner_bowtie2.nf.test

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,33 @@ nextflow_pipeline {
99

1010
when {
1111
params {
12-
outdir = "$outputDir"
12+
outdir = "$outputDir"
1313
aligner = "bowtie2"
1414
}
1515
}
1616

1717
then {
1818
assertAll(
19-
{ assert workflow.success }
19+
{ assert workflow.success },
20+
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") },
21+
{ assert snapshot(path("$outputDir/bowtie2/mergedLibrary/SPT5_INPUT_REP1.mLb.clN.sorted.bam"),
22+
path("$outputDir/bowtie2/mergedLibrary/SPT5_INPUT_REP2.mLb.clN.sorted.bam"),
23+
path("$outputDir/bowtie2/mergedLibrary/SPT5_T0_REP1.mLb.clN.sorted.bam"),
24+
path("$outputDir/bowtie2/mergedLibrary/SPT5_T0_REP2.mLb.clN.sorted.bam"),
25+
path("$outputDir/bowtie2/mergedLibrary/SPT5_T15_REP1.mLb.clN.sorted.bam"),
26+
path("$outputDir/bowtie2/mergedLibrary/SPT5_T15_REP2.mLb.clN.sorted.bam")).match("bwa/mergedLibrary/") },
27+
{ assert new File("$outputDir/bowtie2/mergedLibrary/bigwig/").exists() },
28+
{ assert new File("$outputDir/bowtie2/mergedLibrary/deepTools/").exists() },
29+
{ assert new File("$outputDir/bowtie2/mergedLibrary/macs2/").exists() },
30+
{ assert new File("$outputDir/bowtie2/mergedLibrary/phantompeakqualtools/").exists() },
31+
{ assert new File("$outputDir/bowtie2/mergedLibrary/picard_metrics/").exists() },
32+
{ assert new File("$outputDir/bowtie2/mergedLibrary/samtools_stats/").exists() },
33+
{ assert new File("$outputDir/fastqc/").exists() },
34+
{ assert snapshot(path("$outputDir/genome").list()).match("genome") },
35+
{ assert new File("$outputDir/igv/").exists() },
36+
{ assert new File("$outputDir/multiqc/").exists() },
37+
{ assert new File("$outputDir/pipeline_info/").exists() },
38+
{ assert new File("$outputDir/trimgalore/").exists() }
2039
)
2140
}
2241

tests/pipeline/test_aligner_bowtie2.nf.test.snap

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/pipeline/test_aligner_chromap.nf.test

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,33 @@ nextflow_pipeline {
99

1010
when {
1111
params {
12-
outdir = "$outputDir"
12+
outdir = "$outputDir"
1313
aligner = "chromap"
1414
}
1515
}
1616

1717
then {
1818
assertAll(
19-
{ assert workflow.success }
19+
{ assert workflow.success },
20+
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") },
21+
{ assert snapshot(path("$outputDir/chromap/mergedLibrary/SPT5_INPUT_REP1.mLb.clN.sorted.bam"),
22+
path("$outputDir/chromap/mergedLibrary/SPT5_INPUT_REP2.mLb.clN.sorted.bam"),
23+
path("$outputDir/chromap/mergedLibrary/SPT5_T0_REP1.mLb.clN.sorted.bam"),
24+
path("$outputDir/chromap/mergedLibrary/SPT5_T0_REP2.mLb.clN.sorted.bam"),
25+
path("$outputDir/chromap/mergedLibrary/SPT5_T15_REP1.mLb.clN.sorted.bam"),
26+
path("$outputDir/chromap/mergedLibrary/SPT5_T15_REP2.mLb.clN.sorted.bam")).match("bwa/mergedLibrary/") },
27+
{ assert new File("$outputDir/chromap/mergedLibrary/bigwig/").exists() },
28+
{ assert new File("$outputDir/chromap/mergedLibrary/deepTools/").exists() },
29+
{ assert new File("$outputDir/chromap/mergedLibrary/macs2/").exists() },
30+
{ assert new File("$outputDir/chromap/mergedLibrary/phantompeakqualtools/").exists() },
31+
{ assert new File("$outputDir/chromap/mergedLibrary/picard_metrics/").exists() },
32+
{ assert new File("$outputDir/chromap/mergedLibrary/samtools_stats/").exists() },
33+
{ assert new File("$outputDir/fastqc/").exists() },
34+
{ assert snapshot(path("$outputDir/genome").list()).match("genome") },
35+
{ assert new File("$outputDir/igv/").exists() },
36+
{ assert new File("$outputDir/multiqc/").exists() },
37+
{ assert new File("$outputDir/pipeline_info/").exists() },
38+
{ assert new File("$outputDir/trimgalore/").exists() }
2039
)
2140
}
2241

tests/pipeline/test_aligner_chromap.nf.test.snap

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/pipeline/test_aligner_star.nf.test

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,26 @@ nextflow_pipeline {
1616

1717
then {
1818
assertAll(
19-
{ assert workflow.success }
19+
{ assert workflow.success },
20+
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") },
21+
{ assert snapshot(path("$outputDir/star/mergedLibrary/SPT5_INPUT_REP1.mLb.clN.sorted.bam"),
22+
path("$outputDir/star/mergedLibrary/SPT5_INPUT_REP2.mLb.clN.sorted.bam"),
23+
path("$outputDir/star/mergedLibrary/SPT5_T0_REP1.mLb.clN.sorted.bam"),
24+
path("$outputDir/star/mergedLibrary/SPT5_T0_REP2.mLb.clN.sorted.bam"),
25+
path("$outputDir/star/mergedLibrary/SPT5_T15_REP1.mLb.clN.sorted.bam"),
26+
path("$outputDir/star/mergedLibrary/SPT5_T15_REP2.mLb.clN.sorted.bam")).match("bwa/mergedLibrary/") },
27+
{ assert new File("$outputDir/star/mergedLibrary/bigwig/").exists() },
28+
{ assert new File("$outputDir/star/mergedLibrary/deepTools/").exists() },
29+
{ assert new File("$outputDir/star/mergedLibrary/macs2/").exists() },
30+
{ assert new File("$outputDir/star/mergedLibrary/phantompeakqualtools/").exists() },
31+
{ assert new File("$outputDir/star/mergedLibrary/picard_metrics/").exists() },
32+
{ assert new File("$outputDir/star/mergedLibrary/samtools_stats/").exists() },
33+
{ assert new File("$outputDir/fastqc/").exists() },
34+
{ assert snapshot(path("$outputDir/genome").list()).match("genome") },
35+
{ assert new File("$outputDir/igv/").exists() },
36+
{ assert new File("$outputDir/multiqc/").exists() },
37+
{ assert new File("$outputDir/pipeline_info/").exists() },
38+
{ assert new File("$outputDir/trimgalore/").exists() }
2039
)
2140
}
2241

tests/pipeline/test_aligner_star.nf.test.snap

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/pipeline/test_skip_consensus_peaks.nf.test

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,26 @@ nextflow_pipeline {
1616

1717
then {
1818
assertAll(
19-
{ assert workflow.success }
19+
{ assert workflow.success },
20+
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") },
21+
{ assert snapshot(path("$outputDir/bwa/mergedLibrary/SPT5_INPUT_REP1.mLb.clN.sorted.bam"),
22+
path("$outputDir/bwa/mergedLibrary/SPT5_INPUT_REP2.mLb.clN.sorted.bam"),
23+
path("$outputDir/bwa/mergedLibrary/SPT5_T0_REP1.mLb.clN.sorted.bam"),
24+
path("$outputDir/bwa/mergedLibrary/SPT5_T0_REP2.mLb.clN.sorted.bam"),
25+
path("$outputDir/bwa/mergedLibrary/SPT5_T15_REP1.mLb.clN.sorted.bam"),
26+
path("$outputDir/bwa/mergedLibrary/SPT5_T15_REP2.mLb.clN.sorted.bam")).match("bwa/mergedLibrary/") },
27+
{ assert new File("$outputDir/bwa/mergedLibrary/bigwig/").exists() },
28+
{ assert new File("$outputDir/bwa/mergedLibrary/deepTools/").exists() },
29+
{ assert new File("$outputDir/bwa/mergedLibrary/macs2/").exists() },
30+
{ assert new File("$outputDir/bwa/mergedLibrary/phantompeakqualtools/").exists() },
31+
{ assert new File("$outputDir/bwa/mergedLibrary/picard_metrics/").exists() },
32+
{ assert new File("$outputDir/bwa/mergedLibrary/samtools_stats/").exists() },
33+
{ assert new File("$outputDir/fastqc/").exists() },
34+
{ assert snapshot(path("$outputDir/genome").list()).match("genome") },
35+
{ assert new File("$outputDir/igv/").exists() },
36+
{ assert new File("$outputDir/multiqc/").exists() },
37+
{ assert new File("$outputDir/pipeline_info/").exists() },
38+
{ assert new File("$outputDir/trimgalore/").exists() }
2039
)
2140
}
2241

tests/pipeline/test_skip_consensus_peaks.nf.test.snap

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)