Answers.Body: <p>Can you give a little more information about what tools and data sets you are using? How did you generate the OTU table etc?</p>
  <p>If the underlying data is nucleotide data and this is a phylogentic tree. It may well be a population genetic tree based for example in allele frequencies.</p>
  <p>For classical phylogenetics then FastTree is a very simple tool to generate a decent phylogeny. If you have the sequences of each OTU, you can align them in MegaX with muscle, or simply using muscle from the command line if you prefer. You can then generate the tree with this command (presuming you are on windows):</p>
  <pre><code>FastTree.exe -gtr -nt &lt; aligned_sequences.fasta &gt; otus_tree.tre 
  </code></pre>
  <p>I hope that helps!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-11T11:39:10.960Z
Answers.LastActivityDate: 2022-02-21T01:45:53.547Z
Answers.LastEditDate: 2022-02-21T01:45:53.547Z
Answers.UserDisplayName: adamsorbie
Body: <p>I am trying to calculate beta diversity* using the UniFrac distance on my data, each sample having OTUs values.</p>
  <p>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.</p>
  <p>For example, I saw in this link: <a href="http://readiab.org/book/0.1.1/3/1#4.1.2" rel="nofollow noreferrer">http://readiab.org/book/0.1.1/3/1#4.1.2</a>,  that they build this tree:</p>
  <p><a href="https://i.sstatic.net/WcpvO.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WcpvO.jpg" alt="enter image description here" /></a></p>
  <p>Could you please explain to me how to build the tree?</p>
  <hr />
  <ul>
  <li>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.</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-21T02:24:59.760Z
Comments.Text: 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
Comments.UserDisplayName: M__
Tags: <phylogeny><phylogenetics>
Title: Build tree to calculate beta diversity
ThreadText: # Build tree to calculate beta diversity
  
  (Asked by: username_0 on 2021-03-05)
  
  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:
  
  [![enter image description here](https://i.sstatic.net/WcpvO.jpg)](https://i.sstatic.net/WcpvO.jpg)
  
  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.
  
  **Tags:** phylogeny, phylogenetics
  
  > **Comments:**
  > **username_1**: 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  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-03-11. Score: 0
  
  Can you give a little more information about what tools and data sets you are using? How did you generate the OTU table etc?
  
  If the underlying data is nucleotide data and this is a phylogentic tree. It may well be a population genetic tree based for example in allele frequencies.
  
  For classical phylogenetics then FastTree is a very simple tool to generate a decent phylogeny. If you have the sequences of each OTU, you can align them in MegaX with muscle, or simply using muscle from the command line if you prefer. You can then generate the tree with this command (presuming you are on windows):
  
  ```
  FastTree.exe -gtr -nt < aligned_sequences.fasta > otus_tree.tre 
  
  ```
  
  I hope that helps!
  
  
  ---
  
  