Skip to content

Commit

Permalink
Use combiner's calculate_new_intervals for target_final_intervals (#8603
Browse files Browse the repository at this point in the history
)

This should work around a rare error in `_calculate_new_intervals` that
could generate invalid partitioners in a way that
`calculate_new_intervals` cannot.
  • Loading branch information
chrisvittal authored Dec 6, 2023
1 parent 9e6b19a commit 2734df5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/variantstore/wdl/extract/import_gvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import List

import hail as hl
from hail.vds.combiner.combine import merge_alleles
from hail.vds.combiner.combine import merge_alleles, calculate_new_intervals
from hail.genetics.reference_genome import reference_genome_type
from hail.typecheck import typecheck, sequenceof, numeric

Expand Down Expand Up @@ -297,7 +297,8 @@ def convert_array_with_id_keys_to_dense_array(arr, ids, drop=[]):
target_records = first_ref_mt.count_rows() // total_partitions
info(f'import_gvs: using target_records (records per partition) of {target_records} for VDS merge')

target_final_intervals = first_ref_mt._calculate_new_partitions(total_partitions)
interval_tmp = os.path.join(tmp_dir, 'interval_checkpoint.ht')
target_final_intervals = calculate_new_intervals(first_ref_mt, target_records, interval_tmp)

with hl._with_flags(no_whole_stage_codegen='1'):

Expand Down

0 comments on commit 2734df5

Please sign in to comment.