Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
**/womtool*
*.jar
runs/
out/
miniwdl_call_cache/
miniwdl_singularity_cache/
_LAST
Expand All @@ -29,7 +30,7 @@ _LAST
results*/
output*/

# Ignore JSONs in the root (probably being used for input to sprocket run)
# Ignore JSONs in the root (probably being used for input)
/*.json

# Ignore `sprocket doc` dir
Expand Down
7 changes: 7 additions & 0 deletions tools/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

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

## 2026 February

### Changed

- gzip `picard.validate_bam` output when not in `summary_mode` [#298](https://github.com/stjudecloud/workflows/pull/298)
- Lowered default disk allocation for `picard.validate_bam` [#298](https://github.com/stjudecloud/workflows/pull/298)

## 2026 January

### Changed
Expand Down
12 changes: 7 additions & 5 deletions tools/picard.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,15 @@ task validate_bam {
Int modify_disk_size_gb = 0
}

String outfile = if summary_mode then outfile_name else outfile_name + ".gz"
String mode_arg = if (summary_mode) then "--MODE SUMMARY" else ""
String stringency_arg = (
if (index_validation_stringency_less_exhaustive)
then "--INDEX_VALIDATION_STRINGENCY LESS_EXHAUSTIVE"
else ""
)
Float bam_size = size(bam, "GiB")
Int disk_size_gb = ceil(bam_size * 2) + 10 + modify_disk_size_gb
Int disk_size_gb = ceil(bam_size) + 10 + modify_disk_size_gb
Int java_heap_size = ceil(memory_gb * 0.9)

command <<<
Expand All @@ -217,7 +218,8 @@ task validate_bam {
--VALIDATION_STRINGENCY "~{validation_stringency}" \
~{sep(" ", prefix("--IGNORE ", squote(ignore_list)))} \
--MAX_OUTPUT ~{max_errors} \
> "~{outfile_name}" \
~{if !summary_mode then "| gzip" else ""} \
> "~{outfile}" \
|| rc=$?

# rc = 0 = success
Expand All @@ -235,16 +237,16 @@ task validate_bam {
fi

if ! ~{succeed_on_errors} \
&& [ "$(grep -Ec "$GREP_PATTERN" "~{outfile_name}")" -gt 0 ]
&& [ "$(grep -Ec "$GREP_PATTERN" "~{outfile}")" -gt 0 ]
then
>&2 echo "Problems detected by Picard ValidateSamFile"
>&2 grep -E "$GREP_PATTERN" "~{outfile_name}"
>&2 grep -E "$GREP_PATTERN" "~{outfile}"
exit $rc
fi
>>>

output {
File validate_report = outfile_name
File validate_report = outfile
}

runtime {
Expand Down
Loading