Skip to content

Commit

Permalink
add hail whl to vds creation
Browse files Browse the repository at this point in the history
  • Loading branch information
RoriCremer committed Dec 13, 2023
1 parent cf4ec6a commit 528fd0b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion scripts/variantstore/wdl/GvsCreateVDS.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ workflow GvsCreateVDS {
String avro_path
Boolean use_classic_VQSR = false
String? hail_version
String? hail_wheel
String cluster_prefix = "vds-cluster"
String gcs_subnetwork_name = "subnetwork"
String region = "us-central1"
Expand Down Expand Up @@ -47,6 +48,13 @@ workflow GvsCreateVDS {
}

String effective_variants_docker = select_first([variants_docker, GetToolVersions.variants_docker])
if (defined(hail_version) && defined(hail_wheel)) { # If neither the whl or version is specified, we go with the utils Hail version. Both cannot be specified.
call Utils.TerminateWorkflow as HailVersionFail {
input:
message = "A Hail version and a Hail wheel cannot both be specified",
basic_docker = effective_variants_docker,
}
}
String effective_workspace_bucket = select_first([workspace_bucket, GetToolVersions.workspace_bucket])
String effective_google_project = select_first([gcs_project, GetToolVersions.google_project])
String effective_hail_version = select_first([hail_version, GetToolVersions.hail_version])
Expand All @@ -59,6 +67,7 @@ workflow GvsCreateVDS {
avro_path = avro_path,
use_classic_VQSR = use_classic_VQSR,
hail_version = effective_hail_version,
hail_wheel = hail_wheel,
gcs_project = effective_google_project,
region = region,
workspace_bucket = effective_workspace_bucket,
Expand Down Expand Up @@ -93,6 +102,7 @@ task create_vds {
String avro_path
Boolean use_classic_VQSR
String? hail_version
String? hail_wheel

String gcs_project
String workspace_bucket
Expand All @@ -110,7 +120,14 @@ task create_vds {
account_name=$(gcloud config list account --format "value(core.account)")

pip3 install --upgrade pip
pip3 install hail~{'==' + hail_version}

if [[ -z "~{hail_wheel}" ]]
then
pip install ~{hail_wheel}
else
pip install hail~{'==' + hail_version}
fi

pip3 install --upgrade google-cloud-dataproc

# Generate a UUIDish random hex string of <8 hex chars (4 bytes)>-<4 hex chars (2 bytes)>
Expand Down
1 change: 1 addition & 0 deletions scripts/variantstore/wdl/GvsQuickstartHailIntegration.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ workflow GvsQuickstartHailIntegration {
input:
git_branch_or_tag = git_branch_or_tag,
hail_version = effective_hail_version,
hail_wheel = hail_wheel,
use_classic_VQSR = !use_VQSR_lite,
avro_path = GvsExtractAvroFilesForHail.avro_prefix,
vds_destination_path = GvsExtractAvroFilesForHail.vds_output_path,
Expand Down

0 comments on commit 528fd0b

Please sign in to comment.