Skip to content

Commit

Permalink
Even faster QQ (now with 100% more persist) (hail-is#4368)
Browse files Browse the repository at this point in the history
* Even faster QQ (now with 100% more persist)

* Even faster QQ (now with 100% more persist)
  • Loading branch information
tpoterba authored and danking committed Sep 20, 2018
1 parent 9f00c41 commit 8daec97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hail/python/hail/plot/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ def qq(pvals, collect_all=False, n_divisions=500):
obs = [-log(p, 10) for p in spvals]
else:
if isinstance(source, Table):
ht = source.key_by(pval=pvals)
ht = source.select(pval=pvals).key_by().persist().key_by('pval')
else:
ht = source.select_rows(pval=pvals).rows().key_by('pval')
ht = source.select_rows(pval=pvals).rows().key_by().select('pval').persist().key_by('pval')
n = ht.count()
ht = ht.select(idx=hail.scan.count())
ht = ht.annotate(expected_p=(ht.idx + 1) / n)
Expand Down

0 comments on commit 8daec97

Please sign in to comment.