Skip to content

Commit

Permalink
expor
Browse files Browse the repository at this point in the history
  • Loading branch information
mcovarr committed Sep 22, 2022
1 parent 79cb502 commit d8b7470
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions scripts/variantstore/wdl/GvsCallsetStatistics.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ workflow GvsCallsetStatistics {
aggregate_metrics_table = aggregate_metrics_table,
statistics_table = statistics_table
}

call ExportToTSV {
input:
project_id = project_id,
dataset_name = dataset_name,
statistics_table = statistics_table,
go = CollectStatistics.done
}
}

task CreateTables {
Expand Down Expand Up @@ -718,3 +726,25 @@ task CollectStatistics {
docker: "us.gcr.io/broad-dsde-methods/variantstore:ah_var_store_2022_08_22"
}
}
task ExportToTSV {
input {
String project_id
String dataset_name
String statistics_table
Boolean go
}
command <<<
bq query --nouse_legacy_sql --project_id=~{project_id} --format=csv --field_delimiter=tab '
SELECT * from `~{project_id}.~{dataset_name}.~{statistics_table}`
' > '~{statistics_table}.tsv'
>>>
output {
File tsv = "~{statistics_table}.tsv"
}
runtime {
docker: "us.gcr.io/broad-dsde-methods/variantstore:ah_var_store_2022_08_22"
}
}

0 comments on commit d8b7470

Please sign in to comment.