|
| 1 | +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: |
| 2 | +// nf-core modules test oncocnv |
| 3 | +nextflow_process { |
| 4 | + |
| 5 | + name "Test Process ONCOCNV" |
| 6 | + script "../main.nf" |
| 7 | + process "ONCOCNV" |
| 8 | + |
| 9 | + tag "modules" |
| 10 | + tag "modules_nfcore" |
| 11 | + tag "oncocnv" |
| 12 | + |
| 13 | + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used |
| 14 | + test("sarscov2 - bam") { |
| 15 | + |
| 16 | + // TODO nf-core: If you are created a test for a chained module |
| 17 | + // (the module requires running more than one process to generate the required output) |
| 18 | + // add the 'setup' method here. |
| 19 | + // You can find more information about how to use a 'setup' method in the docs (https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules). |
| 20 | + |
| 21 | + when { |
| 22 | + process { |
| 23 | + """ |
| 24 | + input[0] = [ |
| 25 | + [id:'test', single_end:false], // meta map |
| 26 | + [ |
| 27 | + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true), |
| 28 | + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), |
| 29 | + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), |
| 30 | + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam'], checkIfExists: true), |
| 31 | + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_markduplicates_sorted_bam'], checkIfExists: true), |
| 32 | + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), |
| 33 | + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam_bai'], checkIfExists: true), |
| 34 | + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_markduplicates_sorted_bam_bai'], checkIfExists: true), |
| 35 | + ] |
| 36 | + ] |
| 37 | + input[1] = file(params.test_data['homo_sapiens']['genome']['genome_21_annotated_bed'], checkIfExists: true) |
| 38 | + input[2] = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists:true) |
| 39 | + """ |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | + then { |
| 44 | + assertAll( |
| 45 | + { assert process.success }, |
| 46 | + { assert snapshot(process.out).match() } |
| 47 | + //TODO nf-core: Add all required assertions to verify the test output. |
| 48 | + // See https://nf-co.re/docs/contributing/tutorials/nf-test_assertions for more information and examples. |
| 49 | + ) |
| 50 | + } |
| 51 | + |
| 52 | + } |
| 53 | + |
| 54 | + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix. |
| 55 | + test("sarscov2 - bam - stub") { |
| 56 | + |
| 57 | + options "-stub" |
| 58 | + |
| 59 | + when { |
| 60 | + process { |
| 61 | + """ |
| 62 | + input[0] = [ |
| 63 | + [id:'test', single_end:false], // meta map |
| 64 | + [ |
| 65 | + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true), |
| 66 | + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), |
| 67 | + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), |
| 68 | + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam'], checkIfExists: true), |
| 69 | + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_markduplicates_sorted_bam'], checkIfExists: true), |
| 70 | + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), |
| 71 | + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam_bai'], checkIfExists: true), |
| 72 | + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_markduplicates_sorted_bam_bai'], checkIfExists: true), |
| 73 | + ] |
| 74 | + ] |
| 75 | + input[1] = file(params.test_data['homo_sapiens']['genome']['genome_21_annotated_bed'], checkIfExists: true) |
| 76 | + input[2] = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists:true) |
| 77 | + """ |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + then { |
| 82 | + assertAll( |
| 83 | + { assert process.success }, |
| 84 | + { assert snapshot(process.out).match() } |
| 85 | + //TODO nf-core: Add all required assertions to verify the test output. |
| 86 | + ) |
| 87 | + } |
| 88 | + |
| 89 | + } |
| 90 | + |
| 91 | +} |
0 commit comments