Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 argumentone_sided
, which takes eitherleft
,right
, orNone
. 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