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

API extension plans #9

Open
jeromekelleher opened this issue Dec 16, 2024 · 0 comments
Open

API extension plans #9

jeromekelleher opened this issue Dec 16, 2024 · 0 comments

Comments

@jeromekelleher
Copy link
Member

We now have a single method compare which produces one (well, several related) measures of distance between two ARGs. It's not clear to me how this package would evolve over time if we wanted to add other ways to compare them. Suppose we just wanted the standard span-weighted tree-by-tree comparison, like

def tree_by_tree(ts1, ts2, metric="KC"):
    if metric == "KC":
        return ts1.kc_distance(ts2)
   elif metric == "RF":
        # do something else
   else:
        raise ValueError(f"Unknown metric {metric}")

Do you imagine things like this getting folded into the single uber-function compare (a-la msprime.sim_ancestry), or the API growing additional entry points @petrelharp? If the latter, maybe we should chose something a bit more specific than compare as the name?

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

1 participant