Skip to content

Commit 34d09fc

Browse files
authored
chore: GiB -> GB (#302)
Currently, we compute file sizes in `GiB`. We then use those to request disk space, but in `GB`. This is silently undercounting the amount of disk space we need for these tasks. `GB` was chosen to be the common unit because our variables already end in `_gb` so this is the least disruptive change. Before submitting this PR, please make sure: - [x] You have added a few sentences describing the PR here. - [ ] The code passes all CI tests without any errors or warnings. - [ ] You have added tests (when appropriate). - [x] You have added an entry in any relevant CHANGELOGs (when appropriate). - [ ] If you have made any changes to the `scripts/` or `docker/` directories, please ensure any image versions have been incremented accordingly! - [ ] You have updated the README or other documentation to account for these changes (when appropriate).
1 parent 77be0a7 commit 34d09fc

25 files changed

Lines changed: 104 additions & 93 deletions

data_structures/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/).
66

7+
## 2026 February
8+
9+
### Changed
10+
11+
- Converted size checks to GB from GiB [#302](https://github.com/stjudecloud/workflows/pull/302)
12+
713
## 2025 September
814

915
### Added

data_structures/read_group.wdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ task get_read_groups {
123123
Int modify_disk_size_gb = 0
124124
}
125125
126-
Float bam_size = size(bam, "GiB")
126+
Float bam_size = size(bam, "GB")
127127
Int disk_size_gb = ceil(bam_size) + 10 + modify_disk_size_gb
128128
129129
command <<<

template/task-examples.wdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ task dynamic_disk_and_ram_task {
4444
Int modify_disk_size_gb = 0
4545
}
4646

47-
Int input_size_gb = ceil(size(<input files>, "GiB"))
47+
Int input_size_gb = ceil(size(<input files>, "GB"))
4848
4949
Int memory_gb = ceil(input_size_gb * X) + modify_memory_gb
5050
Int disk_size_gb = ceil(input_size_gb * Y) + modify_disk_size_gb

tools/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
1010

1111
- gzip `picard.validate_bam` output when not in `summary_mode` [#298](https://github.com/stjudecloud/workflows/pull/298)
1212
- Lowered default disk allocation for `picard.validate_bam` [#298](https://github.com/stjudecloud/workflows/pull/298)
13+
- Converted size checks to GB from GiB [#302](https://github.com/stjudecloud/workflows/pull/302)
1314

1415
## 2026 January
1516

tools/arriba.wdl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ task arriba {
175175
Int modify_disk_size_gb = 0
176176
}
177177

178-
Int bam_size_gb = ceil(size(bam, "GiB"))
178+
Int bam_size_gb = ceil(size(bam, "GB"))
179179
Int disk_size_gb = bam_size_gb
180-
+ ceil(size(gtf, "GiB"))
181-
+ ceil(size(reference_fasta_gz, "GiB"))
180+
+ ceil(size(gtf, "GB"))
181+
+ ceil(size(reference_fasta_gz, "GB"))
182182
+ modify_disk_size_gb
183183
Int memory_gb = bam_size_gb + modify_memory_gb
184184

@@ -273,9 +273,9 @@ task arriba_tsv_to_vcf {
273273
Int modify_disk_size_gb = 0
274274
}
275275

276-
Int input_size_gb = ceil(size(fusions, "GiB"))
276+
Int input_size_gb = ceil(size(fusions, "GB"))
277277
Int disk_size_gb = ceil(input_size_gb)
278-
+ (ceil(size(reference_fasta, "GiB")) * 3)
278+
+ (ceil(size(reference_fasta, "GB")) * 3)
279279
+ modify_disk_size_gb
280280

281281
command <<<
@@ -329,7 +329,7 @@ task arriba_extract_fusion_supporting_alignments {
329329
Int modify_disk_size_gb = 0
330330
}
331331

332-
Int input_size_gb = ceil(size(bam, "GiB"))
332+
Int input_size_gb = ceil(size(bam, "GB"))
333333
Int disk_size_gb = ceil(input_size_gb) + 5 + modify_disk_size_gb
334334

335335
command <<<
@@ -374,7 +374,7 @@ task arriba_annotate_exon_numbers {
374374
Int modify_disk_size_gb = 0
375375
}
376376

377-
Int input_size_gb = ceil(size(gtf, "GiB"))
377+
Int input_size_gb = ceil(size(gtf, "GB"))
378378
Int disk_size_gb = ceil(input_size_gb) + 5 + modify_disk_size_gb
379379

380380
command <<<

tools/bwa.wdl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ task bwa_aln {
4848

4949
String output_bam = prefix + ".bam"
5050

51-
Float input_fastq_size = size(fastq, "GiB")
52-
Float reference_size = size(bwa_db_tar_gz, "GiB")
51+
Float input_fastq_size = size(fastq, "GB")
52+
Float reference_size = size(bwa_db_tar_gz, "GB")
5353
Int disk_size_gb = (
5454
ceil((input_fastq_size + reference_size) * 2) + 10 + modify_disk_size_gb
5555
)
@@ -145,9 +145,9 @@ task bwa_aln_pe {
145145
String output_bam = prefix + ".bam"
146146

147147
Float input_fastq_size = (
148-
size(read_one_fastq_gz, "GiB") + size(read_two_fastq_gz, "GiB")
148+
size(read_one_fastq_gz, "GB") + size(read_two_fastq_gz, "GB")
149149
)
150-
Float reference_size = size(bwa_db_tar_gz, "GiB")
150+
Float reference_size = size(bwa_db_tar_gz, "GB")
151151
Int disk_size_gb = (
152152
ceil((input_fastq_size + reference_size) * 2) + 5 + modify_disk_size_gb
153153
)
@@ -242,9 +242,9 @@ task bwa_mem {
242242

243243
String output_bam = prefix + ".bam"
244244

245-
Float input_fastq_size = size(read_one_fastq_gz, "GiB")
246-
+ size(read_two_fastq_gz, "GiB")
247-
Float reference_size = size(bwa_db_tar_gz, "GiB")
245+
Float input_fastq_size = size(read_one_fastq_gz, "GB")
246+
+ size(read_two_fastq_gz, "GB")
247+
Float reference_size = size(bwa_db_tar_gz, "GB")
248248
Int disk_size_gb = (
249249
ceil((input_fastq_size + reference_size) * 2) + 10 + modify_disk_size_gb
250250
)
@@ -324,7 +324,7 @@ task build_bwa_db {
324324
Int modify_disk_size_gb = 0
325325
}
326326

327-
Float input_fasta_size = size(reference_fasta, "GiB")
327+
Float input_fasta_size = size(reference_fasta, "GB")
328328
Int disk_size_gb = ceil(input_fasta_size * 2) + 10 + modify_disk_size_gb
329329
String bwa_db_out_name = db_name + ".tar.gz"
330330

tools/deeptools.wdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ task bam_coverage {
3434
Int modify_disk_size_gb = 0
3535
}
3636

37-
Float bam_size = size(bam, "GiB")
37+
Float bam_size = size(bam, "GB")
3838
Int disk_size_gb = ceil(bam_size * 1.5) + 10 + modify_disk_size_gb
3939

4040
command <<<

tools/fastqc.wdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ task fastqc {
3535

3636
String out_tar_gz = prefix + ".tar.gz"
3737

38-
Float bam_size = size(bam, "GiB")
38+
Float bam_size = size(bam, "GB")
3939
Int disk_size_gb = ceil(bam_size * 2) + 10 + modify_disk_size_gb
4040

4141
command <<<

tools/fq.wdl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ task fqlint {
6464
Int modify_disk_size_gb = 0
6565
}
6666

67-
Float read1_size = size(read_one_fastq, "GiB")
68-
Float read2_size = size(read_two_fastq, "GiB")
67+
Float read1_size = size(read_one_fastq, "GB")
68+
Float read2_size = size(read_two_fastq, "GB")
6969

7070
Int memory_gb = (
7171
ceil((read1_size + read2_size) * 0.25) + 1 + modify_memory_gb
@@ -133,8 +133,8 @@ task subsample {
133133
Int modify_disk_size_gb = 0
134134
}
135135

136-
Float read1_size = size(read_one_fastq, "GiB")
137-
Float read2_size = size(read_two_fastq, "GiB")
136+
Float read1_size = size(read_one_fastq, "GB")
137+
Float read2_size = size(read_two_fastq, "GB")
138138

139139
Int disk_size_gb = ceil((read1_size + read2_size) * 2) + modify_disk_size_gb
140140

tools/gatk4.wdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ task mark_duplicates_spark {
450450
Int ncpu = 4
451451
}
452452

453-
Float bam_size = size(bam, "GiB")
453+
Float bam_size = size(bam, "GB")
454454
Int memory_gb = min(ceil(bam_size + 15), 50) + modify_memory_gb
455455
Int disk_size_gb = (
456456
(

0 commit comments

Comments
 (0)