From 83cc25860deecab9d3eb59fedb982e906ba2bc5c Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Mon, 8 Feb 2021 15:16:51 +0100 Subject: [PATCH] Rearranging tests to test each module separately --- .github/filters.yml | 29 +++++++ .github/workflows/bcftools_bgzip.yml | 40 --------- .github/workflows/bcftools_consensus.yml | 44 ---------- .github/workflows/bcftools_filter.yml | 40 --------- .github/workflows/bcftools_isec.yml | 44 ---------- .github/workflows/bcftools_stats.yml | 40 --------- .github/workflows/bcftools_tabix.yml | 42 ---------- tests/software/bcftools/bgzip/main.nf | 14 ++++ tests/software/bcftools/bgzip/test.yml | 8 ++ tests/software/bcftools/consensus/main.nf | 23 +++++ tests/software/bcftools/consensus/test.yml | 12 +++ tests/software/bcftools/filter/main.nf | 15 ++++ tests/software/bcftools/filter/test.yml | 8 ++ tests/software/bcftools/isec/main.nf | 44 ++++++++++ tests/software/bcftools/isec/test.yml | 32 +++++++ tests/software/bcftools/main.nf | 97 ---------------------- tests/software/bcftools/stats/main.nf | 14 ++++ tests/software/bcftools/stats/test.yml | 8 ++ tests/software/bcftools/tabix/main.nf | 16 ++++ tests/software/bcftools/tabix/test.yml | 8 ++ tests/software/bcftools/test.yml | 81 ------------------ 21 files changed, 231 insertions(+), 428 deletions(-) delete mode 100644 .github/workflows/bcftools_bgzip.yml delete mode 100644 .github/workflows/bcftools_consensus.yml delete mode 100644 .github/workflows/bcftools_filter.yml delete mode 100644 .github/workflows/bcftools_isec.yml delete mode 100644 .github/workflows/bcftools_stats.yml delete mode 100644 .github/workflows/bcftools_tabix.yml create mode 100644 tests/software/bcftools/bgzip/main.nf create mode 100644 tests/software/bcftools/bgzip/test.yml create mode 100644 tests/software/bcftools/consensus/main.nf create mode 100644 tests/software/bcftools/consensus/test.yml create mode 100644 tests/software/bcftools/filter/main.nf create mode 100644 tests/software/bcftools/filter/test.yml create mode 100644 tests/software/bcftools/isec/main.nf create mode 100644 tests/software/bcftools/isec/test.yml delete mode 100644 tests/software/bcftools/main.nf create mode 100644 tests/software/bcftools/stats/main.nf create mode 100644 tests/software/bcftools/stats/test.yml create mode 100644 tests/software/bcftools/tabix/main.nf create mode 100644 tests/software/bcftools/tabix/test.yml delete mode 100644 tests/software/bcftools/test.yml diff --git a/.github/filters.yml b/.github/filters.yml index 6a485e8c..345f73f7 100644 --- a/.github/filters.yml +++ b/.github/filters.yml @@ -2,6 +2,35 @@ bandage_image: - software/bandage/image/** - tests/software/bandage/image/** +bcftools_bgzip: + - software/bowtie/bgzip/** + - tests/software/bcftools/bgzip** + +bcftools_consensus: + - software/bowtie/bgzip/** + - software/bowtie/tabix/** + - software/bowtie/consesus/** + - tests/software/bcftools/consesus** + +bcftools_filter: + - software/bowtie/filter/** + - tests/software/bcftools/filter** + +bcftools_isec: + - software/bowtie/bgzip/** + - software/bowtie/tabix/** + - software/bowtie/isec/** + - tests/software/bcftools/isec** + +bcftools_stats: + - software/bowtie/stats/** + - tests/software/bcftools/stats** + +bcftools_tabix: + - software/bowtie/bgzip/** + - software/bowtie/tabix/** + - tests/software/bcftools/tabix** + bowtie_align: - software/bowtie/align/** - software/bowtie/build/** diff --git a/.github/workflows/bcftools_bgzip.yml b/.github/workflows/bcftools_bgzip.yml deleted file mode 100644 index 1a5e1dd7..00000000 --- a/.github/workflows/bcftools_bgzip.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: bcftools_bgzip -on: - push: - paths: - - software/bcftools/bgzip/** - - .github/workflows/bcftools_bgzip.yml - - tests/software/bcftools/** - pull_request: - paths: - - software/bcftools/bgzip/** - - .github/workflows/bcftools_bgzip.yml - - tests/software/bcftools/** - -jobs: - ci_test: - runs-on: ubuntu-latest - strategy: - matrix: - nxf_version: [20.11.0-edge] - env: - NXF_ANSI_LOG: false - steps: - - uses: actions/checkout@v2 - - - name: Install Nextflow - env: - NXF_VER: ${{ matrix.nxf_version }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Install dependencies - run: python -m pip install --upgrade pip pytest-workflow - - # Test the module - - run: pytest --tag bcftools_bgzip --symlink --wt 2 diff --git a/.github/workflows/bcftools_consensus.yml b/.github/workflows/bcftools_consensus.yml deleted file mode 100644 index f53aa04c..00000000 --- a/.github/workflows/bcftools_consensus.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: bcftools_consensus -on: - push: - paths: - - software/bcftools/bgzip/** - - software/bcftools/tabix/** - - software/bcftools/consensus/** - - .github/workflows/bcftools_consensus.yml - - tests/software/bcftools/** - pull_request: - paths: - - software/bcftools/bgzip/** - - software/bcftools/tabix/** - - software/bcftools/consensus/** - - .github/workflows/bcftools_consensus.yml - - tests/software/bcftools/** - -jobs: - ci_test: - runs-on: ubuntu-latest - strategy: - matrix: - nxf_version: [20.11.0-edge] - env: - NXF_ANSI_LOG: false - steps: - - uses: actions/checkout@v2 - - - name: Install Nextflow - env: - NXF_VER: ${{ matrix.nxf_version }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Install dependencies - run: python -m pip install --upgrade pip pytest-workflow - - # Test the module - - run: pytest --tag bcftools_consensus --symlink --wt 2 diff --git a/.github/workflows/bcftools_filter.yml b/.github/workflows/bcftools_filter.yml deleted file mode 100644 index 4b45334c..00000000 --- a/.github/workflows/bcftools_filter.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: bcftools_filter -on: - push: - paths: - - software/bcftools/filter/** - - .github/workflows/bcftools_filter.yml - - tests/software/bcftools/** - pull_request: - paths: - - software/bcftools/filter/** - - .github/workflows/bcftools_filter.yml - - tests/software/bcftools/** - -jobs: - ci_test: - runs-on: ubuntu-latest - strategy: - matrix: - nxf_version: [20.11.0-edge] - env: - NXF_ANSI_LOG: false - steps: - - uses: actions/checkout@v2 - - - name: Install Nextflow - env: - NXF_VER: ${{ matrix.nxf_version }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Install dependencies - run: python -m pip install --upgrade pip pytest-workflow - - # Test the module - - run: pytest --tag bcftools_filter --symlink --wt 2 diff --git a/.github/workflows/bcftools_isec.yml b/.github/workflows/bcftools_isec.yml deleted file mode 100644 index 54231ddb..00000000 --- a/.github/workflows/bcftools_isec.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: bcftools_isec -on: - push: - paths: - - software/bcftools/bgzip/** - - software/bcftools/tabix/** - - software/bcftools/isec/** - - .github/workflows/bcftools_isec.yml - - tests/software/bcftools/** - pull_request: - paths: - - software/bcftools/bgzip/** - - software/bcftools/tabix/** - - software/bcftools/isec/** - - .github/workflows/bcftools_tabix.yml - - tests/software/bcftools/** - -jobs: - ci_test: - runs-on: ubuntu-latest - strategy: - matrix: - nxf_version: [20.11.0-edge] - env: - NXF_ANSI_LOG: false - steps: - - uses: actions/checkout@v2 - - - name: Install Nextflow - env: - NXF_VER: ${{ matrix.nxf_version }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Install dependencies - run: python -m pip install --upgrade pip pytest-workflow - - # Test the module - - run: pytest --tag bcftools_isec --symlink --wt 2 diff --git a/.github/workflows/bcftools_stats.yml b/.github/workflows/bcftools_stats.yml deleted file mode 100644 index 1fee2bab..00000000 --- a/.github/workflows/bcftools_stats.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: bcftools_stats -on: - push: - paths: - - software/bcftools/stats/** - - .github/workflows/bcftools_stats.yml - - tests/software/bcftools/** - pull_request: - paths: - - software/bcftools/stats/** - - .github/workflows/bcftools_stats.yml - - tests/software/bcftools/** - -jobs: - ci_test: - runs-on: ubuntu-latest - strategy: - matrix: - nxf_version: [20.11.0-edge] - env: - NXF_ANSI_LOG: false - steps: - - uses: actions/checkout@v2 - - - name: Install Nextflow - env: - NXF_VER: ${{ matrix.nxf_version }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Install dependencies - run: python -m pip install --upgrade pip pytest-workflow - - # Test the module - - run: pytest --tag bcftools_stats --symlink --wt 2 diff --git a/.github/workflows/bcftools_tabix.yml b/.github/workflows/bcftools_tabix.yml deleted file mode 100644 index 2a811eb2..00000000 --- a/.github/workflows/bcftools_tabix.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: bcftools_tabix -on: - push: - paths: - - software/bcftools/bgzip/** - - software/bcftools/tabix/** - - .github/workflows/bcftools_tabix.yml - - tests/software/bcftools/** - pull_request: - paths: - - software/bcftools/bgzip/** - - software/bcftools/tabix/** - - .github/workflows/bcftools_tabix.yml - - tests/software/bcftools/** - -jobs: - ci_test: - runs-on: ubuntu-latest - strategy: - matrix: - nxf_version: [20.11.0-edge] - env: - NXF_ANSI_LOG: false - steps: - - uses: actions/checkout@v2 - - - name: Install Nextflow - env: - NXF_VER: ${{ matrix.nxf_version }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Install dependencies - run: python -m pip install --upgrade pip pytest-workflow - - # Test the module - - run: pytest --tag bcftools_tabix --symlink --wt 2 diff --git a/tests/software/bcftools/bgzip/main.nf b/tests/software/bcftools/bgzip/main.nf new file mode 100644 index 00000000..16d81fcc --- /dev/null +++ b/tests/software/bcftools/bgzip/main.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_BGZIP } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) + +workflow test_bcftools_bgzip { + + def input = [] + input = [ [ id:'test' ], // meta map + file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] + + BCFTOOLS_BGZIP ( input ) +} diff --git a/tests/software/bcftools/bgzip/test.yml b/tests/software/bcftools/bgzip/test.yml new file mode 100644 index 00000000..17c4b4d4 --- /dev/null +++ b/tests/software/bcftools/bgzip/test.yml @@ -0,0 +1,8 @@ +- name: Run bcftools bgzip test workflow + command: nextflow run ./tests/software/bcftools/bgzip -entry test_bcftools_bgzip -c tests/config/nextflow.config + tags: + - bcftools + - bcftools_bgzip + files: + - path: output/bcftools/test.vcf.gz + md5sum: eb75ae1f08a1884f8edc59ed423471a2 diff --git a/tests/software/bcftools/consensus/main.nf b/tests/software/bcftools/consensus/main.nf new file mode 100644 index 00000000..f5c780ec --- /dev/null +++ b/tests/software/bcftools/consensus/main.nf @@ -0,0 +1,23 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_BGZIP as BCFTOOLS_BGZIP } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) +include { BCFTOOLS_TABIX as BCFTOOLS_TABIX } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] ) +include { BCFTOOLS_CONSENSUS as BCFTOOLS_CONSENSUS } from '../../../../software/bcftools/consensus/main.nf' addParams( options: [:] ) + +workflow test_bcftools_consensus { + + def input = [] + input = [ [ id:'test' ], // meta map + file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] + def fasta = [] + fasta = Channel.of ([ [ id:'test' ], // meta map + file("${launchDir}/tests/data/vcf/test.consensus.fa", checkIfExists: true) ]) + + BCFTOOLS_BGZIP ( input ) + BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf ) + BCFTOOLS_CONSENSUS ( BCFTOOLS_BGZIP.out.vcf + .join( BCFTOOLS_TABIX.out.tbi, by: [0] ) + .join( fasta, by: [0] ) ) +} diff --git a/tests/software/bcftools/consensus/test.yml b/tests/software/bcftools/consensus/test.yml new file mode 100644 index 00000000..e63d8635 --- /dev/null +++ b/tests/software/bcftools/consensus/test.yml @@ -0,0 +1,12 @@ +- name: Run bcftools consensus test workflow + command: nextflow run ./tests/software/bcftools/consensus -entry test_bcftools_consensus -c tests/config/nextflow.config + tags: + - bcftools + - bcftools_consensus + files: + - path: output/bcftools/test.vcf.gz + md5sum: eb75ae1f08a1884f8edc59ed423471a2 + - path: output/bcftools/test.vcf.gz.tbi + md5sum: 06d52177f819730dd409157914534e8d + - path: output/bcftools/test.fa + md5sum: c9e7ac4537756a0b33bcf17117f9a065 diff --git a/tests/software/bcftools/filter/main.nf b/tests/software/bcftools/filter/main.nf new file mode 100644 index 00000000..79e3ee34 --- /dev/null +++ b/tests/software/bcftools/filter/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +//keep --no-verson argument, otherwise md5 will change on each execution +include { BCFTOOLS_FILTER } from '../../../../software/bcftools/filter/main.nf' addParams( options: ['args': '--no-version'] ) + +workflow test_bcftools_filter { + + def input = [] + input = [ [ id:'test' ], // meta map + file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] + + BCFTOOLS_FILTER ( input ) +} diff --git a/tests/software/bcftools/filter/test.yml b/tests/software/bcftools/filter/test.yml new file mode 100644 index 00000000..bba7562b --- /dev/null +++ b/tests/software/bcftools/filter/test.yml @@ -0,0 +1,8 @@ +- name: Run bcftools filter test workflow + command: nextflow run ./tests/software/bcftools/filter -entry test_bcftools_filter -c tests/config/nextflow.config + tags: + - bcftools + - bcftools_filter + files: + - path: output/bcftools/test.vcf.gz + md5sum: 16947ce72a127938d881113a1e6e696b diff --git a/tests/software/bcftools/isec/main.nf b/tests/software/bcftools/isec/main.nf new file mode 100644 index 00000000..ece2bc38 --- /dev/null +++ b/tests/software/bcftools/isec/main.nf @@ -0,0 +1,44 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_BGZIP } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) +include { BCFTOOLS_TABIX } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] ) +include { BCFTOOLS_ISEC } from '../../../../software/bcftools/isec/main.nf' addParams( options: ['args': '--nfiles +2 --output-type z --no-version'] ) +include { BCFTOOLS_BGZIP as BCFTOOLS_BGZIP2 } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) +include { BCFTOOLS_TABIX as BCFTOOLS_TABIX2 } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] ) +include { BCFTOOLS_BGZIP as BCFTOOLS_BGZIP3 } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) +include { BCFTOOLS_TABIX as BCFTOOLS_TABIX3 } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] ) + +workflow test_bcftools_isec { + + def input1, input2, input3 = [] + + input1 = [ [ id:'test1' ], // meta map + file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] + + input2 = [ [ id:'test2' ], // meta map + file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] + + input3 = [ [ id:'test3' ], // meta map + file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] + + BCFTOOLS_BGZIP ( input1 ) + BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf ) + BCFTOOLS_BGZIP2 ( input2 ) + BCFTOOLS_TABIX2 ( BCFTOOLS_BGZIP2.out.vcf ) + BCFTOOLS_BGZIP3 ( input3 ) + BCFTOOLS_TABIX3 ( BCFTOOLS_BGZIP3.out.vcf ) + + vcfs = BCFTOOLS_BGZIP.out.vcf + .mix( BCFTOOLS_BGZIP2.out.vcf ) + .mix( BCFTOOLS_BGZIP3.out.vcf ) + .map { [ it[1] ]}.collect().map { [ [id: 'test'], it ] } + + tbis = BCFTOOLS_TABIX.out.tbi + .mix( BCFTOOLS_TABIX2.out.tbi ) + .mix( BCFTOOLS_TABIX3.out.tbi ) + .map { [ it[1] ]}.collect().map { [ [id: 'test'], it ] } + + BCFTOOLS_ISEC ( vcfs.join(tbis) ) +} diff --git a/tests/software/bcftools/isec/test.yml b/tests/software/bcftools/isec/test.yml new file mode 100644 index 00000000..924e1b97 --- /dev/null +++ b/tests/software/bcftools/isec/test.yml @@ -0,0 +1,32 @@ +- name: Run bcftools isec test workflow + command: nextflow run ./tests/software/bcftools/isec -entry test_bcftools_isec -c tests/config/nextflow.config + tags: + - bcftools + - bcftools_isec + files: + - path: output/bcftools/test1.vcf.gz + md5sum: eb75ae1f08a1884f8edc59ed423471a2 + - path: output/bcftools/test1.vcf.gz.tbi + md5sum: 06d52177f819730dd409157914534e8d + - path: output/bcftools/test2.vcf.gz + md5sum: eb75ae1f08a1884f8edc59ed423471a2 + - path: output/bcftools/test2.vcf.gz.tbi + md5sum: 06d52177f819730dd409157914534e8d + - path: output/bcftools/test3.vcf.gz + md5sum: eb75ae1f08a1884f8edc59ed423471a2 + - path: output/bcftools/test/0000.vcf.gz + md5sum: 4e84e3b6903fa44e8bd1acdeff9b265d + - path: output/bcftools/test/0000.vcf.gz.tbi + md5sum: 8484b151ef902e25e54f7713d46ed90e + - path: output/bcftools/test/0001.vcf.gz + md5sum: 4e84e3b6903fa44e8bd1acdeff9b265d + - path: output/bcftools/test/0001.vcf.gz.tbi + md5sum: 8484b151ef902e25e54f7713d46ed90e + - path: output/bcftools/test/0002.vcf.gz + md5sum: 4e84e3b6903fa44e8bd1acdeff9b265d + - path: output/bcftools/test/0002.vcf.gz.tbi + md5sum: 8484b151ef902e25e54f7713d46ed90e + - path: output/bcftools/test/README.txt + md5sum: 306fcb71aafe414046a34bedd4d14304 + - path: output/bcftools/test/sites.txt + md5sum: 01bb949ed7825ecf692bf0640e363647 diff --git a/tests/software/bcftools/main.nf b/tests/software/bcftools/main.nf deleted file mode 100644 index b4397f65..00000000 --- a/tests/software/bcftools/main.nf +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -//keep arg of bcftools_filter, otherwise md5 will change on each execution -include { BCFTOOLS_FILTER } from '../../../software/bcftools/filter/main.nf' addParams( options: ['args': '--no-version'] ) -include { BCFTOOLS_STATS } from '../../../software/bcftools/stats/main.nf' addParams( options: [:] ) -include { BCFTOOLS_BGZIP } from '../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) -include { BCFTOOLS_TABIX } from '../../../software/bcftools/tabix/main.nf' addParams( options: [:] ) -include { BCFTOOLS_CONSENSUS } from '../../../software/bcftools/consensus/main.nf' addParams( options: [:] ) -include { BCFTOOLS_ISEC } from '../../../software/bcftools/isec/main.nf' addParams( options: ['args': '--nfiles +2 --output-type z --no-version'] ) -include { BCFTOOLS_BGZIP as BCFTOOLS_BGZIP2 } from '../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) -include { BCFTOOLS_TABIX as BCFTOOLS_TABIX2 } from '../../../software/bcftools/tabix/main.nf' addParams( options: [:] ) -include { BCFTOOLS_BGZIP as BCFTOOLS_BGZIP3 } from '../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) -include { BCFTOOLS_TABIX as BCFTOOLS_TABIX3 } from '../../../software/bcftools/tabix/main.nf' addParams( options: [:] ) - -workflow test_bcftools_filter { - - def input = [] - input = [ [ id:'test' ], // meta map - file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] - - BCFTOOLS_FILTER ( input ) -} - -workflow test_bcftools_stats { - - def input = [] - input = [ [ id:'test' ], // meta map - file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] - - BCFTOOLS_STATS ( input ) -} - -workflow test_bcftools_bgzip { - - def input = [] - input = [ [ id:'test' ], // meta map - file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] - - BCFTOOLS_BGZIP ( input ) -} - -workflow test_bcftools_tabix { - - def input = [] - input = [ [ id:'test' ], // meta map - file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] - - BCFTOOLS_BGZIP ( input ) - BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf ) -} - -workflow test_bcftools_consensus { - - def input = [] - input = [ [ id:'test' ], // meta map - file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] - def fasta = [] - fasta = Channel.of ([ [ id:'test' ], // meta map - file("${launchDir}/tests/data/vcf/test.consensus.fa", checkIfExists: true) ]) - - BCFTOOLS_BGZIP ( input ) - BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf ) - BCFTOOLS_CONSENSUS ( BCFTOOLS_BGZIP.out.vcf - .join( BCFTOOLS_TABIX.out.tbi, by: [0] ) - .join( fasta, by: [0] ) ) -} - -workflow test_bcftools_isec { - - def input = [] - input1 = [ [ id:'test1' ], // meta map - file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] - - input2 = [ [ id:'test2' ], // meta map - file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] - - input3 = [ [ id:'test3' ], // meta map - file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] - - BCFTOOLS_BGZIP ( input1 ) - BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf ) - BCFTOOLS_BGZIP2 ( input2 ) - BCFTOOLS_TABIX2 ( BCFTOOLS_BGZIP2.out.vcf ) - BCFTOOLS_BGZIP3 ( input3 ) - BCFTOOLS_TABIX3 ( BCFTOOLS_BGZIP3.out.vcf ) - BCFTOOLS_ISEC ( BCFTOOLS_BGZIP.out.vcf - .mix( BCFTOOLS_TABIX.out.tbi ) - .mix( BCFTOOLS_BGZIP2.out.vcf ) - .mix( BCFTOOLS_TABIX2.out.tbi ) - .mix( BCFTOOLS_BGZIP3.out.vcf ) - .mix( BCFTOOLS_TABIX3.out.tbi) - .map { [ it[1] ]} - .collect() - .map { [ [id: 'test'], it ] } ) -} diff --git a/tests/software/bcftools/stats/main.nf b/tests/software/bcftools/stats/main.nf new file mode 100644 index 00000000..bc2ab869 --- /dev/null +++ b/tests/software/bcftools/stats/main.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_STATS } from '../../../../software/bcftools/stats/main.nf' addParams( options: [:] ) + +workflow test_bcftools_stats { + + def input = [] + input = [ [ id:'test' ], // meta map + file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] + + BCFTOOLS_STATS ( input ) +} diff --git a/tests/software/bcftools/stats/test.yml b/tests/software/bcftools/stats/test.yml new file mode 100644 index 00000000..f7406a6b --- /dev/null +++ b/tests/software/bcftools/stats/test.yml @@ -0,0 +1,8 @@ +- name: Run bcftools bgzip test workflow + command: nextflow run ./tests/software/bcftools/stats -entry test_bcftools_stats -c tests/config/nextflow.config + tags: + - bcftools + - bcftools_stats + files: + - path: output/bcftools/test.bcftools_stats.txt + md5sum: abfc6a90f84e24b2cc7e92cbce06200a diff --git a/tests/software/bcftools/tabix/main.nf b/tests/software/bcftools/tabix/main.nf new file mode 100644 index 00000000..051f8901 --- /dev/null +++ b/tests/software/bcftools/tabix/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_BGZIP } from '../../../../software/bcftools/bgzip/main.nf' addParams( options: [:] ) +include { BCFTOOLS_TABIX } from '../../../../software/bcftools/tabix/main.nf' addParams( options: [:] ) + +workflow test_bcftools_tabix { + + def input = [] + input = [ [ id:'test' ], // meta map + file("${launchDir}/tests/data/vcf/test.vcf", checkIfExists: true) ] + + BCFTOOLS_BGZIP ( input ) + BCFTOOLS_TABIX ( BCFTOOLS_BGZIP.out.vcf ) +} diff --git a/tests/software/bcftools/tabix/test.yml b/tests/software/bcftools/tabix/test.yml new file mode 100644 index 00000000..e378f316 --- /dev/null +++ b/tests/software/bcftools/tabix/test.yml @@ -0,0 +1,8 @@ +- name: Run bcftools tabix test workflow + command: nextflow run ./tests/software/bcftools/tabix -entry test_bcftools_tabix -c tests/config/nextflow.config + tags: + - bcftools + - bcftools_tabix + files: + - path: output/bcftools/test.vcf.gz.tbi + md5sum: 06d52177f819730dd409157914534e8d diff --git a/tests/software/bcftools/test.yml b/tests/software/bcftools/test.yml deleted file mode 100644 index f152bff8..00000000 --- a/tests/software/bcftools/test.yml +++ /dev/null @@ -1,81 +0,0 @@ -- name: Run bcftools filter test workflow - command: nextflow run ./tests/software/bcftools/ -profile docker -entry test_bcftools_filter -c tests/config/nextflow.config - tags: - - bcftools - - bcftools_filter - files: - - path: output/bcftools/test.vcf.gz - md5sum: 16947ce72a127938d881113a1e6e696b - -- name: Run bcftools stats test workflow - command: nextflow run ./tests/software/bcftools/ -profile docker -entry test_bcftools_stats -c tests/config/nextflow.config - tags: - - bcftools - - bcftools_stats - files: - - path: output/bcftools/test.bcftools_stats.txt - md5sum: abfc6a90f84e24b2cc7e92cbce06200a - -- name: Run bcftools bgzip test workflow - command: nextflow run ./tests/software/bcftools/ -profile docker -entry test_bcftools_bgzip -c tests/config/nextflow.config - tags: - - bcftools - - bcftools_bgzip - files: - - path: output/bcftools/test.vcf.gz - md5sum: eb75ae1f08a1884f8edc59ed423471a2 - -- name: Run bcftools tabix test workflow - command: nextflow run ./tests/software/bcftools/ -profile docker -entry test_bcftools_tabix -c tests/config/nextflow.config - tags: - - bcftools - - bcftools_tabix - files: - - path: output/bcftools/test.vcf.gz.tbi - md5sum: 06d52177f819730dd409157914534e8d - -- name: Run bcftools consensus test workflow - command: nextflow run ./tests/software/bcftools/ -profile docker -entry test_bcftools_consensus -c tests/config/nextflow.config - tags: - - bcftools - - bcftools_consensus - files: - - path: output/bcftools/test.vcf.gz - md5sum: eb75ae1f08a1884f8edc59ed423471a2 - - path: output/bcftools/test.vcf.gz.tbi - md5sum: 06d52177f819730dd409157914534e8d - - path: output/bcftools/test.fa - md5sum: c9e7ac4537756a0b33bcf17117f9a065 - -- name: Run bcftools isec test workflow - command: nextflow run ./tests/software/bcftools/ -profile docker -entry test_bcftools_isec -c tests/config/nextflow.config - tags: - - bcftools - - bcftools_isec - files: - - path: output/bcftools/test1.vcf.gz - md5sum: eb75ae1f08a1884f8edc59ed423471a2 - - path: output/bcftools/test1.vcf.gz.tbi - md5sum: 06d52177f819730dd409157914534e8d - - path: output/bcftools/test2.vcf.gz - md5sum: eb75ae1f08a1884f8edc59ed423471a2 - - path: output/bcftools/test2.vcf.gz.tbi - md5sum: 06d52177f819730dd409157914534e8d - - path: output/bcftools/test3.vcf.gz - md5sum: eb75ae1f08a1884f8edc59ed423471a2 - - path: output/bcftools/test/0000.vcf.gz - md5sum: 4e84e3b6903fa44e8bd1acdeff9b265d - - path: output/bcftools/test/0000.vcf.gz.tbi - md5sum: 8484b151ef902e25e54f7713d46ed90e - - path: output/bcftools/test/0001.vcf.gz - md5sum: 4e84e3b6903fa44e8bd1acdeff9b265d - - path: output/bcftools/test/0001.vcf.gz.tbi - md5sum: 8484b151ef902e25e54f7713d46ed90e - - path: output/bcftools/test/0002.vcf.gz - md5sum: 4e84e3b6903fa44e8bd1acdeff9b265d - - path: output/bcftools/test/0002.vcf.gz.tbi - md5sum: 8484b151ef902e25e54f7713d46ed90e - - path: output/bcftools/test/README.txt - md5sum: 306fcb71aafe414046a34bedd4d14304 - - path: output/bcftools/test/sites.txt - md5sum: 01bb949ed7825ecf692bf0640e363647