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

Including multiPhylo objects #44

Merged
merged 10 commits into from
Sep 26, 2024
Merged

Including multiPhylo objects #44

merged 10 commits into from
Sep 26, 2024

Conversation

ScottClaessens
Copy link
Owner

These changes allow the user to enter a multiPhylo object instead of a phylo object. The Stan model iterates over all the trees and combines the results in the posterior. I have made the requisite changes to post-processing functions and have implemented tests.

@ScottClaessens ScottClaessens self-assigned this Sep 26, 2024
@ScottClaessens ScottClaessens linked an issue Sep 26, 2024 that may be closed by this pull request
Copy link
Collaborator

@erik-ringen erik-ringen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work on this! One of the reasons I was thinking this would be a pain is I thought it was possible that different trees would have a vary number of segments. But after seeing a constant N_seg in your code and thinking it through I realized that this wouldn't make sense. For bifurcating trees of the same species there must be a constant number of segments...

A minor note: I realized we don't actually need 1/N_tree in the likelihood, because uniform mixing ratios drop out when using log_sum_exp(). https://mc-stan.org/docs/stan-users-guide/finite-mixtures.html#dropping-uniform-mixture-ratios

@ScottClaessens ScottClaessens merged commit 9acbed3 into main Sep 26, 2024
5 checks passed
@ScottClaessens ScottClaessens deleted the multi-phylo branch September 26, 2024 17:42
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.

Allow multiPhylo object in tree argument?
2 participants