# Frequently Asked Questions

How do I compute inclusive and exclusive phylodiversity using PAUP*?

The inclusive phylodiversity is obtained by pruning all taxa not in the group of interest from a tree in memory, and then asking for the tree length. First, read in a tree from the file tree.tre and store the branch lengths:

`gettrees file=tree.tre storebrlens unrooted;`

Next, prune taxa 1-6 from all trees in memory (here, taxa 7-10 represent the group of interest):

`delete 1-6 / prune;`

Set the criterion to likelihood, otherwise PAUP* will report parsimony tree lengths:

`set criterion = likelihood;`

Tell PAUP* to use the stored "user" branch lengths, otherwise PAUP* will optimize the branch lengths on the pruned tree:

`lset userbrlens;`

Tell PAUP* to compute the tree length:

`describe 1 / plot=none brlen=sumonly;`

The exclusive phylodiversity is a little more involved, but can also be computed using PAUP*. Suppose the group of interest comprises taxa 7, 8, 9 and 10. If there are 10 taxa total, the complementary taxon set comprises taxa 1-6. The exclusive phylodiversity of the group of interest (7-10) can be obtained by subtracting the inclusive phylodiversity of the complementary taxon set (1-6) from the total tree length (i.e. the tree length with all taxa included). Here are the commands for doing this using PAUP*. The example assumes that the tree with branch lengths is in the file tree.tre, and the original data is in the file mydata.nex. The first describe command yields the total tree length, while the second describe command yields the inclusive phylodiversity of the taxon set 1-6.

```exe mydata.nex;
set crit=like;
lset userbrlens;
gettrees file=tree.tre storebrlens unrooted;
describe 1 / plot=none brlens=sumonly;
delete 7-10 / prune;
describe 1 / plot=none brlens=sumonly;
```

For a complete example, download mydata.nex, tree.tre, and calcpd.nex, place them all in the same folder on your hard drive, then execute calcpd.nex in PAUP*. The file calcpd.nexhas NEXUS comments explaining each of the commands in the PAUP block.

What aspects of phylodiversity can I compute using SIMMAP?

With SIMMAP 1.0 (beta 2), it is possible to compute a Bayesian version of exclusive phylogenetic diversity as the "dwell time" of state 1 in a morphological character defined such that all taxa in the group of interest have state 1 and all other taxa have state 0. SIMMAP also provides the mean number of transitions from state 0 to state 1, and vice versa. Suppose you have a 10-taxon tree with branch lengths (e.g. tree.tre), and a data file (mybinarycharacter.nex) containing a single binary character in which state 1 defines the group of interest. Start up SIMMAP 1.0, use "File > Open Data..." to load the data file mybinarycharacter.nex, and use "File > Open Trees..." to load the tree file tree.tre. Go to " Analysis > Simulate Histories..." and choose "ALL" under " Character history: select a character or ALL", "10" for both "Number of realizations sampled from prior(s)" and "Number of realizations for each tree, each site". I leave "Number of samples to exclude from start of files (burning samples)" to "". This setup will end up performing a total of 100 stochastic simulations, with each successive set of 10 using a different prior for both the bias parameter and the rate parameter. These prior settings can be changed using the "Models > Set Morphology Priors..." dialog box. The most important of these is the "Prior on Rate Parameter", which determines how the tree length is scaled. The default settings (alpha = 3, beta = 2) yield a gamma prior with mean 1.5, which which means that the trees simulated will on average have length 1.5, regardless of the tree length specified in the original tree file!. After pressing the "Run" button in the "Simulate Histories" dialog box, open the "Morphology Stats" dialog box using "Statistics > Morphology > Morphology Statistics...". Expand the element labeled "Site 1" by clicking on the triangle, then click on the triangles beside "Tranformations" and "Dwell times". The dwell time corresponding to state 1 can be interpreted as a Bayesian exclusive phylodiversity: it is the sum of all segments of the tree in which lineages are in state 1, averaged over all sampled histories. This measure of exclusive phylodiversity is not identical to the one we presented in Figure 1 of the paper, but is in some ways more satisfactory.

Is the software you used for computing phylodiversity available?

The short answer is no, but one can compute the phylodiversity measures we discussed using existing software. Instructions are provided here for computing the phylodiversity measures on a specific tree using PAUP*.