|
| 1 | +nextflow_process { |
| 2 | + |
| 3 | + name "Test Process FINALETOOLKIT_AGGBW" |
| 4 | + script "../main.nf" |
| 5 | + process "FINALETOOLKIT_AGGBW" |
| 6 | + |
| 7 | + tag "modules" |
| 8 | + tag "modules_nfcore" |
| 9 | + tag "finaletoolkit" |
| 10 | + tag "finaletoolkit/wps" |
| 11 | + tag "finaletoolkit/adjustwps" |
| 12 | + tag "finaletoolkit/aggbw" |
| 13 | + |
| 14 | + test("homo_sapiens - bigwig") { |
| 15 | + |
| 16 | + setup { |
| 17 | + |
| 18 | + config "./nextflow.config" |
| 19 | + run("FINALETOOLKIT_WPS") { |
| 20 | + script("../../wps/main.nf") |
| 21 | + process { |
| 22 | + """ |
| 23 | + input[0] = [ |
| 24 | + [ id:'test' ], |
| 25 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/NA12878.chr22.bam', checkIfExists: true), |
| 26 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/NA12878.chr22.bam.bai', checkIfExists: true), |
| 27 | + ] |
| 28 | + input[1] = [ |
| 29 | + [id: 'tss' ], |
| 30 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_tss.bed', checkIfExists: true), |
| 31 | + ] |
| 32 | + input[2] = [ |
| 33 | + [id: 'sizes' ], |
| 34 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.sizes', checkIfExists: true), |
| 35 | + ] |
| 36 | + """ |
| 37 | + } |
| 38 | + } |
| 39 | + run("FINALETOOLKIT_ADJUSTWPS") { |
| 40 | + script("../../adjustwps/main.nf") |
| 41 | + process { |
| 42 | + """ |
| 43 | + input[0] = FINALETOOLKIT_WPS.out.bigwig |
| 44 | + input[1] = [ |
| 45 | + [id: 'tss' ], |
| 46 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_tss.bed', checkIfExists: true), |
| 47 | + ] |
| 48 | + input[2] = Channel.of('chr22\t50818468') |
| 49 | + .collectFile(name: 'chr22.sizes', newLine: true) |
| 50 | + .map { sizes -> [[id: 'sizes' ], sizes] } |
| 51 | + """ |
| 52 | + |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | + |
| 57 | + when { |
| 58 | + |
| 59 | + process { |
| 60 | + |
| 61 | + config "./nextflow.config" |
| 62 | + |
| 63 | + """ |
| 64 | + input[0] = FINALETOOLKIT_ADJUSTWPS.out.bigwig |
| 65 | + input[1] = [ |
| 66 | + [id: 'tss' ], |
| 67 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_tss.bed', checkIfExists: true), |
| 68 | + ] |
| 69 | + """ |
| 70 | + } |
| 71 | + } |
| 72 | + |
| 73 | + then { |
| 74 | + assert process.success |
| 75 | + assertAll( |
| 76 | + { assert snapshot(sanitizeOutput(process.out)).match() } |
| 77 | + ) |
| 78 | + |
| 79 | + } |
| 80 | + |
| 81 | + } |
| 82 | + |
| 83 | + test("homo_sapiens - stub") { |
| 84 | + |
| 85 | + options "-stub" |
| 86 | + |
| 87 | + |
| 88 | + when { |
| 89 | + |
| 90 | + process { |
| 91 | + |
| 92 | + config "./nextflow.config" |
| 93 | + |
| 94 | + """ |
| 95 | + input[0] = [ |
| 96 | + [ id: 'test'], |
| 97 | + [] |
| 98 | + ] |
| 99 | + input[1] = [ |
| 100 | + [id: 'tss' ], |
| 101 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_tss.bed', checkIfExists: true), |
| 102 | + ] |
| 103 | + """ |
| 104 | + } |
| 105 | + } |
| 106 | + |
| 107 | + then { |
| 108 | + assert process.success |
| 109 | + assertAll( |
| 110 | + { assert snapshot(sanitizeOutput(process.out)).match() } |
| 111 | + ) |
| 112 | + |
| 113 | + } |
| 114 | + |
| 115 | + } |
| 116 | + |
| 117 | +} |
0 commit comments