-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vds] Add support for VDSes with truncated reference blocks #12645
Conversation
…s in filter_intervals
* add `hl.vds.truncate_reference_blocks` * add `hl.vds.merge_reference_blocks`
hail/python/hail/vds/methods.py
Outdated
|
||
Notes | ||
----- | ||
After this function has been run, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here are the lint errors
hail/python/hail/vds/methods.py
Outdated
if ref_allele_function is None: | ||
rg = ht.locus.dtype.reference_genome | ||
if 'ref_allele' in ht.row: | ||
ref_allele_function = lambda ht: ht.ref_allele |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either ignore lint or use a def
hail/python/hail/vds/methods.py
Outdated
if 'ref_allele' in ht.row: | ||
ref_allele_function = lambda ht: ht.ref_allele | ||
elif rg.has_sequence(): | ||
ref_allele_function = lambda ht: ht.locus.sequence_context() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either ignore lint or use a def
hail/python/hail/vds/methods.py
Outdated
ht = ht.annotate(prev_block=hl.zip(hl.scan.array_agg(lambda elt: hl.scan.fold((hl.null(rd.entry.dtype), False), | ||
lambda acc: keep_last(acc, ( | ||
elt, False)), | ||
keep_last), ht.entries), ht.entries) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indentation here
all_ref_max = n_with_ref_max_len == len(mts) | ||
|
||
# if some mts have max ref len but not all, drop it | ||
new_ref_block_len_max = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused?
5f360c4
to
fedb013
Compare
We may want to note a change to |
CHANGELOG: introduce
hl.vds.truncate_reference_blocks
to permit faster point queries against Hail VariantDatasets. Removeref_allele
as a required field in reference data.hl.vds.truncate_reference_blocks
hl.vds.merge_reference_blocks
hl.vds.filter_intervals
to use this