-
Notifications
You must be signed in to change notification settings - Fork 10
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
How to allow unary nodes in variational_gamma #395
Comments
I don't think we want a prior object (there is a prior used internally, on the roots, and I don't want to expose that to the user at all) -- and even if we had it I don't think that's the place for a unary node check. I can easily add a check for unary nodes to the mutation-harvesting routine, as this does a tree traversal in numba anyway. We can have a flag that disables the check. |
... to clarify, I really don't want to complicate the API with custom input classes and unnecessary flexibility. It's in a good place right now -- |
also, I don't think there's a need to support unary nodes until there's a way to map mutations accurately between unary nodes (which is very likely not possible). Otherwise the dating algorithm will return rubbish, and we shouldn't bother making this a choice. While the algorithm itself could be modified to do updates when mutations aren't mapped correctly around unary nodes, I don't think that's going to give much of an increase in accuracy at all (and it's a super low priority). |
Yes, we can probably punt this down the road. I think that dating with unary nodes will probably be useful in very recent times (and for high recombination rates), but we're not in that regime yet anyway. However, I do think that eventually we could make some progress on taking account of a better coalescent-ish prior. It's low priority, however. |
By the way, I changed this today so that |
Yup sounds good! |
It's useful to be able to "date" recombination nodes in sc2ts, which are unary, so a (possibly undocumented) option to bypass the unary node check would be useful. |
We probably want to allow advanced users to date using variational_gamma with tree seqs with unary nodes, but we want to fail or warn the casual user that this could be bad. What should the API for this be? In the previous methods we did it by doing the check when building a default prior, but we don't do this for variational gamma.
One possibility, which could be useful in the longer term, is to allow for a prior object that specifies the improper prior somehow. Then we can allow the variational gamma method to take a
prior
object (but it would only currently allow the improper prior to be specified). Then we could do the same as in the other methods: construction of the prior object could have an "allow_unary" parameter, for expert use.The text was updated successfully, but these errors were encountered: