# Build tree to calculate beta diversity

I am trying to calculate beta diversity* using the UniFrac distance on my data, each sample having OTUs values.

To calculate it, I saw it required building a tree with percentages that represented the OTUs. However, I was unable to figure what percentage fit each OTU to build the tree from the instructions I found on the internet.

For example, I saw in this link: http://readiab.org/book/0.1.1/3/1#4.1.2, that they build this tree:

Could you please explain to me how to build the tree?

• This is the diversity between local sites and enables the total in a landscape to be calculated (gamma). The tree would therefore appear (presumably) to represent the diversity between sites.
• The key thing we need to understand is the nature of the input. If this is Whitikar's beta this likely a species count. It could be something super clever like a 16S metagenomics between sites. I wouldn't have trouble making a tree (its UPGMA) but I'd need to know what the data represented. A, B, C are likely different foci
– M__
Feb 21, 2022 at 2:24

FastTree.exe -gtr -nt < aligned_sequences.fasta > otus_tree.tre