Skip to content

Commit 95549e5

Browse files
committed
working wdl
1 parent 33c7a2b commit 95549e5

File tree

1 file changed

+35
-31
lines changed

1 file changed

+35
-31
lines changed

pipelines/wdl/glimpse/low_pass_imputation/input_qc/LowPassImputationQC.wdl

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,21 @@ workflow InputQC {
4343
}
4444
}
4545
46+
Array[String] cram_array = select_first([crams, ConvertCramManifestToInputArrays.crams, []])
47+
Array[String] cram_indices_array = select_first([cram_indices, ConvertCramManifestToInputArrays.cram_indices, []])
48+
Array[String] sample_ids_array = select_first([sample_ids, ConvertCramManifestToInputArrays.sample_ids, []])
49+
50+
call ValidateCramsAndIndicesAndSampleIds {
51+
input:
52+
crams = cram_array,
53+
cram_indices = cram_indices_array,
54+
sample_ids = sample_ids_array,
55+
billing_project_for_rp = billing_project_for_rp
56+
}
4657
# Boolean do_cram_qc = select_first([ConvertCramManifestToInputArrays.passes_qc, defined(crams) && !defined(cram_manifest), false])
4758
4859
# validations for array crams, cram indices, and sample ids (whether supplied directly or via manifest)
49-
if (do_cram_qc) {
60+
# if (do_cram_qc) {
5061
# Array[String] cram_array = select_first([crams, ConvertCramManifestToInputArrays.crams])
5162
5263
# Array[String] evaluated_cram_indices = select_first([cram_indices, ConvertCramManifestToInputArrays.cram_indices, []])
@@ -59,20 +70,20 @@ workflow InputQC {
5970
# String no_cram_index_or_sample_id_message = "CRAM indices and sample IDs are required when CRAM files are provided. Please provide both CRAM index files and a corresponding list of sample IDs."
6071
# }
6172
62-
if (cram_indices_and_sample_ids_provided) {
63-
call ValidateCramsAndIndicesAndSampleIds {
64-
input:
65-
crams = cram_array,
66-
cram_indices = evaluated_cram_indices,
67-
sample_ids = evaluated_sample_ids,
68-
billing_project_for_rp = billing_project_for_rp
69-
}
70-
}
71-
}
73+
# if (cram_indices_and_sample_ids_provided) {
74+
# call ValidateCramsAndIndicesAndSampleIds {
75+
# input:
76+
# crams = cram_array,
77+
# cram_indices = evaluated_cram_indices,
78+
# sample_ids = evaluated_sample_ids,
79+
# billing_project_for_rp = billing_project_for_rp
80+
# }
81+
# }
82+
# }
7283
7384
output {
74-
Boolean passes_qc = select_first([ValidateCramsAndIndicesAndSampleIds.passes_qc, ConvertCramManifestToInputArrays.passes_qc, no_data_passes_qc, multiple_data_types_passes_qc, no_cram_index_or_sample_id_passes_qc])
75-
String qc_messages = select_first([ValidateCramsAndIndicesAndSampleIds.qc_messages, ConvertCramManifestToInputArrays.qc_messages, no_data_message, multiple_data_types_message, no_cram_index_or_sample_id_message])
85+
Boolean passes_qc = select_first([ValidateCramsAndIndicesAndSampleIds.passes_qc, ConvertCramManifestToInputArrays.passes_qc, no_data_passes_qc, multiple_data_types_passes_qc])
86+
String qc_messages = select_first([ValidateCramsAndIndicesAndSampleIds.qc_messages, ConvertCramManifestToInputArrays.qc_messages, no_data_message, multiple_data_types_message])
7687
}
7788
}
7889

@@ -149,6 +160,7 @@ task ConvertCramManifestToInputArrays {
149160
disks: "local-disk 10 HDD"
150161
memory: "1 GiB"
151162
preemptible: 3
163+
maxRetries: 2
152164
noAddress: true
153165
}
154166

@@ -169,18 +181,9 @@ task ValidateCramsAndIndicesAndSampleIds {
169181
Array[String] sample_ids
170182

171183
Int max_cram_file_size_gb = 10
172-
String? billing_project_for_rp # if set, will use this to check file sizes for requester pays buckets. if not set, will not be able to check file sizes for requester pays buckets and will assume all files are below the max file size
173-
174-
String gatk_docker = "us.gcr.io/broad-gatk/gatk:4.6.1.0"
175-
Int cpu = 1
176-
Int memory_mb = 4000
177-
Int disk_size_gb = 10
184+
String? billing_project_for_rp # if set, will use this to check file sizes for requester pays buckets. if not set and input is in a RP bucket, will not be able to check file sizes for requester pays buckets and will fail the check
178185
}
179186

180-
Int num_crams = length(crams)
181-
Int num_cram_indices = length(cram_indices)
182-
Int num_sample_ids = length(sample_ids)
183-
184187
String gcloud_requester_pays_flag = if defined(billing_project_for_rp) then "--billing-project ${billing_project_for_rp}" else ""
185188

186189
command <<<
@@ -195,9 +198,10 @@ sample_ids = """~{sep=' ' sample_ids}""".split()
195198
crams = """~{sep=' ' crams}""".split()
196199
cram_indices = """~{sep=' ' cram_indices}""".split()
197200
198-
num_crams = ~{num_crams}
199-
num_cram_indices = ~{num_cram_indices}
200-
num_sample_ids = ~{num_sample_ids}
201+
num_crams = len(crams)
202+
num_cram_indices = len(cram_indices)
203+
num_sample_ids = len(sample_ids)
204+
201205
max_cram_file_size_gb = ~{max_cram_file_size_gb}
202206
billing_project_flag = "~{gcloud_requester_pays_flag}"
203207
@@ -274,12 +278,12 @@ EOF
274278
>>>
275279

276280
runtime {
277-
docker: gatk_docker
278-
disks: "local-disk ${disk_size_gb} SSD"
279-
memory: "${memory_mb} MiB"
280-
cpu: cpu
281+
docker: "us.gcr.io/broad-dsde-methods/python-data-slim:1.0"
282+
cpu: 1
283+
disks: "local-disk 10 HDD"
284+
memory: "1 GiB"
281285
preemptible: 3
282-
maxRetries: 1
286+
maxRetries: 2
283287
noAddress: true
284288
}
285289

0 commit comments

Comments
 (0)