From cb39fcb91540c57bd376fdd7a520c2e89bdebb95 Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Tue, 12 Jan 2021 08:41:09 -0600 Subject: [PATCH] Added preseq module and workflow --- .github/workflows/preseq_lcextrap.yml | 40 +++++++++++++++++++++++++++ tests/software/preseq/main.nf | 33 ++++++++++++++++++++++ tests/software/preseq/test.yml | 21 ++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 .github/workflows/preseq_lcextrap.yml create mode 100644 tests/software/preseq/main.nf create mode 100644 tests/software/preseq/test.yml diff --git a/.github/workflows/preseq_lcextrap.yml b/.github/workflows/preseq_lcextrap.yml new file mode 100644 index 00000000..33443f5e --- /dev/null +++ b/.github/workflows/preseq_lcextrap.yml @@ -0,0 +1,40 @@ +name: preseq_lcextrap +on: + push: + paths: + - software/preseq/lcextrap/** + - .github/workflows/preseq_lcextrap.yml + - tests/software/preseq/** + pull_request: + paths: + - software/preseq/lcextrap/** + - .github/workflows/preseq_lcextrap.yml + - tests/software/preseq/** + +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 preseq_lcextrap --symlink --wt 2 diff --git a/tests/software/preseq/main.nf b/tests/software/preseq/main.nf new file mode 100644 index 00000000..421c79ba --- /dev/null +++ b/tests/software/preseq/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PRESEQ_LCEXTRAP as PRESEQ_LCEXTRAP_SE } from '../../../software/preseq/lcextrap/main.nf' addParams( options: [ publish_dir:'test_preseq_single_end' ] ) +include { PRESEQ_LCEXTRAP as PRESEQ_LCEXTRAP_PE } from '../../../software/preseq/lcextrap/main.nf' addParams( options: [ publish_dir:'test_preseq_paired_end' ] ) + +/* + * Test with single-end data + */ + +workflow test_preseq_single_end { + + def input = [] + input = [ [ id:'test', single_end:true ], // meta map + [ file('https://github.com/smithlabcode/preseq/raw/master/data/SRR1106616_5M_subset.bam', checkIfExists: true), ] ] + + PRESEQ_LCEXTRAP_SE ( input ) +} + +/* + * Test with paired-end data + */ + +workflow test_preseq_paired_end { + + def input = [] + input = [ [ id:'test', single_end:false ], // meta map + [ file('https://github.com/smithlabcode/preseq/raw/master/data/SRR1106616_5M_subset.bam', checkIfExists: true), ] ] + + PRESEQ_LCEXTRAP_PE ( input ) +} + diff --git a/tests/software/preseq/test.yml b/tests/software/preseq/test.yml new file mode 100644 index 00000000..67dd27f0 --- /dev/null +++ b/tests/software/preseq/test.yml @@ -0,0 +1,21 @@ +- name: Run preseq single-end lcextrap + command: nextflow run ./tests/software/preseq -profile docker -entry test_preseq_single_end -c tests/config/nextflow.config + tags: + - preseq + - preseq_lcextrap + + files: + - path: output/test_preseq_single_end/test.ccurve.txt + - path: output/test_preseq_single_end/test.command.log + md5sum: d41d8cd98f00b204e9800998ecf8427e + +- name: Run preseq paired-end lcextrap + command: nextflow run ./tests/software/preseq -profile docker -entry test_preseq_paired_end -c tests/config/nextflow.config + tags: + - preseq + - preseq_lcextrap + + files: + - path: output/test_preseq_paired_end/test.ccurve.txt + - path: output/test_preseq_paired_end/test.log + md5sum: 66b339780630fc1aa72dcfbd0a4490fd