mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
add must fail test
This commit is contained in:
parent
7e777c6626
commit
858cbe80c6
4 changed files with 23 additions and 3 deletions
|
@ -31,7 +31,7 @@ process MOSDEPTH {
|
|||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def reference = fasta ? "--fasta ${fasta}" : ""
|
||||
def interval = bed ? "--by ${bed}" : ""
|
||||
if (bed && ext.args.contains("--by")) {
|
||||
if (bed && args.contains("--by")) {
|
||||
exit 1, "--by can only be specified once."
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
nextflow.enable.dsl = 2
|
||||
|
||||
include { MOSDEPTH } from '../../../modules/mosdepth/main.nf'
|
||||
include { MOSDEPTH as MOSDEPTH_FAIL } from '../../../modules/mosdepth/main.nf'
|
||||
|
||||
workflow test_mosdepth {
|
||||
input = [
|
||||
|
@ -47,3 +48,14 @@ workflow test_mosdepth_cram_bed {
|
|||
|
||||
MOSDEPTH ( input, bed, fasta )
|
||||
}
|
||||
|
||||
workflow test_mosdepth_fail {
|
||||
input = [
|
||||
[ id:'test', single_end:true ],
|
||||
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ],
|
||||
[ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ]
|
||||
]
|
||||
bed = [ file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) ]
|
||||
|
||||
MOSDEPTH_FAIL ( input, bed, [] )
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: MOSDEPTH_FAIL {
|
||||
ext.args = "--by 100"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,3 +65,9 @@
|
|||
md5sum: 5d398caf7171ec4406278e2add3009ae
|
||||
- path: output/mosdepth/test.regions.bed.gz.csi
|
||||
md5sum: 47669cfe41f3e222e74d81e1b1be191f
|
||||
|
||||
- name: mosdepth test_mosdepth_fail
|
||||
command: nextflow run ./tests/modules/mosdepth -entry test_mosdepth_fail -c ./tests/config/nextflow.config -c ./tests/modules/mosdepth/nextflow.config
|
||||
tags:
|
||||
- mosdepth
|
||||
exitcode: 1
|
||||
|
|
Loading…
Reference in a new issue