mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
test(picard): Refactor mergesamfiles to use pytest-workflow
This commit is contained in:
parent
016d8684f3
commit
234e85bdce
8 changed files with 37 additions and 49 deletions
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../../../../tests/data/bam/test.paired_end.sorted.bam
|
|
@ -1 +0,0 @@
|
|||
../../../../../tests/data/bam/test.paired_end.sorted.bam
|
|
@ -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()
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
Binary file not shown.
15
tests/software/picard/main.nf
Normal file
15
tests/software/picard/main.nf
Normal 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 )
|
||||
}
|
8
tests/software/picard/test.yml
Normal file
8
tests/software/picard/test.yml
Normal 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
|
Loading…
Reference in a new issue