mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-09-20 23:32:05 +00:00
added fastp tests
This commit is contained in:
parent
038381de99
commit
e9e795633d
3 changed files with 97 additions and 0 deletions
40
.github/workflows/fastp.yml
vendored
Normal file
40
.github/workflows/fastp.yml
vendored
Normal file
|
@ -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
|
30
tests/software/fastp/main.nf
Normal file
30
tests/software/fastp/main.nf
Normal file
|
@ -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 )
|
||||||
|
}
|
||||||
|
|
27
tests/software/fastp/test.yml
Normal file
27
tests/software/fastp/test.yml
Normal file
|
@ -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
|
Loading…
Reference in a new issue