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

Feature request #14

Open
louisehendrickx opened this issue Sep 14, 2023 · 3 comments
Open

Feature request #14

louisehendrickx opened this issue Sep 14, 2023 · 3 comments

Comments

@louisehendrickx
Copy link

It would be nice to get an overall value for PD in the results considering all data (without spatial component). The reason we want to do this, is to understand phylogenetic diversity loss when we submit multiple different phylogenies.

@shawnlaffan
Copy link
Collaborator

Do you mean PD for all taxa in a sample? If so then that's pretty simple to calculate.

BTW, you might also be interested in some of the per-branch indices for PD clade contribution and potential loss.
https://github.com/shawnlaffan/biodiverse/wiki/Indices#pd-clade-contributions
https://github.com/shawnlaffan/biodiverse/wiki/Indices#pd-clade-loss
https://github.com/shawnlaffan/biodiverse/wiki/Indices#pd-clade-loss-ancestral-component

@louisehendrickx
Copy link
Author

Yes, indeed: PD for all taxa in a sample. How should it be calculated then?

@shawnlaffan
Copy link
Collaborator

There are several ways, but if it is to be done within the phylonext framework then it could be a case of generating a set of dummy spatial units, where each unit has the taxa of interest for each sample.

Another approach is to use text groups. So if you already have a field in your data to denote the sample name then you can set the cellsize to be -1. This is then treated as an exact match. Actually, this is how the phylonext system uses the H3 hexagons so it should be relatively straightforward. @vmikk is the authoritative source for the system, so hopefully can comment further here.

Mapping the data is then a case of using a database join to the spatial units based on the sample name, assuming the samples are spatial. Otherwise the table will likely be all that is needed for further calculations.

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