|
1 | 1 | nextflow_pipeline { |
2 | 2 |
|
3 | | - name "Test Workflow main.nf on NovaSeq6000 data sample size 90" |
| 3 | + name "Test Workflow main.nf on NovaSeq6000 data with different sample sizes" |
4 | 4 | script "../main.nf" |
5 | 5 | tag "seqinspector" |
6 | 6 | tag "PIPELINE" |
@@ -38,4 +38,77 @@ nextflow_pipeline { |
38 | 38 | ) |
39 | 39 | } |
40 | 40 | } |
| 41 | + |
| 42 | + test("NovaSeq6000 data test relative sample size") { |
| 43 | + |
| 44 | + when { |
| 45 | + config "./NovaSeq6000.main_subsample.nf.test.config" |
| 46 | + params { |
| 47 | + outdir = "$outputDir" |
| 48 | + sample_size = 0.9 |
| 49 | + } |
| 50 | + } |
| 51 | + |
| 52 | + then { |
| 53 | + // stable_name: All files + folders in ${params.outdir}/ with a stable name |
| 54 | + def stable_name = getAllFilesFromDir( |
| 55 | + params.outdir, |
| 56 | + relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'] |
| 57 | + ) |
| 58 | + // stable_path: All files in ${params.outdir}/ with stable content |
| 59 | + def stable_path = getAllFilesFromDir( |
| 60 | + params.outdir, |
| 61 | + ignoreFile: 'tests/.nftignore' |
| 62 | + ) |
| 63 | + assertAll( |
| 64 | + { assert workflow.success}, |
| 65 | + { assert snapshot( |
| 66 | + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions |
| 67 | + removeNextflowVersion("$outputDir/pipeline_info/nf_core_seqinspector_software_mqc_versions.yml"), |
| 68 | + // All stable path names, with a relative path |
| 69 | + stable_name, |
| 70 | + // All files with stable contents |
| 71 | + stable_path |
| 72 | + ).match() } |
| 73 | + ) |
| 74 | + } |
| 75 | + } |
| 76 | + |
| 77 | + test("NovaSeq6000 data test sample size exceeds available reads") { |
| 78 | + tag "warning" |
| 79 | + |
| 80 | + when { |
| 81 | + config "./NovaSeq6000.main_subsample.nf.test.config" |
| 82 | + params { |
| 83 | + outdir = "$outputDir" |
| 84 | + sample_size = 120 |
| 85 | + } |
| 86 | + } |
| 87 | + |
| 88 | + then { |
| 89 | + // stable_name: All files + folders in ${params.outdir}/ with a stable name |
| 90 | + def stable_name = getAllFilesFromDir( |
| 91 | + params.outdir, |
| 92 | + relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'] |
| 93 | + ) |
| 94 | + // stable_path: All files in ${params.outdir}/ with stable content |
| 95 | + def stable_path = getAllFilesFromDir( |
| 96 | + params.outdir, |
| 97 | + ignoreFile: 'tests/.nftignore' |
| 98 | + ) |
| 99 | + assert workflow.success |
| 100 | + assertAll( |
| 101 | + { assert snapshot( |
| 102 | + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions |
| 103 | + removeNextflowVersion("$outputDir/pipeline_info/nf_core_seqinspector_software_mqc_versions.yml"), |
| 104 | + // All stable path names, with a relative path |
| 105 | + stable_name, |
| 106 | + // All files with stable contents |
| 107 | + stable_path, |
| 108 | + // get all messages containing Requested sample_size (120) |
| 109 | + filterNextflowOutput(workflow.stdout + workflow.stderr, ignore: ['Downloading plugin'], include:['Requested sample_size (120)']) |
| 110 | + ).match() } |
| 111 | + ) |
| 112 | + } |
| 113 | + } |
41 | 114 | } |
0 commit comments