Skip to content

Commit

Permalink
PGEN pvar files not compressed [VS-1412] (#8872)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcovarr committed Jun 17, 2024
1 parent 9dc13be commit 862e4a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .dockstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ workflows:
- master
- ah_var_store
- EchoCallset
- vs_1412_pgen_pvars_not_compressed
- name: MergePgenHierarchicalWdl
subclass: WDL
primaryDescriptorPath: /scripts/variantstore/wdl/MergePgenHierarchical.wdl
Expand Down
14 changes: 11 additions & 3 deletions scripts/variantstore/wdl/MergePgenHierarchical.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ task MergePgen {
Int cpu = threads + 1

command <<<
set -euxo pipefail
# Prepend date, time and pwd to xtrace log entries.
PS4='\D{+%F %T} \w $ '
set -o errexit -o nounset -o pipefail -o xtrace

# Download files using gsutil
mkdir pgen_dir
Expand All @@ -109,7 +111,7 @@ task MergePgen {
0)
echo "No pgen files so creating empty ones"
touch ~{output_file_base_name}.pgen
touch ~{output_file_base_name}.pvar
touch ~{output_file_base_name}.pvar.zst
touch ~{output_file_base_name}.psam
;;
1)
Expand All @@ -135,11 +137,17 @@ task MergePgen {
;;
esac

if [[ -e ~{output_file_base_name}.pvar.zst ]]
then
# Decompress for earlier versions of PLINK that can't handle zst compression.
plink2 --zst-decompress ~{output_file_base_name}.pvar.zst > ~{output_file_base_name}.pvar
fi

>>>

output {
File pgen_file = "${output_file_base_name}.pgen"
File pvar_file = "${output_file_base_name}.pvar.zst"
File pvar_file = "${output_file_base_name}.pvar"
File psam_file = "${output_file_base_name}.psam"
}

Expand Down

0 comments on commit 862e4a5

Please sign in to comment.