vmikk / PhyloNext

A pipeline for phylogenetic diversity analysis of GBIF-mediated data

Home Page:https://phylonext.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request

louisehendrickx opened this issue · comments

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.

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

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

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.