Skip to content

Commit

Permalink
add bwameth_gpu nf-test + snap
Browse files Browse the repository at this point in the history
  • Loading branch information
sateeshperi committed Nov 4, 2024
1 parent db5555a commit 9be68d9
Show file tree
Hide file tree
Showing 4 changed files with 445 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/samplesheet_gpu.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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_sub3,https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub3.fastq.gz,,
61 changes: 61 additions & 0 deletions tests/bwameth_gpu.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
nextflow_pipeline {

name "Test Workflow main.nf"
script "../main.nf"
config "./gpu.config"

test("Params: bwameth") {
when {
params {
aligner = "bwameth"
use_gpu = true
outdir = "$outputDir"
}
}

then {
// stable_name: All files + folders in ${params.outdir}/ with a stable name
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
// stable_path: All files in ${params.outdir}/ with stable content
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
// bam_files: All bam files
def bam_files = getAllFilesFromDir(params.outdir, include: ['**/*.bam'])
assertAll(
{ assert workflow.success},
{ assert snapshot(
// Number of tasks
workflow.trace.succeeded().size(),
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"),
// All stable path name
stable_name,
// All files with stable contents
stable_path,
// All bam files
bam_files.collect{ file -> [ file.getName(), bam(file.toString()).getReadsMD5() ] }
).match() }
)
}
}

test("Params: bwameth with bwameth-index") {
when {
params {
aligner = "bwameth"
bwameth_index = "https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bwameth_Index.tar.gz"
outdir = "$outputDir"
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(
// Number of tasks
workflow.trace.succeeded().size()
).match() }
)
}
}

}
Loading

0 comments on commit 9be68d9

Please sign in to comment.