Skip to content

UPGMA trees generated by DecentTree might not be ultrametric #6

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

Open
apcamargo opened this issue Nov 2, 2023 · 1 comment
Open

Comments

@apcamargo
Copy link

I noticed that DecentTree generates non-ultrametric trees when using the UPGMA algorithm. For example:

import numpy as np
import pydecenttree

taxa = ["a", "b", "c", "d"]
d = np.array([
    [0, 3, 4, 3],
    [3, 0, 4, 5],
    [4, 4, 0, 2],
    [3, 5, 2, 0]
])

print(pydecenttree.constructTree("UPGMA", taxa, d))

Generates this tree:

(a:1.25,b:1.5,(c:1,d:1):1);

I get the same results with the CLI interface.

I haven't conducted extensive testing to check if this happens with every single distance matrix.

@bqminh
Copy link
Member

bqminh commented Nov 3, 2023

I've now disable UPGMA with commit 6009d03 until this problem is fixed

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

No branches or pull requests

2 participants