Skip to content

Commit c276d72

Browse files
author
David Shiga
authored
Add and use disk_space param for stage_files to avoid running out of space (366) (#89)
1 parent 10f7ec4 commit c276d72

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

adapter_pipelines/cellranger/adapter.wdl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ workflow Adapter10xCount {
256256
record_http = record_http,
257257
pipeline_tools_version = pipeline_tools_version,
258258
add_md5s = add_md5s,
259-
pipeline_version = analysis.pipeline_version
259+
pipeline_version = analysis.pipeline_version,
260+
# The sorted bam is the largest output. Other outputs will increase space by ~50%.
261+
# Factor of 2 and addition of 50 GB gives some buffer.
262+
disk_space = ceil(size(analysis.sorted_bam, "GB") * 2 + 50)
260263
}
261264
}

adapter_pipelines/ss2_single_sample/adapter.wdl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ workflow AdapterSmartSeq2SingleCell{
210210
pipeline_tools_version = pipeline_tools_version,
211211
add_md5s = add_md5s,
212212
max_retries = max_cromwell_retries,
213-
pipeline_version = analysis.pipeline_version
213+
pipeline_version = analysis.pipeline_version,
214+
# The bam files are by far the largest outputs. The extra 5 GB should easily cover everything else.
215+
disk_space = ceil(size(analysis.aligned_bam, "GB") + size(analysis.aligned_transcriptome_bam, "GB") + 5)
214216
}
215217
}

adapter_pipelines/submit.wdl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ task stage_files {
133133
Boolean record_http
134134
String pipeline_tools_version
135135
Int max_retries = 0
136+
Int disk_space
136137

137138
command <<<
138139
set -e
@@ -177,6 +178,7 @@ task stage_files {
177178

178179
runtime {
179180
docker: "quay.io/humancellatlas/secondary-analysis-pipeline-tools:" + pipeline_tools_version
181+
disks: "local-disk ${disk_space} HDD"
180182
maxRetries: max_retries
181183
}
182184
output {
@@ -253,6 +255,8 @@ workflow submit {
253255
Int max_retries = 0
254256
# Version of the pipeline, should be included in the pipeline file
255257
String pipeline_version
258+
# Disk space to allocate for stage_files task
259+
Int disk_space
256260

257261
call get_metadata {
258262
input:
@@ -304,7 +308,8 @@ workflow submit {
304308
retry_max_interval = retry_max_interval,
305309
record_http = record_http,
306310
pipeline_tools_version = pipeline_tools_version,
307-
max_retries = max_retries
311+
max_retries = max_retries,
312+
disk_space = disk_space
308313
}
309314
310315
call confirm_submission {

0 commit comments

Comments
 (0)