-
Notifications
You must be signed in to change notification settings - Fork 717
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 #1467 from nf-core/test_umi
Add test suite for UMI handling functionality
- Loading branch information
Showing
5 changed files
with
2,942 additions
and
6 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
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,110 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test pipeline with dummy UMI settings" | ||
script "../main.nf" | ||
|
||
test("Params: --aligner hisat2 --umi_dedup_tool 'umicollapse'") { | ||
|
||
when { | ||
params { | ||
with_umi = true | ||
umitools_extract_method = "regex" | ||
umitools_bc_pattern = "^(?P<umi_1>CGA.{8}){s<=2}.*" | ||
umitools_dedup_stats = true | ||
skip_bbsplit = true | ||
umi_dedup_tool = 'umicollapse' | ||
aligner = 'hisat2' | ||
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') | ||
assertAll( | ||
{ assert workflow.success}, | ||
{ assert snapshot( | ||
// Number of successful 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_rnaseq_software_mqc_versions.yml"), | ||
// All stable path name, with a relative path | ||
stable_name, | ||
// All files with stable contents | ||
stable_path | ||
).match() } | ||
) | ||
} | ||
} | ||
|
||
test("--umi_dedup_tool 'umitools'") { | ||
|
||
when { | ||
params { | ||
with_umi = true | ||
umitools_extract_method = "regex" | ||
umitools_bc_pattern = "^(?P<umi_1>CGA.{8}){s<=2}.*" | ||
umitools_dedup_stats = true | ||
skip_bbsplit = 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') | ||
assertAll( | ||
{ assert workflow.success}, | ||
{ assert snapshot( | ||
// Number of successful 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_rnaseq_software_mqc_versions.yml"), | ||
// All stable path name, with a relative path | ||
stable_name, | ||
// All files with stable contents | ||
stable_path | ||
).match() } | ||
) | ||
} | ||
} | ||
|
||
test("--umi_dedup_tool 'umitools - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
params { | ||
with_umi = true | ||
umitools_extract_method = "regex" | ||
umitools_bc_pattern = "^(?P<umi_1>CGA.{8}){s<=2}.*" | ||
umitools_dedup_stats = 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') | ||
assertAll( | ||
{ assert workflow.success}, | ||
{ assert snapshot( | ||
// Number of successful 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_rnaseq_software_mqc_versions.yml"), | ||
// All stable path name, with a relative path | ||
stable_name, | ||
// All files with stable contents | ||
stable_path | ||
).match() } | ||
) | ||
} | ||
} | ||
} |
Oops, something went wrong.