|
| 1 | +nextflow_process { |
| 2 | + |
| 3 | + name "Test Process CIVICPY_ANNOTATE" |
| 4 | + script "../main.nf" |
| 5 | + process "CIVICPY_ANNOTATE" |
| 6 | + config "./nextflow.config" |
| 7 | + tag "modules" |
| 8 | + tag "modules_nfcore" |
| 9 | + tag "civicpy" |
| 10 | + tag "civicpy/annotate" |
| 11 | + |
| 12 | + test("homo_sapiens - vcf - GRCh38") { |
| 13 | + |
| 14 | + when { |
| 15 | + process { |
| 16 | + """ |
| 17 | + input[0] = [ |
| 18 | + [ id:'test_sample' ], |
| 19 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), |
| 20 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi', checkIfExists: true) |
| 21 | + ] |
| 22 | + input[1] = 'GRCh38' |
| 23 | + """ |
| 24 | + } |
| 25 | + } |
| 26 | + |
| 27 | + then { |
| 28 | + assertAll( |
| 29 | + { assert process.success }, |
| 30 | + { assert snapshot( |
| 31 | + path(process.out.vcf[0][1]).vcf.variantsMD5, |
| 32 | + process.out.versions_civicpy |
| 33 | + ).match() } |
| 34 | + ) |
| 35 | + } |
| 36 | + |
| 37 | + } |
| 38 | + |
| 39 | + test("homo_sapiens - vcf - GRCh37") { |
| 40 | + |
| 41 | + when { |
| 42 | + process { |
| 43 | + """ |
| 44 | + input[0] = [ |
| 45 | + [ id:'test_sample' ], |
| 46 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), |
| 47 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi', checkIfExists: true) |
| 48 | + ] |
| 49 | + input[1] = 'GRCh37' |
| 50 | + """ |
| 51 | + } |
| 52 | + } |
| 53 | + |
| 54 | + then { |
| 55 | + assertAll( |
| 56 | + { assert process.success }, |
| 57 | + { assert snapshot( |
| 58 | + path(process.out.vcf[0][1]).vcf.variantsMD5, |
| 59 | + process.out.versions_civicpy |
| 60 | + ).match() } |
| 61 | + ) |
| 62 | + } |
| 63 | + |
| 64 | + } |
| 65 | + |
| 66 | + test("homo_sapiens - vcf - GRCh38 - stub") { |
| 67 | + |
| 68 | + options "-stub" |
| 69 | + |
| 70 | + when { |
| 71 | + process { |
| 72 | + """ |
| 73 | + input[0] = [ |
| 74 | + [ id:'test_sample' ], |
| 75 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true), |
| 76 | + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi', checkIfExists: true) |
| 77 | + ] |
| 78 | + input[1] = 'GRCh38' |
| 79 | + """ |
| 80 | + } |
| 81 | + } |
| 82 | + |
| 83 | + then { |
| 84 | + assertAll( |
| 85 | + { assert process.success }, |
| 86 | + { assert snapshot( |
| 87 | + file(process.out.vcf[0][1]).name, |
| 88 | + process.out.versions_civicpy |
| 89 | + ).match() } |
| 90 | + ) |
| 91 | + } |
| 92 | + |
| 93 | + } |
| 94 | + |
| 95 | +} |
0 commit comments