mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
Add test
This commit is contained in:
parent
b1381bb577
commit
3a4fbf36ae
1 changed files with 27 additions and 7 deletions
|
@ -2,14 +2,34 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include '../../../../tests/functions/check_process_outputs.nf' params(params)
|
||||
include '../main.nf' params(params)
|
||||
include { FASTQC } from '../main.nf'
|
||||
|
||||
reads = '../../../../test-datasets/tools/bwa/mem/reads/*_R{1,2}_001.fastq.gz'
|
||||
index = '../../../../test-datasets/tools/bwa/mem/index/H3N2.{amb,ann,bwt,pac,sa}'
|
||||
prefix = 'H3N2'
|
||||
/*
|
||||
* Test with single-end data
|
||||
*/
|
||||
workflow test_single_end {
|
||||
|
||||
def input = []
|
||||
input = [ [ id:'test', single_end:true ], // meta map
|
||||
[ file("${baseDir}/input/test_single_end.fastq.gz", checkIfExists: true) ] ]
|
||||
|
||||
FASTQC ( input, [ publish_dir:'test_single_end' ] )
|
||||
}
|
||||
|
||||
/*
|
||||
* Test with paired-end data
|
||||
*/
|
||||
workflow test_paired_end {
|
||||
|
||||
def input = []
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
[ file("${baseDir}/input/test_R1.fastq.gz", checkIfExists: true),
|
||||
file("${baseDir}/input/test_R2.fastq.gz", checkIfExists: true) ] ]
|
||||
|
||||
FASTQC ( input, [ publish_dir:'test_paired_end' ] )
|
||||
}
|
||||
|
||||
workflow {
|
||||
read_input=Channel.fromFilePairs(reads)
|
||||
bwa_mem(read_input,file(index),prefix)
|
||||
test_single_end()
|
||||
test_paired_end()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue