From b831c9c8dee01b412c79a4edef67f08ba525cf1d Mon Sep 17 00:00:00 2001 From: Sarah Lutteropp Date: Sat, 4 Jul 2020 13:45:04 +0200 Subject: [PATCH] fixed species roots atrandomly resolvd multifurcations, but only fixed for --ml so far --- src/dp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dp.c b/src/dp.c index b59c95a..8c44b96 100644 --- a/src/dp.c +++ b/src/dp.c @@ -79,6 +79,10 @@ static void dp_recurse(rtree_t * node, long method) /* if at least one of the two entries is not valid/filled, skip */ if (!v_vec[j].filled || !w_vec[k].filled) continue; + /* Fix species roots at randomlyresolved multifurcations */ + if (node->left->length == 0 && node->left->left && v_vec[j].species_count == 1) continue; + if (node->right->length == 0 && node->right->left && w_vec[k].species_count == 1) continue; + int i = j + k + u_edge_count; /* set the number of species */