Skip to content

Commit 8aca0ca

Browse files
committed
let Hail write directly to a bucket
1 parent 0e23af3 commit 8aca0ca

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

wdl/pipelines/TechAgnostic/VariantCalling/LRJointCallGVCFs.wdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ workflow LRJointCallGVCFs {
3030
output {
3131
File joint_gvcf = FinalizeGVCF.gcs_path
3232
File joint_gvcf_tbi = FinalizeTBI.gcs_path
33-
String joint_mt = ConvertToHailMT.gcs_path
33+
String joint_mt = ConvertToHailMT.mt_bucket_path
3434
}
3535

3636
String workflow_name = "JointCallGVCFs"

wdl/tasks/Utility/Hail.wdl

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import "../../structs/Structs.wdl"
44

55
task ConvertToHailMT {
66
meta {
7-
description: "Convert a .vcf.bgz file to a Hail MatrixTable and copy it to a final gs:// URL."
7+
description: "Convert a .vcf.bgz file to a Hail MatrixTable and write it to a final gs:// URL."
88
}
99

1010
parameter_meta {
1111
gvcf: "The input .vcf.bgz file."
1212
tbi: "The input .vcf.bgz.tbi file."
13-
reference: "The reference genome to use. Currently only GRCh38 is supported."
13+
reference: "The reference genome to use."
1414
ref_fasta: "The reference genome FASTA file. If not specified, the reference genome will be downloaded from the Hail website."
1515
ref_fai: "The reference genome FASTA index file. If not specified, the reference genome will be downloaded from the Hail website."
1616
prefix: "The prefix to use for the output MatrixTable."
@@ -32,8 +32,12 @@ task ConvertToHailMT {
3232
RuntimeAttr? runtime_attr_override
3333
}
3434

35+
output {
36+
String mt_bucket_path = "~{outdir}/~{prefix}.mt"
37+
}
38+
3539
command <<<
36-
set -x
40+
set -eux
3741
3842
date
3943
python3 <<EOF
@@ -51,34 +55,30 @@ task ConvertToHailMT {
5155
reference_genome='~{reference}'
5256
)
5357
54-
callset.write('~{prefix}.mt')
58+
callset.write('~{outdir}/~{prefix}.mt')
5559
5660
EOF
5761
date
5862
5963
# gsutil -m rsync -Cr ~{prefix}.mt ~{outdir}/~{prefix}.mt
60-
set +e
61-
attempt=1
62-
gcloud --verbosity='error' storage \
63-
rsync \
64-
-c -r \
65-
~{prefix}.mt \
66-
~{outdir}/~{prefix}.mt
67-
retVal=$?
68-
if [[ ${retVal} -ne 0 && ${attempt} -lt 5 ]]; then
69-
attempt=$((attempt+1))
70-
gcloud --verbosity='error' storage \
71-
rsync \
72-
-c -r \
73-
~{prefix}.mt \
74-
~{outdir}/~{prefix}.mt
75-
fi
64+
# set +e
65+
# attempt=1
66+
# gcloud --verbosity='error' storage \
67+
# rsync \
68+
# -c -r \
69+
# ~{prefix}.mt \
70+
# ~{outdir}/~{prefix}.mt
71+
# retVal=$?
72+
# if [[ ${retVal} -ne 0 && ${attempt} -lt 5 ]]; then
73+
# attempt=$((attempt+1))
74+
# gcloud --verbosity='error' storage \
75+
# rsync \
76+
# -c -r \
77+
# ~{prefix}.mt \
78+
# ~{outdir}/~{prefix}.mt
79+
# fi
7680
>>>
7781

78-
output {
79-
String gcs_path = "~{outdir}/~{prefix}.mt"
80-
}
81-
8282
#########################
8383
Int disk_size = 1 + 3*ceil(size(gvcf, "GB"))
8484

0 commit comments

Comments
 (0)