From 0a04c96357554aa1171b4ba7d3d019cb38a63515 Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Tue, 12 Jan 2021 09:13:37 -0600 Subject: [PATCH] Added module, TODO data --- .github/workflows/stringtie.yml | 40 +++++++++++++++++++++++++++++++ tests/software/stringtie/main.nf | 36 ++++++++++++++++++++++++++++ tests/software/stringtie/test.yml | 24 +++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 .github/workflows/stringtie.yml create mode 100644 tests/software/stringtie/main.nf create mode 100644 tests/software/stringtie/test.yml diff --git a/.github/workflows/stringtie.yml b/.github/workflows/stringtie.yml new file mode 100644 index 00000000..f650dfae --- /dev/null +++ b/.github/workflows/stringtie.yml @@ -0,0 +1,40 @@ +name: stringtie +on: + push: + paths: + - software/stringtie/** + - .github/workflows/stringtie.yml + - tests/software/stringtie/** + pull_request: + paths: + - software/stringtie/** + - .github/workflows/stringtie.yml + - tests/software/stringtie/** + +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 stringtie --symlink --wt 2 diff --git a/tests/software/stringtie/main.nf b/tests/software/stringtie/main.nf new file mode 100644 index 00000000..1a5bdbdd --- /dev/null +++ b/tests/software/stringtie/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { STRINGTIE as STRINGTIE_F } from '../../../software/stringtie/main.nf' addParams( options: [ publish_dir:'test_forward' ] ) +include { STRINGTIE as STRINGTIE_R } from '../../../software/stringtie/main.nf' addParams( options: [ publish_dir:'test_reverse' ] ) + +/* + * Test with forward strandedness + */ +workflow test_stringtie_forward { + + def input = [] + input = [ [ id:'test', strandedness:'forward' ], // meta map + [ file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true) ] ] + + STRINGTIE_F ( + input, + file("${launchDir}/tests/data/gff/a.gtf", checkIfExists: true) + ) +} + +/* + * Test with reverse strandedness + */ +workflow test_stringtie_reverse { + + def input = [] + input = [ [ id:'test', strandedness:'reverse' ], // meta map + [ file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true) ] ] + + STRINGTIE_R ( + input, + file("${launchDir}/tests/data/gff/a.gtf", checkIfExists: true) + ) +} diff --git a/tests/software/stringtie/test.yml b/tests/software/stringtie/test.yml new file mode 100644 index 00000000..34de5570 --- /dev/null +++ b/tests/software/stringtie/test.yml @@ -0,0 +1,24 @@ +- name: Run stringtie forward strand test workflow + command: nextflow run ./tests/software/stringtie/ -profile docker -entry test_stringtie_forward -c tests/config/nextflow.config + tags: + - stringtie + files: + - path: output/test_forward/test.ballgown + - path: output/test_forward/test.gene_abundance.txt + - path: output/test_forward/test.transcripts.gtf + md5sum: f1b5baa8d94f86e499556a4ec419a75a + - path: output/test_forward/test.coverage.gtf + md5sum: d41d8cd98f00b204e9800998ecf8427e + + +- name: Run stringtie reverse strand test workflow + command: nextflow run ./tests/software/stringtie/ -profile docker -entry test_stringtie_reverse -c tests/config/nextflow.config + tags: + - stringtie + files: + - path: output/test_reverse/test.ballgown + - path: output/test_reverse/test.gene_abundance.txt + - path: output/test_reverse/test.transcripts.gtf + md5sum: cb0367e5f98f19fcc2043d248deb513c + - path: output/test_reverse/test.coverage.gtf + md5sum: d41d8cd98f00b204e9800998ecf8427e