2019-12-05 14:57:32 +00:00
|
|
|
#!/usr/bin/env nextflow
|
2019-12-05 21:11:12 +00:00
|
|
|
nextflow.preview.dsl = 2
|
2020-03-16 14:17:38 +00:00
|
|
|
|
2020-07-14 15:38:20 +00:00
|
|
|
params.out_dir = "test_output"
|
2020-03-16 14:17:38 +00:00
|
|
|
params.fastqc_args = ''
|
2020-07-14 15:38:20 +00:00
|
|
|
params.publish_dir_mode = "copy"
|
2020-03-16 14:17:38 +00:00
|
|
|
|
2020-07-14 15:38:20 +00:00
|
|
|
include { FASTQC } from '../main.nf'
|
2019-12-05 14:57:32 +00:00
|
|
|
|
2020-07-14 15:38:20 +00:00
|
|
|
/**
|
|
|
|
* Test if FASTQC runs with single-end data
|
|
|
|
*/
|
|
|
|
workflow test_single_end {
|
2020-07-15 13:07:19 +00:00
|
|
|
input_files = Channel.fromPath("input/test_single_end.fastq.gz")
|
2020-07-15 11:00:10 +00:00
|
|
|
.map {f -> [f.baseName, true, f]}
|
2020-07-14 15:38:20 +00:00
|
|
|
FASTQC(input_files)
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test if FASTQC runs with paired end data
|
|
|
|
*/
|
|
|
|
workflow test_paired_end {
|
2020-07-15 13:07:19 +00:00
|
|
|
input_files = Channel.fromFilePairs("input/test_R{1,2}.fastq.gz")
|
2020-07-15 11:00:10 +00:00
|
|
|
.map {f -> [f[0], false, f[1]]}
|
2020-07-14 15:38:20 +00:00
|
|
|
FASTQC(input_files)
|
|
|
|
}
|
2019-12-05 14:57:32 +00:00
|
|
|
|
2019-12-05 21:11:12 +00:00
|
|
|
workflow {
|
2020-07-14 15:38:20 +00:00
|
|
|
test_single_end()
|
|
|
|
test_paired_end()
|
2019-12-05 14:57:32 +00:00
|
|
|
}
|