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

Generate the tmrca of every node #23

Open
Dhihram opened this issue Aug 5, 2024 · 5 comments
Open

Generate the tmrca of every node #23

Dhihram opened this issue Aug 5, 2024 · 5 comments

Comments

@Dhihram
Copy link

Dhihram commented Aug 5, 2024

I have utilized parboot to find tmrca and HPD 05% of my tree. Can parboot also extract the interval of every node in my tree?

@emvolz
Copy link
Owner

emvolz commented Aug 6, 2024

Yes, it is possible. The output of parboot should contain a list called $trees.
Each element of $trees is itself a treedater fit. If you are interested in a particular node (e.g. 'x' ), iterate over these trees, find the distance from the root (ape::node.depth.edgelength) and add to the estimated tmrca of the total tree.
Example:

sapply( pb$trees, function(tr) tr$timeOfMRCA + node.depth.edgelength(tr)[x] )  |> quantile(prob=c(.025,.975))

@Dhihram
Copy link
Author

Dhihram commented Aug 6, 2024

Thank you very much.

@Dhihram
Copy link
Author

Dhihram commented Aug 6, 2024

Btw, Is it right to say the quantile as HPD? Or is it CI?

@emvolz
Copy link
Owner

emvolz commented Aug 6, 2024

I would call it a CI

@Dhihram
Copy link
Author

Dhihram commented Aug 6, 2024

Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants