# Outliers in beta diversity analyses

**URL:** https://forum.qiime2.org/t/outliers-in-beta-diversity-analyses/26813
**Category:** User Support
**Tags:** diversity, core-metrics, beta
**Created:** [June 17, 2023, 5:21am UTC](https://forum.qiime2.org/t/outliers-in-beta-diversity-analyses/26813 "2023-06-17T05:21:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Edoardo\_Scali](https://forum.qiime2.org/user_avatar/forum.qiime2.org/edoardo_scali/32/10942_2.png) [@Edoardo\_Scali](https://forum.qiime2.org/u/Edoardo_Scali)
#### Post date: [June 17, 2023, 5:21am UTC](https://forum.qiime2.org/t/outliers-in-beta-diversity-analyses/26813/1 "2023-06-17T05:21:40Z")

</div>

Hi everyone, I have a question about the result that I've obtained running diversity analyses.

I runned analyses with the "qiime diversity beta-group-significance" plugin for all the variables I have in my sample metadata file.

I am not quite sure about the results I've obtained: from the beta-group-significance, eaven if I've obtained p-vales \< 0.05, I have boxplots with a lot of outlyers. Basically boxplots apears as flat lines and outliers form a vertical line.

I was wondering if it is normal to obtain such a result.

Also, about my experimental design: I am analysing ITS1 file coming from three species (e.g. species 1, species 2, species3).  
Number of samples coming from the different species are quite different:  
-Species 1: 219  
-Species 2: 192  
-Species 3: 100  
511 samples in total.

Do you think that the results I've obtained is because I have a non-equal number of samples? Should I include 100 samples per species in the analyses, in order to have same number of samples per each species?

Thank you so much for your help!

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [June 18, 2023, 6:58pm UTC](https://forum.qiime2.org/t/outliers-in-beta-diversity-analyses/26813/2 "2023-06-18T18:58:56Z")

</div>

Hello Edoardo,

Welcome to the forums! :qiime2:

> [@Edoardo\_Scali](#):
>
> I am not quite sure about the results I've obtained: from the beta-group-significance, eaven if I've obtained p-vales \< 0.05, I have boxplots with a lot of outlyers. Basically boxplots apears as flat lines and outliers form a vertical line.

Would you be willing to post the result file so we could take a look? (I understand if not, as I have also worked the sensitive / private data.)

> [@Edoardo\_Scali](#):
>
> Also, about my experimental design: I am analysing ITS1 file coming from three species (e.g. species 1, species 2, species3).  
> Number of samples coming from the different species are quite different:  
> -Species 1: 219  
> -Species 2: 192  
> -Species 3: 100  
> 511 samples in total.

This is very helpful! I have a question about the terminology.

When you say 'species', is this a single fungal isolate/axenic culture?  
When you say 511 'samples', did you perform PCR 551 times and sequence 551 samples with different barcodes, or do you have 551 genomic sequences spread across three taxa?

---

<div class="post-metadata">

### Author: ![Edoardo\_Scali](https://forum.qiime2.org/user_avatar/forum.qiime2.org/edoardo_scali/32/10942_2.png) [@Edoardo\_Scali](https://forum.qiime2.org/u/Edoardo_Scali)
#### Post date: [June 22, 2023, 3:50am UTC](https://forum.qiime2.org/t/outliers-in-beta-diversity-analyses/26813/3 "2023-06-22T03:50:37Z")

</div>

Hi Colin,  
thank you so much for your reply.

> [@colinbrislawn](#):
>
> Would you be willing to post the result file so we could take a look? (I understand if not, as I have also worked the sensitive / private data.)

Yes, I attach a screenshot about one of the result I've obtained with beta\_group\_significance:

| | PERMANOVA results |
| --- | --- |
| method name | PERMANOVA |
| test statistic name | pseudo-F |
| sample size | 235 |
| number of groups | 3 |
| test statistic | 1.070818 |
| p-value | 0.001 |
| number of permutations | 999 |

 ![Screenshot 2023-06-21 at 5.37.39 PM](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/0/8/080df394a9f3452b2e9469abf9fb55af5818c701.png)

Each boxplot correspond to Plant A, Plant B, Plant C.

> [@colinbrislawn](#):
>
> When you say 'species', is this a single fungal isolate/axenic culture?

Thank you for the question, and I apologize for not being clear. The term "species" I used earlier refers to the samples from which DNA was extracted. These samples were collected from three different plant species. So, to clarify, if I replace the term "species" with the term "plant," my sampling setup is as follows:

- Plant A: 219
- Plant B: 192
- Plant C: 100

> [@colinbrislawn](#):
>
> When you say 511 'samples', did you perform PCR 551 times and sequence 551 samples with different barcodes, or do you have 551 genomic sequences spread across three taxa?

In my analyses, I included a total of 511 samples, which are tissues obtained from different plants. As a result, I have imported 1022 tar.gz files, consisting of 511 forward files and 511 reverse files.

Thank you so much for your help.  
Best,  
E.

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [June 22, 2023, 1:44pm UTC](https://forum.qiime2.org/t/outliers-in-beta-diversity-analyses/26813/4 "2023-06-22T13:44:53Z")

</div>

Thank you for telling me more.

> [@Edoardo\_Scali](#):
>
> In my analyses, I included a total of 511 samples, which are tissues obtained from different plants. As a result, I have imported 1022 tar.gz files, consisting of 511 forward files and 511 reverse files.

This is very good to hear! Sometimes people only have a few samples and don't have enough statistical power. I'm glad you have 100s of samples.

> [@Edoardo\_Scali](#):
>
> Do you think that the results I've obtained is because I have a non-equal number of samples? Should I include 100 samples per species in the analyses, in order to have same number of samples per each species?

Keep all the data you have! Haveing more samples is better, even if groups are uneven.

* * *

The alpha diversity tests measure _each sample_ independently. This means your Plant C: 100 samples would yield 100 alpha diversity values.

The beta diversity tests measure _pairwise_ comparisons between samples, so comparing each Plant C sample against each other Plant C sample yields 100\*99 = 9900 beta diversity values.

This extremely large number explains boxplots:

- most beta diversity values are near the mean, so the IQR is small, and the boxplot looks 'flat'
- outliers are calculated somehow (maybe 1.5\*IQR), and even though it's a small fraction of total beta diversity values, that's still dozens of points to show on the graph

---

<div class="post-metadata">

### Author: ![Edoardo\_Scali](https://forum.qiime2.org/user_avatar/forum.qiime2.org/edoardo_scali/32/10942_2.png) [@Edoardo\_Scali](https://forum.qiime2.org/u/Edoardo_Scali)
#### Post date: [June 22, 2023, 6:38pm UTC](https://forum.qiime2.org/t/outliers-in-beta-diversity-analyses/26813/5 "2023-06-22T18:38:16Z")

</div>

Dear Colin,

Thank you so much for your response Colin and for your feedback about the analyses I am conducting. It was really helpful!

Best,  
E.

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [July 24, 2023, 12:38am UTC](https://forum.qiime2.org/t/outliers-in-beta-diversity-analyses/26813/6 "2023-07-24T00:38:55Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
