diff --git a/.github/workflows/fastp.yml b/.github/workflows/fastp.yml new file mode 100644 index 00000000..90ad15ef --- /dev/null +++ b/.github/workflows/fastp.yml @@ -0,0 +1,40 @@ +name: fastp +on: + push: + paths: + - software/fastp/** + - .github/workflows/fastp.yml + - tests + pull_request: + paths: + - software/fastp/** + - .github/workflows/fastp.yml + - tests + +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 fastp --symlink --wt 2 diff --git a/tests/software/fastp/main.nf b/tests/software/fastp/main.nf new file mode 100644 index 00000000..000fcdd8 --- /dev/null +++ b/tests/software/fastp/main.nf @@ -0,0 +1,30 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { FASTP } from '../../../software/fastp/main.nf' addParams( options: [:] ) + +/* + * Test with single-end data + */ +workflow test_fastp_se { + def input = [] + input = [ [ id:'test', single_end:true ], // meta map + [ file("${launchDir}/tests/data/fastq/rna/test_single_end.fastq.gz", checkIfExists: true) ] ] + + FASTP( input ) +} + +/* + * Test with paired-end data + */ + +workflow test_fastp_pe { + def input = [] + input = [ [ id:'test', single_end:false ], // meta map + [ file("${launchDir}/tests/data/fastq/rna/test_R1.fastq.gz", checkIfExists: true), + file("${launchDir}/tests/data/fastq/rna/test_R2.fastq.gz", checkIfExists: true) ] ] + + FASTP( input ) +} + diff --git a/tests/software/fastp/test.yml b/tests/software/fastp/test.yml new file mode 100644 index 00000000..56cbcaa7 --- /dev/null +++ b/tests/software/fastp/test.yml @@ -0,0 +1,27 @@ +- name: fastp_se + command: nextflow run ./tests/software/fastp -profile docker -entry test_fastp_se -c ./tests/config/nextflow.config + tags: + - fastp + - fastp_se + files: + - path: ./output/fastp/test.fastp.json + md5sum: b81d53bfa5c1553bed89f6475edcf437 + - path: ./output/fastp/test.trim.fastq.gz + md5sum: 2f5516df477b123e3f78adb67effa3bc + - path: ./output/fastp/test.fastp.log + - path: ./output/fastp/test.fastp.html + +- name: fastp_pe + command: nextflow run ./tests/software/fastp -profile docker -entry test_fastp_pe -c ./tests/config/nextflow.config + tags: + - fastp + - fastp_pe + files: + - path: ./output/fastp/test.fastp.html + - path: ./output/fastp/test.fastp.json + md5sum: 40db7fcbed478b0a96a1c5c1bb5f737b + - path: ./output/fastp/test.fastp.log + - path: ./output/fastp/test_1.trim.fastq.gz + md5sum: c8844c05194b50ae368e6825e997aa7f + - path: ./output/fastp/test_2.trim.fastq.gz + md5sum: 9238b07bb1609e939be7c8889b72c209