-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_lr.nf
74 lines (50 loc) · 1.7 KB
/
main_lr.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
*
*/
nextflow.enable.dsl=2
params.genome_file = ""
params.reads_lr = "{prefix}*.f*q*"
params.annot = ""
params.out = ""
params.help = false
include { MAPPING_LR } from './module_lr/minimap2.nf'
include { VARIANT_LR } from './module_lr/calling_lr.nf'
include { FILTER_LR } from './module_lr/filter_lr.nf'
include { MERGE_LR } from './module_lr/mergeVcf_lr.nf'
include { GENE_DUPLICATED_LR } from './module_lr/dupgene_lr.nf'
//Declare your variable
genome = file(params.genome_file)
genome_index_file = file(params.genome_file + ".fai")
annotation = file(params.annot)
Channel
.fromPath(params.reads_lr)
.ifEmpty { error "Cannot find any fastq files matching: ${params.reads_lr}" }
.map { file -> tuple( file.baseName, file )}
.set{reads_lr}
workflow {
MAPPING_LR( reads_lr, genome)
VARIANT_LR(MAPPING_LR.out, genome)
FILTER_LR (MAPPING_LR.out.bam_file_ch, VARIANT_LR.out.variant_calls, genome)
MERGE_LR ( FILTER_LR.out.duplication_annot_calls )
GENE_DUPLICATED_LR (MERGE_LR.out.filterVcf_file, annotation)
}
/*
========================================================================================
Workflow Event Handler
========================================================================================
*/
workflow.onComplete {
println ( workflow.success ? """
DUPFinder long reads execution summary
---------------------------
Completed at : ${workflow.complete}
Duration : ${workflow.duration}
Success : ${workflow.success}
workDir : ${workflow.workDir}
exit status : ${workflow.exitStatus}
""" : """
Failed: ${workflow.errorReport}
exit status : ${workflow.exitStatus}
"""
)
}