[vds] Add support for VDSes with truncated reference blocks#12645
Merged
danking merged 11 commits intohail-is:mainfrom Feb 6, 2023
Merged
[vds] Add support for VDSes with truncated reference blocks#12645danking merged 11 commits intohail-is:mainfrom
danking merged 11 commits intohail-is:mainfrom
Conversation
…s in filter_intervals
* add `hl.vds.truncate_reference_blocks` * add `hl.vds.merge_reference_blocks`
chrisvittal
previously requested changes
Feb 3, 2023
|
|
||
| Notes | ||
| ----- | ||
| After this function has been run, the |
chrisvittal
reviewed
Feb 3, 2023
Collaborator
chrisvittal
left a comment
There was a problem hiding this comment.
here are the lint errors
| 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 |
Collaborator
There was a problem hiding this comment.
either ignore lint or use a def
| 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() |
Collaborator
There was a problem hiding this comment.
either ignore lint or use a def
Comment on lines
+1096
to
+1099
| 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) |
| 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 |
5f360c4 to
fedb013
Compare
Collaborator
|
We may want to note a change to |
chrisvittal
approved these changes
Feb 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG: introduce
hl.vds.truncate_reference_blocksto permit faster point queries against Hail VariantDatasets. Removeref_alleleas a required field in reference data.hl.vds.truncate_reference_blockshl.vds.merge_reference_blockshl.vds.filter_intervalsto use this