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

[bugfix] Fix call rate in sample_qc to divide by the total rows. #5773

Merged
merged 2 commits into from Apr 4, 2019

Conversation

tpoterba
Copy link
Contributor

@tpoterba tpoterba commented Apr 4, 2019

Fixes #5561

Also improved the implementation of sample and variant qc.

Fixes hail-is#5561

Also improved the implementation of sample and variant qc.
jigold
jigold previously requested changes Apr 4, 2019
mt = mt.filter_entries(mt.GQ > 5)
mt = hl.variant_qc(hl.sample_qc(mt))

mt.select_cols(mt.sample_qc.call_rate, foo = mt.sample_qc.n_called / n_rows).cols().show()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete? Not asserting anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

**e1.call_stats,
'call_rate': hl.float(e1.n_called) / (e1.n_called + e1.n_not_called + e1.n_filtered),
'n_called': e1.n_called,
'n_not_called': e1.n_not_called,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the order of the fields matter for backwards compatibility?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really any change in schemas could technically break a pipeline, I suppose. I'm comfortable with this, though.

@danking danking merged commit f25d982 into hail-is:master Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants