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

Aggressive pruner AssertionError #4754

Closed
konradjk opened this issue Nov 9, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@konradjk
Copy link
Collaborator

commented Nov 9, 2018

Running a function like:

def annotate_tx_expression_data(ht, tx_ht, location):
    key = ht.key if isinstance(ht, hl.Table) else ht.row_key
    return hl.find(lambda csq: (csq.ensg == location.gene_id) &
                               (csq.csq == location.most_severe_consequence),
                   tx_ht[key].tx_annotation)
mt = mt.annotate_rows(expressed=annotate_tx_expression_data(mt, tx_ht, mt.lof_csqs).mean_expression > 0.1)
mt.describe()
mt.group_rows_by(*list(annotation_expr.keys())).aggregate_rows(
        classic_caf=hl.agg.sum(mt.freq[0].AF),
        max_af=hl.agg.max(mt.freq[0].AF),
        classic_caf_array=hl.agg.array_sum(mt.freq.map(lambda x: x.AF))
    ).aggregate_entries(
        num_homs=hl.agg.count_where(mt.GT.is_hom_var()),
        num_hets=hl.agg.count_where(mt.GT.is_het()),
        defined_sites=hl.agg.count_where(hl.is_defined(mt.GT))
    ).result()

errors out with Error summary: AssertionError: assertion failed: ensg not in struct{mean_expression: float64}. the describe shows that it's doing the right thing (expressed is a bool), but i'm guessing that since ensg is not strictly referred to except in a lambda, that it's getting pruned out?

Full log posted on zulip

@tpoterba

This comment has been minimized.

Copy link
Collaborator

commented Nov 16, 2018

randomly assigned @jbloom22

tpoterba added a commit to tpoterba/hail that referenced this issue Nov 30, 2018

@danking danking closed this in #4867 Dec 3, 2018

danking added a commit that referenced this issue Dec 3, 2018

Fix If type unification in PruneDeadFields (#4867)
* Fix If type unification in PruneDeadFields

fixes #4754

* oops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.