Skip to content
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

Hail Locus (and other Python data types) in __eq__, etc. should check if the RHS is a Hail Expression and delegate to the expression instead. #13045

Closed
danking opened this issue May 12, 2023 · 1 comment
Assignees
Labels

Comments

@danking
Copy link
Contributor

danking commented May 12, 2023

What happened?

See confusing behavior here:

https://discuss.hail.is/t/subset-matrix-table-to-a-medium-sized-list-of-variants/3362/6?u=danking

In [54]: vstruct
Out[54]: Struct(locus=Locus(contig=10, position=60515, reference_genome=GRCh37), alleles=['C', 'T'])

In [55]: (vstruct == minimt.row_key)
Out[55]: False

Version

0.2.105

Relevant log output

No response

@danking danking added the bug label May 17, 2023
@ehigham ehigham self-assigned this May 30, 2023
@ehigham
Copy link
Member

ehigham commented Jul 6, 2023

Reproduction example:

import hail as hl
vstruct = hl.Struct(
  locus=hl.Locus(contig=10, position=60515, reference_genome='GRCh37'),
  alleles=['C', 'T']
)

row_key = hl.struct(
  locus=hl.locus(contig='10', pos=60515, reference_genome='GRCh37'),
  alleles=['C', 'T']
)

assert hl.eval(row_key == vstruct)
assert vstruct == row_key # <- Fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants