Skip to content

Commit 4564468

Browse files
committed
handle no size found
1 parent 16cb129 commit 4564468

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pipelines/wdl/glimpse/low_pass_imputation/input_qc/Glimpse2LowPassImputationQC.wdl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,13 @@ task ValidateCramsAndIndicesAndSampleIds {
250250
blob = storage.Blob.from_uri(cram, client=client)
251251
252252
# Reload to get metadata
253-
# blob.reload()
253+
blob.reload()
254254
255255
# Get file size
256-
file_size_bytes = blob.size
256+
if blob.size is None:
257+
qc_messages.append(f"Could not retrieve file size for {cram}. Please check that the file exists and that the path is correct.")
258+
continue
259+
file_size_bytes = int(blob.size)
257260
file_size_gb = file_size_bytes // (1024 ** 3)
258261
print(f" - File size for {cram}: {file_size_gb} GB")
259262

0 commit comments

Comments
 (0)