-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.wdl
97 lines (80 loc) · 3.79 KB
/
main.wdl
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version 1.0
import "assembly_structs.wdl"
import "wdl-common/wdl/workflows/backend_configuration/backend_configuration.wdl" as BackendConfiguration
import "de_novo_assembly_sample/de_novo_assembly_sample.wdl" as DeNovoAssemblySample
import "de_novo_assembly_trio/de_novo_assembly_trio.wdl" as DeNovoAssemblyTrio
workflow de_novo_assembly {
input {
Cohort cohort
Array[ReferenceData] references
# Backend configuration
String backend
String? zones
String? aws_spot_queue_arn
String? aws_on_demand_queue_arn
String? container_registry
Boolean preemptible
}
call BackendConfiguration.backend_configuration {
input:
backend = backend,
zones = zones,
aws_spot_queue_arn = aws_spot_queue_arn,
aws_on_demand_queue_arn = aws_on_demand_queue_arn,
container_registry = container_registry
}
RuntimeAttributes default_runtime_attributes = if preemptible then backend_configuration.spot_runtime_attributes else backend_configuration.on_demand_runtime_attributes
scatter (sample in cohort.samples) {
if (sample.run_de_novo_assembly) {
call DeNovoAssemblySample.de_novo_assembly_sample {
input:
sample = sample,
references = references,
backend = backend,
default_runtime_attributes = default_runtime_attributes,
on_demand_runtime_attributes = backend_configuration.on_demand_runtime_attributes
}
}
}
if (length(cohort.samples) > 1) {
if (cohort.run_de_novo_assembly_trio) {
call DeNovoAssemblyTrio.de_novo_assembly_trio {
input:
cohort = cohort,
references = references,
backend = backend,
default_runtime_attributes = default_runtime_attributes,
on_demand_runtime_attributes = backend_configuration.on_demand_runtime_attributes
}
}
}
output {
# de_novo_assembly_sample output
Array[Array[File]?] assembly_noseq_gfas = de_novo_assembly_sample.assembly_noseq_gfas
Array[Array[File]?] assembly_lowQ_beds = de_novo_assembly_sample.assembly_lowQ_beds
Array[Array[File]?] zipped_assembly_fastas = de_novo_assembly_sample.zipped_assembly_fastas
Array[Array[File]?] assembly_stats = de_novo_assembly_sample.assembly_stats
Array[Array[IndexData]?] merged_bams = de_novo_assembly_sample.merged_bams
Array[Array[IndexData]?] paftools_vcf = de_novo_assembly_sample.paftools_vcfs
Array[Array[File]?] paftools_vcf_stats = de_novo_assembly_sample.paftools_vcf_stats
# de_novo_assembly_trio output
Array[Map[String, String]]? haplotype_key = de_novo_assembly_trio.haplotype_key
Array[Array[File]]? trio_assembly_noseq_gfas = de_novo_assembly_trio.assembly_noseq_gfas
Array[Array[File]]? trio_assembly_lowQ_beds = de_novo_assembly_trio.assembly_lowQ_beds
Array[Array[File]]? trio_zipped_assembly_fastas = de_novo_assembly_trio.zipped_assembly_fastas
Array[Array[File]]? trio_assembly_stats = de_novo_assembly_trio.assembly_stats
Array[Array[IndexData]]? trio_merged_asm_bams = de_novo_assembly_trio.merged_bams
Array[Array[IndexData]]? trio_paftools_vcf = de_novo_assembly_trio.paftools_vcfs
Array[Array[File]]? trio_paftools_vcf_stats = de_novo_assembly_trio.paftools_vcf_stats
}
parameter_meta {
cohort: {help: "Sample information for the cohort"}
references: {help: "Array of Reference genome data"}
backend: {help: "Backend where the workflow will be executed ['GCP', 'Azure', 'AWS', 'HPC']"}
zones: {help: "Zones where compute will take place; required if backend is set to 'AWS' or 'GCP'"}
aws_spot_queue_arn: {help: "Queue ARN for the spot batch queue; required if backend is set to 'AWS'"}
aws_on_demand_queue_arn: {help: "Queue ARN for the on demand batch queue; required if backend is set to 'AWS'"}
container_registry: {help: "Container registry where workflow images are hosted. If left blank, PacBio's public Quay.io registry will be used."}
preemptible: {help: "Where possible, run tasks preemptibly"}
}
}