|
| 1 | +nextflow_pipeline { |
| 2 | + |
| 3 | + name "Test Workflow main.nf - DIFFERENTIALABUNDANCE (maxquant)" |
| 4 | + script "../main.nf" |
| 5 | + tag "maxquant" |
| 6 | + tag "pipeline" |
| 7 | + profile "test_maxquant,maxquant" |
| 8 | + |
| 9 | + test("Test maxquant profile") { |
| 10 | + |
| 11 | + when { |
| 12 | + params { |
| 13 | + outdir = "$outputDir" |
| 14 | + study_name = 'PXD043349' |
| 15 | + config_profile_name = 'MaxQuant test profile' |
| 16 | + config_profile_description = 'MaxQuant test dataset to check pipeline function' |
| 17 | + |
| 18 | + } |
| 19 | + } |
| 20 | + |
| 21 | + then { |
| 22 | + // stable_name: All files + folders in ${params.outdir}/ with a stable name |
| 23 | + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) |
| 24 | + // stable_path: All files in ${params.outdir}/ with stable content |
| 25 | + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') |
| 26 | + assertAll( |
| 27 | + { assert workflow.success}, |
| 28 | + { assert snapshot( |
| 29 | + // Number of successful tasks |
| 30 | + workflow.trace.succeeded().size(), |
| 31 | + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions |
| 32 | + removeNextflowVersion("$outputDir/pipeline_info/collated_versions.yml"), |
| 33 | + removeNextflowVersion("$outputDir/pipeline_info/nf_core_differentialabundance_software_versions.yml"), |
| 34 | + // All stable path name, with a relative path |
| 35 | + stable_name, |
| 36 | + // All files with stable contents |
| 37 | + stable_path |
| 38 | + ).match() } |
| 39 | + ) |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | + test("Test maxquant profile - with toolsheet") { |
| 44 | + |
| 45 | + when { |
| 46 | + params { |
| 47 | + outdir = "$outputDir" |
| 48 | + paramset_name = "limma_maxquant" |
| 49 | + differential_method = null |
| 50 | + } |
| 51 | + |
| 52 | + } |
| 53 | + |
| 54 | + then { |
| 55 | + // stable_name: All files + folders in ${params.outdir}/ with a stable name |
| 56 | + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) |
| 57 | + // stable_path: All files in ${params.outdir}/ with stable content |
| 58 | + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') |
| 59 | + assertAll( |
| 60 | + { assert workflow.success}, |
| 61 | + { assert snapshot( |
| 62 | + // Number of successful tasks |
| 63 | + workflow.trace.succeeded().size(), |
| 64 | + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions |
| 65 | + removeNextflowVersion("$outputDir/pipeline_info/collated_versions.yml"), |
| 66 | + removeNextflowVersion("$outputDir/pipeline_info/nf_core_differentialabundance_software_versions.yml"), |
| 67 | + // All stable path name, with a relative path |
| 68 | + stable_name, |
| 69 | + // All files with stable contents |
| 70 | + stable_path |
| 71 | + ).match() } |
| 72 | + ) |
| 73 | + } |
| 74 | + } |
| 75 | +} |
0 commit comments