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

One Sided RF distances #80

Merged
merged 7 commits into from
Dec 13, 2023
Merged

One Sided RF distances #80

merged 7 commits into from
Dec 13, 2023

Conversation

willdumm
Copy link
Collaborator

@willdumm willdumm commented Dec 11, 2023

This PR includes @clarisw's contributions of computation of one-sided RF distances in the history DAG. I rearranged the implementation so that all of the new code is contained in utils.make_rfdistance_countfuncs. Left and right one-sided RF distances are available through the new keyword argument one_sided, which takes either left, right, or None. The docstring explains what these options mean, hopefully in enough detail to figure out which one is needed.

I also extended these additions to the sum RF distance countfuncs function in utils, as well as the sum and average RF distance methods on the whole DAG.

In addition, all dag methods for RF distance and now accept and forward these new keyword arguments to the appropriate countfunc function. All methods are tested as before, first using a ground-truth method (counting clades or ete's RF distance implementation) and building up transitively to the whole-dag sums, but now each step includes checks for left, right, and standard rooted-and-unrooted-RF distances

@willdumm willdumm requested a review from marybarker December 13, 2023 19:14
@willdumm willdumm mentioned this pull request Dec 13, 2023
@marybarker marybarker merged commit 262eae4 into main Dec 13, 2023
2 checks passed
@willdumm
Copy link
Collaborator Author

For reference, the computations that are used to implement this are here (starting page 5 I think)
https://github.com/matsengrp/hdag-benchmark-tex/blob/2ed26a8ae7130af867738fdda55bb3ee5d811357/node-support.pdf

The constants a and b in the writeup correspond to the constants s and t in the code.

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.

2 participants