Skip to content

Commit

Permalink
Copy metrics to output_gcs_dir if defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbggrant committed Aug 28, 2024
1 parent 6623775 commit 2a2fa26
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/variantstore/wdl/GvsExtractCallset.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ version 1.0

import "GvsUtils.wdl" as Utils

# It's a comment.
workflow GvsExtractCallset {
input {
Boolean go = true
Expand Down Expand Up @@ -283,6 +285,7 @@ workflow GvsExtractCallset {
input_details = select_all(CollectMetricsSharded.detail_metrics_file),
input_summaries = select_all(CollectMetricsSharded.summary_metrics_file),
output_prefix = call_set_identifier,
output_gcs_dir = output_gcs_dir,
gatk_docker = effective_gatk_docker
}
}
Expand Down Expand Up @@ -724,6 +727,7 @@ task GatherVariantCallingMetrics {
Array[File] input_details
Array[File] input_summaries
String output_prefix
String? output_gcs_dir

Int memory_mb = 3000
Int disk_size_gb = 200
Expand All @@ -749,6 +753,9 @@ task GatherVariantCallingMetrics {
PS4='\D{+%F %T} \w $ '
set -o errexit -o nounset -o pipefail -o xtrace

# Drop trailing slash if one exists
OUTPUT_GCS_DIR=$(echo ~{output_gcs_dir} | sed 's/\/$//')

bash ~{monitoring_script} > monitoring.log &

input_details_fofn=~{write_lines(input_details)}
Expand Down Expand Up @@ -790,6 +797,11 @@ task GatherVariantCallingMetrics {
AccumulateVariantCallingMetrics \
$INPUT \
--OUTPUT ~{output_prefix}

if [ -n "$OUTPUT_GCS_DIR" ]; then
gsutil cp ~{output_prefix}.variant_calling_summary_metrics ${OUTPUT_GCS_DIR}/
gsutil cp ~{output_prefix}.variant_calling_detail_metrics ${OUTPUT_GCS_DIR}/
fi
>>>

runtime {
Expand Down

0 comments on commit 2a2fa26

Please sign in to comment.