forked from broadinstitute/warp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VerifyValidateChip.wdl
96 lines (79 loc) · 2.83 KB
/
VerifyValidateChip.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
version 1.0
import "../verification/VerifyTasks.wdl" as Tasks
import "../verification/VerifyMetrics.wdl" as MetricsVerification
## Copyright Broad Institute, 2018
##
## This WDL script is designed to verify (compare) the outputs of a ValidateChip wdl.
##
##
## Runtime parameters are optimized for Broad's Google Cloud Platform implementation.
## For program versions, see docker containers.
##
## LICENSING :
## This script is released under the WDL source code license (BSD-3) (see LICENSE in
## https://github.com/broadinstitute/wdl). Note however that the programs it calls may
## be subject to different licenses. Users are responsible for checking that they are
## authorized to run all programs before running this script. Please see the docker
## page at https://hub.docker.com/r/broadinstitute/genomes-in-the-cloud/ for detailed
## licensing information pertaining to the included programs.
workflow VerifyValidateChip {
input {
File test_gtc
File truth_gtc
File bead_pool_manifest_file
File test_vcf
File truth_vcf
File test_genotype_concordance_vcf
File truth_genotype_concordance_vcf
File test_indel_genotype_concordance_vcf
File truth_indel_genotype_concordance_vcf
Array[File] test_metrics
Array[File] truth_metrics
Boolean? done
}
call Tasks.CompareGtcs {
input:
file1=test_gtc,
file2=truth_gtc,
bead_pool_manifest_file=bead_pool_manifest_file
}
call Tasks.CompareVcfsAllowingQualityDifferences as CompareOutputVcfs {
input:
file1=truth_vcf,
file2=test_vcf
}
call Tasks.CompareVcfsAllowingQualityDifferences as CompareGenotypeConcordanceVcfs {
input:
file1=truth_genotype_concordance_vcf,
file2=test_genotype_concordance_vcf
}
call Tasks.CompareVcfsAllowingQualityDifferences as CompareIndelGenotypeConcordanceVcfs {
input:
file1=truth_indel_genotype_concordance_vcf,
file2=test_indel_genotype_concordance_vcf
}
call MetricsVerification.CompareTwoNumbers {
input:
num1 = length(test_metrics),
num2 = length(truth_metrics),
error_msg = "Different number of metric files"
}
String avcdm_ext = "arrays_variant_calling_detail_metrics"
scatter (idx in range(length(truth_metrics))) {
String metrics_basename = basename(truth_metrics[idx])
Boolean is_avcdm_file = basename(metrics_basename, avcdm_ext) != metrics_basename
Array[String] metrics_to_ignore = if (is_avcdm_file) then ["AUTOCALL_DATE", "ANALYSIS_VERSION", "PIPELINE_VERSION"] else []
call MetricsVerification.CompareMetricFiles {
input:
dependency_input = CompareTwoNumbers.output_file,
file1 = test_metrics[idx],
file2 = truth_metrics[idx],
output_file = "metric_~{idx}.txt",
metrics_to_ignore = metrics_to_ignore
}
}
meta {
allowNestedInputs: true
}
output {}
}