Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(#392): Add boilerplate for tests #393

Merged
merged 7 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/pipeline/bismark/assets/samplesheet.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sample,fastq_1,fastq_2,genome
SRR389222_sub1,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz,,
SRR389222_sub2,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub2.fastq.gz,,
SRR389222_merge,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz,,
SRR389222_merge,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub2.fastq.gz,,
SRR389222_merge,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub3.fastq.gz,,
Ecoli_uniq1,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz,
Ecoli_uniq2,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz,
Ecoli_merge,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz,
Ecoli_merge,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz,
70 changes: 70 additions & 0 deletions tests/pipeline/bismark/samplesheet.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
nextflow_pipeline {

name "Test Replicate Handling"
script "main.nf"

tag "pipeline"


test("Should ____") {
when {
params {
input = "$baseDir/tests/pipeline/bismark/assets/samplesheet.csv"
outdir = "$outputDir"
}
}

then {
assertAll(
{ assert workflow.success },
// TODO Output names should be as expected
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("single_end_software_versions") },
{ assert snapshot(path("$outputDir/bwameth/alignments/samtools_stats/Ecoli.flagstat"),
path("$outputDir/bwameth/alignments/samtools_stats/Ecoli.stats"),
path("$outputDir/bwameth/alignments/samtools_stats/SRR389222_sub1.flagstat"),
path("$outputDir/bwameth/alignments/samtools_stats/SRR389222_sub1.stats"),
path("$outputDir/bwameth/alignments/samtools_stats/SRR389222_sub2.flagstat"),
path("$outputDir/bwameth/alignments/samtools_stats/SRR389222_sub2.stats"),
path("$outputDir/bwameth/alignments/samtools_stats/SRR389222_sub3.flagstat"),
path("$outputDir/bwameth/alignments/samtools_stats/SRR389222_sub3.stats"),
path("$outputDir/bwameth/deduplicated/Ecoli.markdup.sorted.bam"),
path("$outputDir/bwameth/deduplicated/Ecoli.markdup.sorted.bam.bai"),
path("$outputDir/bwameth/deduplicated/SRR389222_sub1.markdup.sorted.bam"),
path("$outputDir/bwameth/deduplicated/SRR389222_sub1.markdup.sorted.bam.bai"),
path("$outputDir/bwameth/deduplicated/SRR389222_sub2.markdup.sorted.bam"),
path("$outputDir/bwameth/deduplicated/SRR389222_sub2.markdup.sorted.bam.bai"),
path("$outputDir/bwameth/deduplicated/SRR389222_sub3.markdup.sorted.bam"),
path("$outputDir/bwameth/deduplicated/SRR389222_sub3.markdup.sorted.bam.bai"),
path("$outputDir/bwameth/reference_genome/").list(),
path("$outputDir/methyldackel/Ecoli.markdup.sorted_CpG.bedGraph"),
path("$outputDir/methyldackel/SRR389222_sub1.markdup.sorted_CpG.bedGraph"),
path("$outputDir/methyldackel/SRR389222_sub2.markdup.sorted_CpG.bedGraph"),
path("$outputDir/methyldackel/SRR389222_sub3.markdup.sorted_CpG.bedGraph"),
path("$outputDir/methyldackel/mbias/Ecoli.mbias.txt"),
path("$outputDir/methyldackel/mbias/SRR389222_sub1.mbias.txt"),
path("$outputDir/methyldackel/mbias/SRR389222_sub2.mbias.txt"),
path("$outputDir/methyldackel/mbias/SRR389222_sub3.mbias.txt"),
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 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/bwameth/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() },
{ assert new File("$outputDir/bwameth/deduplicated/picard_metrics/Ecoli.markdup.sorted.MarkDuplicates.metrics.txt").exists() },
{ assert new File("$outputDir/bwameth/deduplicated/picard_metrics/SRR389222_sub1.markdup.sorted.MarkDuplicates.metrics.txt").exists() },
{ assert new File("$outputDir/bwameth/deduplicated/picard_metrics/SRR389222_sub2.markdup.sorted.MarkDuplicates.metrics.txt").exists() },
{ assert new File("$outputDir/bwameth/deduplicated/picard_metrics/SRR389222_sub3.markdup.sorted.MarkDuplicates.metrics.txt").exists() }
)
}
}

}
Loading