mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 05:43:08 +00:00
Update tests
This commit is contained in:
parent
2c0f552908
commit
30256d8e81
1 changed files with 57 additions and 18 deletions
|
@ -1,27 +1,66 @@
|
||||||
#!/usr/bin/env nextflow
|
#!/usr/bin/env nextflow
|
||||||
nextflow.preview.dsl=2
|
|
||||||
|
|
||||||
params.outdir = "." // gets set in the nextflow.config files (to './results/trim_galore')
|
nextflow.enable.dsl = 2
|
||||||
params.verbose = false
|
|
||||||
params.trim_galore_args = ''
|
|
||||||
// trim_galore_args are best passed into the workflow in the following manner, e.g.:
|
|
||||||
// --trim_galore_args="--clip_r1 10 --clip_r2 15 -j 2"
|
|
||||||
|
|
||||||
if (params.verbose){
|
include { TRIMGALORE } from '../main.nf'
|
||||||
println ("[WORKFLOW] TRIM GALORE ARGS: " + params.trim_galore_args)
|
|
||||||
|
/*
|
||||||
|
* 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) ] ]
|
||||||
|
|
||||||
|
TRIMGALORE ( input, [ publish_dir:'test_single_end' ] )
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: check the output files in some way
|
/*
|
||||||
// include '../../../tests/functions/check_process_outputs.nf'
|
* Test with paired-end data
|
||||||
include '../main.nf' // params (clip_r1: 6, clip_r2: 10) // how to pass additional parameters
|
*/
|
||||||
|
workflow test_paired_end {
|
||||||
|
|
||||||
ch_read_files = Channel
|
def input = []
|
||||||
.fromFilePairs('../../../test-datasets/test*{1,2}.fastq.gz',size:-1)
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
// .view() // to check whether the input channel works
|
[ file("${baseDir}/input/test_R1.fastq.gz", checkIfExists: true),
|
||||||
|
file("${baseDir}/input/test_R2.fastq.gz", checkIfExists: true) ] ]
|
||||||
|
|
||||||
|
TRIMGALORE ( input, [ publish_dir:'test_paired_end' ] )
|
||||||
|
}
|
||||||
|
|
||||||
workflow {
|
workflow {
|
||||||
|
test_single_end()
|
||||||
main:
|
test_paired_end()
|
||||||
TRIM_GALORE (ch_read_files, params.outdir, params.trim_galore_args, params.verbose)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// #!/usr/bin/env nextflow
|
||||||
|
// nextflow.preview.dsl=2
|
||||||
|
//
|
||||||
|
// params.outdir = "." // gets set in the nextflow.config files (to './results/trim_galore')
|
||||||
|
// params.verbose = false
|
||||||
|
// params.trim_galore_args = ''
|
||||||
|
// // trim_galore_args are best passed into the workflow in the following manner, e.g.:
|
||||||
|
// // --trim_galore_args="--clip_r1 10 --clip_r2 15 -j 2"
|
||||||
|
//
|
||||||
|
// if (params.verbose){
|
||||||
|
// println ("[WORKFLOW] TRIM GALORE ARGS: " + params.trim_galore_args)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // TODO: check the output files in some way
|
||||||
|
// // include '../../../tests/functions/check_process_outputs.nf'
|
||||||
|
// include '../main.nf' // params (clip_r1: 6, clip_r2: 10) // how to pass additional parameters
|
||||||
|
//
|
||||||
|
// ch_read_files = Channel
|
||||||
|
// .fromFilePairs('../../../test-datasets/test*{1,2}.fastq.gz',size:-1)
|
||||||
|
// // .view() // to check whether the input channel works
|
||||||
|
//
|
||||||
|
// workflow {
|
||||||
|
//
|
||||||
|
// main:
|
||||||
|
// TRIM_GALORE (ch_read_files, params.outdir, params.trim_galore_args, params.verbose)
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
Loading…
Reference in a new issue