Skip to content

Commit

Permalink
update disk multiplier (#14)
Browse files Browse the repository at this point in the history
* update disk multiplier
* add dockstore yml
  • Loading branch information
bshifaw authored Aug 11, 2021
1 parent 4b4183c commit 6b69dde
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .dockstore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 1.2
workflows:
- name: Paired-FASTQ-to-Unmapped-BAM
subclass: WDL
primaryDescriptorPath: /paired-fastq-to-unmapped-bam.wdl
testParameterFiles:
- /paired-fastq-to-unmapped-bam.inputs.json
- name: BAM-to-Unmapped-BAM
subclass: WDL
primaryDescriptorPath: /bam-to-unmapped-bams.wdl
testParameterFiles:
- /bam-to-unmapped-bams.inputs.json
- name: CRAM-to-BAM
subclass: WDL
primaryDescriptorPath: /cram-to-bam.wdl
testParameterFiles:
- /cram-to-bam.inputs.json
- name: interleaved-fastq-to-paired-fastq
subclass: WDL
primaryDescriptorPath: /interleaved-fastq-to-paired-fastq.wdl
testParameterFiles:
- /interleaved-fastq-to-paired-fastq.inputs.json
11 changes: 9 additions & 2 deletions paired-fastq-to-unmapped-bam.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ workflow ConvertPairedFastQsToUnmappedBamWf {

String gatk_docker = "broadinstitute/gatk:latest"
String gatk_path = "/gatk/gatk"

# Sometimes the output is larger than the input, or a task can spill to disk.
# In these cases we need to account for the input (1) and the output (1.5) or the input(1), the output(1), and spillage (.5).
Float disk_multiplier = 2.5
}

String ubam_list_name = sample_name
Expand All @@ -67,7 +71,8 @@ workflow ConvertPairedFastQsToUnmappedBamWf {
platform_name = platform_name,
sequencing_center = sequencing_center,
gatk_path = gatk_path,
docker = gatk_docker
docker = gatk_docker,
disk_multiplier = disk_multiplier
}

#Create a file with the generated ubam
Expand Down Expand Up @@ -108,9 +113,11 @@ task PairedFastQsToUnmappedBAM {
Int machine_mem_gb = 7
Int preemptible_attempts = 3
String docker
Float disk_multiplier
}
Int command_mem_gb = machine_mem_gb - 1
Int disk_space_gb = ceil((size(fastq_1, "GB") + size(fastq_2, "GB")) * 2 ) + addtional_disk_space_gb
Float fastq_size = size(fastq_1, "GB") + size(fastq_2, "GB")
Int disk_space_gb = ceil(fastq_size + (fastq_size * disk_multiplier ) + addtional_disk_space_gb)
command {
~{gatk_path} --java-options "-Xmx~{command_mem_gb}g" \
FastqToSam \
Expand Down

0 comments on commit 6b69dde

Please sign in to comment.