From e1357a36309d77941a6b457334965743602dc007 Mon Sep 17 00:00:00 2001 From: Yonghao Yu Date: Wed, 30 Oct 2024 11:47:16 -0400 Subject: [PATCH 1/2] optional column --- scripts/variantstore/wdl/GvsExtractAvroFilesForHail.wdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/variantstore/wdl/GvsExtractAvroFilesForHail.wdl b/scripts/variantstore/wdl/GvsExtractAvroFilesForHail.wdl index 2b366c22d86..b5422e740da 100644 --- a/scripts/variantstore/wdl/GvsExtractAvroFilesForHail.wdl +++ b/scripts/variantstore/wdl/GvsExtractAvroFilesForHail.wdl @@ -279,7 +279,7 @@ task ExtractFromSuperpartitionedTables { EXPORT DATA OPTIONS( uri='${avro_prefix}/vets/vet_${str_table_index}/vet_${str_table_index}_*.avro', format='AVRO', compression='SNAPPY') AS SELECT location, v.sample_id, ref, REPLACE(alt,',','') alt, call_GT as GT, call_AD as AD, call_GQ as GQ, cast(SPLIT(call_pl,',')[OFFSET(0)] as int64) as RGQ, - call_PS as PS + SAFE_CAST(call_PS AS INT64) AS PS FROM \`~{project_id}.~{dataset_name}.vet_${str_table_index}\` v INNER JOIN \`~{project_id}.~{dataset_name}.sample_info\` s ON s.sample_id = v.sample_id WHERE withdrawn IS NULL AND From 4bbbb824fabaedc2e355811b15dc0057ad0bfc22 Mon Sep 17 00:00:00 2001 From: Yonghao Yu Date: Wed, 30 Oct 2024 13:01:30 -0400 Subject: [PATCH 2/2] one more missing place --- .../wdl/extract/create_ranges_cohort_extract_data_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/variantstore/wdl/extract/create_ranges_cohort_extract_data_table.py b/scripts/variantstore/wdl/extract/create_ranges_cohort_extract_data_table.py index fbbe6fafadf..a0fcd511de8 100644 --- a/scripts/variantstore/wdl/extract/create_ranges_cohort_extract_data_table.py +++ b/scripts/variantstore/wdl/extract/create_ranges_cohort_extract_data_table.py @@ -263,7 +263,7 @@ def get_ref_subselect(fq_vet_table, samples, id): if len(partition_samples) > 0: subs = {} - insert = f"\nINSERT INTO `{fq_destination_table_data}` (location, sample_id, ref, alt, call_GT, call_GQ, call_AD, AS_QUALapprox, QUALapprox, CALL_PL, CALL_PGT, CALL_PID, CALL_PS) \n WITH \n" + insert = f"\nINSERT INTO `{fq_destination_table_data}` (location, sample_id, ref, alt, call_GT, call_GQ, call_AD, AS_QUALapprox, QUALapprox, CALL_PL, CALL_PGT, CALL_PID, SAFE_CAST(CALL_PS AS INT64) AS CALL_PS) \n WITH \n" fq_vet_table = f"{fq_ranges_dataset}.{VET_TABLE_PREFIX}{i:03}" j = 1