test(picard): Refactor mergesamfiles to use pytest-workflow

This commit is contained in:
Edmund Miller 2020-11-24 18:32:23 -06:00
parent 016d8684f3
commit 234e85bdce
No known key found for this signature in database
GPG key ID: BD387FF7BC10AA9D
8 changed files with 37 additions and 49 deletions

View file

@ -17,7 +17,6 @@ jobs:
env:
NXF_ANSI_LOG: false
steps:
- uses: actions/checkout@v2
- name: Install Nextflow
@ -26,5 +25,12 @@ jobs:
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
- run: pytest --tag picard_mergesamfiles --symlink --wt 2

View file

@ -1 +0,0 @@
../../../../../tests/data/bam/test.paired_end.sorted.bam

View file

@ -1 +0,0 @@
../../../../../tests/data/bam/test.paired_end.sorted.bam

View file

@ -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()
}

View file

@ -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
}
}

View file

@ -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 )
}

View file

@ -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