test(samtools): Refactor index to use pytest-workflow

This commit is contained in:
Edmund Miller 2020-11-24 20:08:15 -06:00
parent 16cb794892
commit 6448638b55
No known key found for this signature in database
GPG key ID: BD387FF7BC10AA9D
6 changed files with 19 additions and 39 deletions

View file

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

View file

@ -1,18 +0,0 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { SAMTOOLS_INDEX } 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) ]
SAMTOOLS_INDEX ( 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

@ -4,6 +4,7 @@ nextflow.enable.dsl = 2
include { SAMTOOLS_FLAGSTAT } from '../../../software/samtools/flagstat/main.nf' addParams( options: [:] )
include { SAMTOOLS_IDXSTATS } from '../../../software/samtools/idxstats/main.nf' addParams( options: [:] )
include { SAMTOOLS_INDEX } from '../../../software/samtools/index/main.nf' addParams( options: [:] )
workflow test_samtools_flagstat {
@ -24,3 +25,12 @@ workflow test_samtools_idxstats {
SAMTOOLS_IDXSTATS ( input )
}
workflow test_samtools_index {
def input = []
input = [ [ id:'test', single_end:false ], // meta map
file("${launchDir}/tests/data/bam/test.paired_end.sorted.bam", checkIfExists: true) ]
SAMTOOLS_INDEX ( input )
}

View file

@ -15,3 +15,12 @@
files:
- path: output/samtools/test.paired_end.sorted.bam.idxstats
md5sum: 3bee8b7d55e412da2b3816c5a18d60d5
- name: Run samtools index test workflow
command: nextflow run ./tests/software/samtools/ -profile docker -entry test_samtools_index -c tests/config/nextflow.config
tags:
- samtools
- samtools_index
files:
- path: output/samtools/test.paired_end.sorted.bam.bai
md5sum: 67338c2995eae82c849830ca55aa7bd1