Skip to content

Commit

Permalink
Wdlupdate (#5)
Browse files Browse the repository at this point in the history
* increased default memory
* Updated contact us message in ReadMe
  • Loading branch information
bshifaw authored Mar 9, 2020
1 parent f4fc671 commit f4ecb7f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 36 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ Workflows for validating sequence data
- Set of .txt files containing the validation reports, one per input file

### Cromwell version support
- Successfully tested on v33
- Successfully tested on v49
- Does not work on versions < v23 due to output syntax

### Important Note :
- The provided JSON is meant to be a ready to use example JSON template of the workflow. It is the user’s responsibility to correctly set the reference and resource input variables using the [GATK Tool and Tutorial Documentations](https://software.broadinstitute.org/gatk/documentation/).
- Relevant reference and resources bundles can be accessed in [Resource Bundle](https://software.broadinstitute.org/gatk/download/bundle).
### Important Notes :
- Runtime parameters are optimized for Broad's Google Cloud Platform implementation.
- The provided JSON is a ready to use example JSON template of the workflow. Users are responsible for reviewing the [GATK Tool and Tutorial Documentations](https://gatk.broadinstitute.org/hc/en-us/categories/360002310591) to properly set the reference and resource variables.
- For help running workflows on the Google Cloud Platform or locally please
view the following tutorial [(How to) Execute Workflows from the gatk-workflows Git Organization](https://software.broadinstitute.org/gatk/documentation/article?id=12521).
- The following material is provided by the GATK Team. Please post any questions or concerns to one of our forum sites : [GATK](https://gatkforums.broadinstitute.org/gatk/categories/ask-the-team/) , [FireCloud](https://gatkforums.broadinstitute.org/firecloud/categories/ask-the-firecloud-team) or [Terra](https://broadinstitute.zendesk.com/hc/en-us/community/topics/360000500432-General-Discussion) , [WDL/Cromwell](https://gatkforums.broadinstitute.org/wdl/categories/ask-the-wdl-team).
- Please visit the [User Guide](https://software.broadinstitute.org/gatk/documentation/) site for further documentation on our workflows and tools.
view the following tutorial [(How to) Execute Workflows from the gatk-workflows Git Organization](https://gatk.broadinstitute.org/hc/en-us/articles/360035530952).
- Relevant reference and resources bundles can be accessed in [Resource Bundle](https://gatk.broadinstitute.org/hc/en-us/articles/360036212652).

### Contact Us :
- The following material is provided by the Data Science Platforum group at the Broad Institute. Please direct any questions or concerns to one of our forum sites : [GATK](https://gatk.broadinstitute.org/hc/en-us/community/topics) or [Terra](https://support.terra.bio/hc/en-us/community/topics/360000500432).

### LICENSING :
Copyright Broad Institute, 2019 | BSD-3
Expand Down
11 changes: 1 addition & 10 deletions validate-bam.inputs.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
{
"##Comment1":"Input",
"ValidateBamsWf.bam_array": [
"gs://gatk-test-data/wgs_bam/NA12878_24RG_hg38/NA12878_24RG_small.hg38.bam",
"gs://gatk-test-data/wgs_bam/NA12878_24RG_hg38/NA12878_24RG_med.hg38.bam"
],
"##Comment2":"Parameter",
"#ValidateBamsWf.ValidateBAM.validation_mode": "String (optional)",

"##Comment3":"Runtime - uncomment the lines below and supply a valid docker container to override the default",
"#ValidateBamsWf.ValidateBAM.machine_mem_gb": "Int? (optional)",
"#ValidateBamsWf.ValidateBAM.disk_space_gb": "Int? (optional)",
"#ValidateBamsWf.ValidateBAM.gatk_path_override": "String (optional)",
"#ValidateBamsWf.gatk_docker_override": "String (optional)"
]
}
40 changes: 21 additions & 19 deletions validate-bam.wdl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version 1.0
## Copyright Broad Institute, 2017
##
## This WDL performs format validation on SAM/BAM files in a list
Expand Down Expand Up @@ -26,11 +27,11 @@
# WORKFLOW DEFINITION
workflow ValidateBamsWf {
Array[File] bam_array
String? gatk_docker_override
String gatk_docker = select_first([gatk_docker_override, "broadinstitute/gatk:latest"])
String? gatk_path_override
String gatk_path = select_first([gatk_path_override, "/gatk/gatk"])
input {
Array[File] bam_array
String gatk_docker = "broadinstitute/gatk:latest"
String gatk_path = "/gatk/gatk"
}

# Process the input files in parallel
scatter (input_bam in bam_array) {
Expand Down Expand Up @@ -58,18 +59,20 @@ workflow ValidateBamsWf {
# Validate a SAM or BAM using Picard ValidateSamFile
task ValidateBAM {
# Command parameters
File input_bam
String output_basename
String? validation_mode
String gatk_path
input {
# Command parameters
File input_bam
String output_basename
String? validation_mode
String gatk_path

# Runtime parameters
String docker
Int? machine_mem_gb
Int? disk_space_gb
Int disk_size = ceil(size(input_bam, "GB")) + 20

# Runtime parameters
String docker
Int machine_mem_gb = 4
Int addtional_disk_space_gb = 50
}

Int disk_size = ceil(size(input_bam, "GB")) + addtional_disk_space_gb
String output_name = "${output_basename}_${validation_mode}.txt"

command {
Expand All @@ -81,9 +84,8 @@ task ValidateBAM {
}
runtime {
docker: docker
memory: select_first([machine_mem_gb, 1]) + " GB"
cpu: "1"
disks: "local-disk " + select_first([disk_space_gb, disk_size]) + " HDD"
memory: machine_mem_gb + " GB"
disks: "local-disk " + disk_size + " HDD"
}
output {
File validation_report = "${output_name}"
Expand Down

0 comments on commit f4ecb7f

Please sign in to comment.