mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-26 23:43:19 -05:00
b67556e29f
* Add FastK/Merge * Update modules/fastk/merge/main.nf * Update modules/fastk/merge/meta.yml Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk> Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk>
58 lines
2.2 KiB
Text
58 lines
2.2 KiB
Text
#!/usr/bin/env nextflow
|
|
|
|
nextflow.enable.dsl = 2
|
|
|
|
include { FASTK_FASTK } from '../../../../modules/fastk/fastk/main.nf'
|
|
include { FASTK_MERGE } from '../../../../modules/fastk/merge/main.nf'
|
|
|
|
workflow test_fastk_merge_hist_only {
|
|
|
|
input1 = [
|
|
[ id:'test', single_end:false ], // meta map
|
|
[
|
|
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
|
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
|
|
]
|
|
]
|
|
input2= [
|
|
[ id:'test', single_end:false ], // meta map
|
|
[
|
|
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
|
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
|
|
]
|
|
]
|
|
|
|
FASTK_FASTK ( Channel.of( input1, input2 ) )
|
|
FASTK_MERGE (
|
|
FASTK_FASTK.out.hist.groupTuple()
|
|
.join( FASTK_FASTK.out.ktab.groupTuple(), remainder: true )
|
|
.join( FASTK_FASTK.out.prof.groupTuple(), remainder: true )
|
|
.map { meta, hist, ktab, prof -> [meta, hist, ktab ? ktab.flatten() : [] , prof ? prof.flatten() : [] ] }
|
|
)
|
|
}
|
|
|
|
workflow test_fastk_merge_all_files {
|
|
|
|
input1 = [
|
|
[ id:'test', single_end:false ], // meta map
|
|
[
|
|
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
|
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
|
|
]
|
|
]
|
|
input2= [
|
|
[ id:'test', single_end:false ], // meta map
|
|
[
|
|
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
|
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
|
|
]
|
|
]
|
|
|
|
FASTK_FASTK ( Channel.of( input1, input2 ) )
|
|
FASTK_MERGE (
|
|
FASTK_FASTK.out.hist.groupTuple()
|
|
.join( FASTK_FASTK.out.ktab.groupTuple(), remainder: true )
|
|
.join( FASTK_FASTK.out.prof.groupTuple(), remainder: true )
|
|
.map { meta, hist, ktab, prof -> [meta, hist, ktab ? ktab.flatten() : [] , prof ? prof.flatten() : [] ] }
|
|
)
|
|
}
|