diff --git a/.github/workflows/software/picard_mergesamfiles.yml b/.github/workflows/software/picard_mergesamfiles.yml index 8cbf3645..6798822a 100644 --- a/.github/workflows/software/picard_mergesamfiles.yml +++ b/.github/workflows/software/picard_mergesamfiles.yml @@ -17,14 +17,20 @@ jobs: env: NXF_ANSI_LOG: false steps: + - uses: actions/checkout@v2 - - uses: actions/checkout@v2 + - name: Install Nextflow + run: | + export NXF_VER="20.07.1" + wget -qO- get.nextflow.io | bash + sudo mv nextflow /usr/local/bin/ - - name: Install Nextflow - run: | - export NXF_VER="20.07.1" - 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: nextflow run ./software/picard/mergesamfiles/test/ -profile docker + # Test the module + - run: pytest --tag picard_mergesamfiles --symlink --wt 2 diff --git a/software/picard/mergesamfiles/test/input/test.paired_end.COPY.sorted.bam b/software/picard/mergesamfiles/test/input/test.paired_end.COPY.sorted.bam deleted file mode 120000 index af606d91..00000000 --- a/software/picard/mergesamfiles/test/input/test.paired_end.COPY.sorted.bam +++ /dev/null @@ -1 +0,0 @@ -../../../../../tests/data/bam/test.paired_end.sorted.bam \ No newline at end of file diff --git a/software/picard/mergesamfiles/test/input/test.paired_end.sorted.bam b/software/picard/mergesamfiles/test/input/test.paired_end.sorted.bam deleted file mode 120000 index af606d91..00000000 --- a/software/picard/mergesamfiles/test/input/test.paired_end.sorted.bam +++ /dev/null @@ -1 +0,0 @@ -../../../../../tests/data/bam/test.paired_end.sorted.bam \ No newline at end of file diff --git a/software/picard/mergesamfiles/test/main.nf b/software/picard/mergesamfiles/test/main.nf deleted file mode 100755 index db93bb35..00000000 --- a/software/picard/mergesamfiles/test/main.nf +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { PICARD_MERGESAMFILES } from '../main.nf' addParams( options: [:] ) - -workflow test { - - def input = [] - input = [ [ id:'test', single_end:false ], // meta map - [ file("${baseDir}/input/test.paired_end.sorted.bam", checkIfExists: true), - file("${baseDir}/input/test.paired_end.COPY.sorted.bam", checkIfExists: true), ] ] - - PICARD_MERGESAMFILES ( input ) -} - -workflow { - test() -} diff --git a/software/picard/mergesamfiles/test/nextflow.config b/software/picard/mergesamfiles/test/nextflow.config deleted file mode 100644 index 4149feea..00000000 --- a/software/picard/mergesamfiles/test/nextflow.config +++ /dev/null @@ -1,20 +0,0 @@ - -params { - outdir = "output/" - publish_dir_mode = "copy" - enable_conda = false -} - -profiles { - conda { - params.enable_conda = true - } - docker { - docker.enabled = true - docker.runOptions = '-u \$(id -u):\$(id -g)' - } - singularity { - singularity.enabled = true - singularity.autoMounts = true - } -} diff --git a/software/picard/mergesamfiles/test/output/picard/test.bam b/software/picard/mergesamfiles/test/output/picard/test.bam deleted file mode 100644 index 10c16d25..00000000 Binary files a/software/picard/mergesamfiles/test/output/picard/test.bam and /dev/null differ diff --git a/tests/software/picard/main.nf b/tests/software/picard/main.nf new file mode 100644 index 00000000..1835c8ba --- /dev/null +++ b/tests/software/picard/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_MERGESAMFILES } from '../../../software/picard/mergesamfiles/main.nf' addParams( options: [:] ) + +workflow test_picard_mergesamfiles { + + def input = [] + input = [ [ id:'test', single_end:false ], // meta map + [ file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true), + file("${launchDir}/tests/data/bam/test.paired_end.name.sorted.bam", checkIfExists: true), ] ] + + PICARD_MERGESAMFILES ( input ) +} diff --git a/tests/software/picard/test.yml b/tests/software/picard/test.yml new file mode 100644 index 00000000..d606b7c3 --- /dev/null +++ b/tests/software/picard/test.yml @@ -0,0 +1,8 @@ +- name: Run picard mergesamfiles + command: nextflow run ./tests/software/picard -profile docker -entry test_picard_mergesamfiles -c tests/config/nextflow.config + tags: + - picard + - picard_mergesamfiles + files: + - path: output/picard/test.bam + md5sum: a9c8a28d1aac362df5973ba2d9923f86