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

This commit is contained in:
Edmund Miller 2020-11-24 20:21:45 -06:00
parent 36bbf6baa3
commit b2cd464ad3
No known key found for this signature in database
GPG key ID: BD387FF7BC10AA9D
7 changed files with 20 additions and 1146 deletions

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.bai

View file

@ -1,19 +0,0 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { SAMTOOLS_STATS } 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.sorted.bam.bai", checkIfExists: true) ]
SAMTOOLS_STATS ( 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

@ -6,6 +6,7 @@ include { SAMTOOLS_FLAGSTAT } from '../../../software/samtools/flagstat/main.nf'
include { SAMTOOLS_IDXSTATS } from '../../../software/samtools/idxstats/main.nf' addParams( options: [:] )
include { SAMTOOLS_INDEX } from '../../../software/samtools/index/main.nf' addParams( options: [:] )
include { SAMTOOLS_SORT } from '../../../software/samtools/sort/main.nf' addParams( options: [:] )
include { SAMTOOLS_STATS } from '../../../software/samtools/stats/main.nf' addParams( options: [:] )
workflow test_samtools_flagstat {
@ -45,3 +46,13 @@ workflow test_samtools_sort {
SAMTOOLS_SORT ( input )
}
workflow test_samtools_stats {
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.sorted.bam.bai", checkIfExists: true) ]
SAMTOOLS_STATS ( input )
}

View file

@ -33,3 +33,12 @@
files:
- path: output/samtools/test.bam
md5sum: a41bfadacd2eeef1d31e05c135cc4f4e
- name: Run samtools stats test workflow
command: nextflow run ./tests/software/samtools/ -profile docker -entry test_samtools_stats -c tests/config/nextflow.config
tags:
- samtools
- samtools_stats
files:
- path: output/samtools/test.paired_end.sorted.bam.stats
md5sum: 06c183864d6e47ab89b0650cae831a93