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

Indices - add phylogenetic abundance #559

Closed
shawnlaffan opened this issue Jul 6, 2015 · 1 comment
Closed

Indices - add phylogenetic abundance #559

shawnlaffan opened this issue Jul 6, 2015 · 1 comment
Assignees
Milestone

Comments

@shawnlaffan
Copy link
Owner

It would be useful to calculate PD weighted by the abundance of the terminals, where a branch's abundance is the sum of the abundances of its terminals.

PDA = \sum_{c \in C}(abundance \times l_c)

@shawnlaffan shawnlaffan self-assigned this Jul 6, 2015
@shawnlaffan shawnlaffan added this to the Release_1.01 milestone Jul 6, 2015
shawnlaffan added a commit that referenced this issue Jul 7, 2015
The abundance of each branch is the sum of its named descendant abundance, multiplied by the branch length.

This is on the basis that PD is feature diversity thus if a branch is 10 units long then it represents 10 features.  If that branch has 5 named descendants, each with unit abundance (=1) then there are 10 * 5 features from that branch in the sample.

Updates issue #559

Signed-off-by: Shawn Laffan <shawnlaffan@gmail.com>
shawnlaffan added a commit that referenced this issue Jul 7, 2015
This avoids the need to repeatedly traverse the path to the root node and get the lengths along the way.  The paths are cached so the overall code speed is improved.

Updates issue #559.

Signed-off-by: Shawn Laffan <shawnlaffan@gmail.com>
@shawnlaffan shawnlaffan changed the title Indices - add abundance weighted PD Indices - add phylogenetic abundance Jul 7, 2015
shawnlaffan added a commit that referenced this issue Jul 8, 2015
Updates issue #559

Signed-off-by: Shawn Laffan <shawnlaffan@gmail.com>
@shawnlaffan
Copy link
Owner Author

Mark as fixed.

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

1 participant