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

Handle missing weight attributes in KDE frequency estimation #426

Merged
merged 2 commits into from
Dec 17, 2019

Conversation

huddlej
Copy link
Contributor

@huddlej huddlej commented Dec 16, 2019

Throw an exception if the user has requested weighted KDE frequencies with
weights that do not match any of the tips in the given tree. This commit
explicitly checks for an empty dictionary of weights after filtering for
representation by tips and raise an exception with a meaningful error
message (instead of allowing the code to continue running and throwing a less
meaningful ValueError when no valid weights remain). This commit also adds a
unit test for this behavior.

Closes #425.

Throw an exception if the user has requested weighted KDE frequencies with
weights that do not match any of the tips in the given tree. This commit
explicitly checks for an empty dictionary of weights after filtering for
representation by tips and raise an exception with a meaningful error
message (instead of allowing the code to continue running and throwing a less
meaningful ValueError when no valid weights remain). This commit also adds a
unit test for this behavior.

Closes #425.
@huddlej huddlej requested a review from trvrb December 16, 2019 20:34
… estimation

Fixes another bug with frequency estimation caused by a mismatch in the casing
of attributes attached to the nodes in the tree, weight attributes in the
weights JSON, and what the estimation code originally expected.
@trvrb
Copy link
Member

trvrb commented Dec 17, 2019

This fixes issues with seasonal flu builds (nextstrain/seasonal-flu#43). I'll merge and release v6.1.1 as bug fix.

@trvrb trvrb merged commit 71cd517 into master Dec 17, 2019
@trvrb trvrb deleted the handle-missing-weight-attributes branch December 17, 2019 19:15
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.

KDE frequencies bug
2 participants