-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
73 lines (56 loc) · 1.98 KB
/
main.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
// Define the first process
include { annotations } from './lot3_annotation'
include { to_elastic } from './lot3_to_elastic'
include {makePostComplete} from './lot3_functions'
include {create_file} from './lot3_functions'
process check_files {
input:
val name
output:
val message
exec:
println "QC 1";
message="QC_2"
makePostComplete(params.qc_endpoint,"sequencing_data_quality_check.json")
}
process mapping {
input:
val message
output:
val message2
exec:
println message
message2 = "QC_3"
//Crams
create_file(params.outdir+"/results/preprocessing/recalibrated/"+params.control_experiment_id+"/"+params.control_experiment_id+".recal.cram")
makePostComplete(params.qc_endpoint,"mapping_qc.json")
}
process variant_calling {
input:
val message2
output:
val message3
exec:
println message2
message3 = "dd"
create_file(params.outdir+"/exp.vcf")
//SNVs
create_file(params.outdir+"/results/variant_calling/haplotypecaller/"+params.control_experiment_id+"/"+params.control_experiment_id+".haplotypecaller.filtered.vcf.gz")
//CNVs
create_file(params.outdir+"/results/annotsv/cnvkit/"+params.control_experiment_id+"/"+params.control_experiment_id+".tsv")
//SVs
create_file(params.outdir+"/results/annotsv/manta/"+params.control_experiment_id+"/"+params.control_experiment_id+".tsv")
//Pharmacogenomics
create_file(params.outdir+"/results/pharmacogenomics/"+params.control_experiment_id+"/results_gathered_alleles.tsv")
//Multiqc
create_file(params.outdir+"/results/multiqc/multiqc_report.html")
makePostComplete(params.qc_endpoint,"variant.json")
}
// Define the workflow
workflow {
// Call the first process
check_files(name:"Hello") | mapping | variant_calling | annotations | to_elastic | view { it.trim() }
}
workflow.onComplete {
makePostComplete(params.qc_endpoint,"workflow_complete.json")
}