# Can someone help in Alpha rarefaction plotting depths?

**URL:** <https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580>\
**Category:** User Support\
**Tags:** alpha-rarefaction\
**Created:** [June 14, 2018, 11:33pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580 "2018-06-14T23:33:15Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aqleem12](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@Aqleem12](https://forum.qiime2.org/u/Aqleem12)\
**Post date:** [June 14, 2018, 11:33pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/1 "2018-06-14T23:33:15Z")

</div>

Dear All,

In the section Alpha rarefaction plotting, I could not understand the min and max depth. Here in the following parameters of moving pictures tutorial the p-max-depth kept at 4000.

Qiime diversity alpha-rarefaction   
--i-table table.qza   
--i-phylogeny rooted-tree.qza   
\*_--p-max-depth 4000 \*_  
--m-metadata-file sample-metadata.tsv   
--o-visualization alpha-rarefaction.qzv

For my sample what value I choose? from where this value comes from? What is the importance of this rarefaction plotting depths results?

Thanks

Yours Sincerely  
Aqleem Abbas

---

<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 15, 2018, 5:19am UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/2 "2018-06-15T05:19:03Z")

</div>

Hello Aqleem,

Take a look at this alpha diversity guide from the Werner Lab.  
[http://www.wernerlab.org/teaching/qiime/overview/e](http://www.wernerlab.org/teaching/qiime/overview/e)

That last graph and paragraph is really helpful.

> It looks like the fasted samples had a higher phylogenetic diversity than the control mice microbiomes.

Yep! This is exactly kind of conclusions you could draw from your samples. Is that helpful?

> [@Aqleem12](#):
>
> For my sample what value I choose? from where this value comes from? What is the importance of this rarefaction plotting depths results?

I usually choose a max depth around the lower depths that all my samples cover. So if my samples have 1,200 reads to 112,100 reads, I would choose a max depth of 1,200. Or maybe I would throw away samples under 5,000 reads, then choose 5,000 as my max depth for rarefaction.

Let me know if this helps.

Keep asking great questions!  
Colin

---

<div class="post-metadata">

**Author:** ![Aqleem12](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@Aqleem12](https://forum.qiime2.org/u/Aqleem12)\
**Post date:** [June 15, 2018, 10:11am UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/3 "2018-06-15T10:11:49Z")

</div>

Dear Sir,

My samples reads(may be counts are called reads) range from 9656 upto 11908. The table. qzv screen shot is attached with this message. So what would be the max depth in my case. Should I look into table.qzv file and in particular sample ID and sequence counts to select max depth.

 ![TABLE%20QZV](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/b/bf286760e9ff9b58aa860591f0566c06524608fd.png).

Thank you for assistance

Yours Sincerely  
Aqleem Abbas

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [June 15, 2018, 1:48pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/4 "2018-06-15T13:48:07Z")

</div>



---

<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 15, 2018, 2:50pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/5 "2018-06-15T14:50:41Z")

</div>

I would use 9656 as your min depth. If some of samples had very few reads, I might drop these first, but all your samples have a reasonable number of reads.

Let me know if this is helpful,  
Colin

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [June 15, 2018, 4:06pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/6 "2018-06-15T16:06:47Z")

</div>



---

<div class="post-metadata">

**Author:** ![Aqleem12](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@Aqleem12](https://forum.qiime2.org/u/Aqleem12)\
**Post date:** [June 18, 2018, 12:01pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/7 "2018-06-18T12:01:41Z")

</div>

Dear Sir,

I could not understand your answer. I have applied for calculating alpha and beta diversity using the depth 9656 as shown in the following parameters.  
Qiime diversity core-metrics-phylogenetic   
--i-phylogeny rooted-tree.qza   
--i-table table.qza   
--p-sampling-depth 9656   
--m-metadata-file sample-metadata.tsv   
--output-dir core-metrics-resultsAlpha rarefaction plotting

I am talking about the Alpha rarefaction plotting. Here what should be the -p-max-depth valve??? In moving tutorial the depth is kept at 4000.  
qiime diversity alpha-rarefaction   
--i-table table.qza   
--i-phylogeny rooted-tree.qza   
--p-max-depth 4000   
--m-metadata-file sample-metadata.tsv   
--o-visualization alpha-rarefaction.qzv

Why this depth? Why we do this technique? What should be the depth in my case?

Thanks in advance  
Yours Sincerely  
Aqleem Abbas

---

<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 19, 2018, 2:30pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/8 "2018-06-19T14:30:29Z")

</div>

Good morning Aqleem,

The command `qiime diversity alpha-rarefaction` is going to make a graph like this:  
 ![](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/3/364bbdada29a054d52c08f078609ab07a88d124b.png)

In this examples, we can see that the Fasted samples (red) have higher alpha diversity values than then Control (clue) samples.

Notice how the x-axis is 'N seqs/sample', and goes from zero to 120, but the lines only go up to 100. So to make this graph you could pass `--p-max-depth 100`.

> [@Aqleem12](#):
>
> Why we do this technique?

This tells us what group of samples is more diverse (higher alpha diversity).

> [@Aqleem12](#):
>
> Why this depth?

I usually pick the depth that is the smallest value of the samples of my samples.

> [@Aqleem12](#):
>
> What should be the depth in my case?

You can choose! I would suggest using `--p-max-depth 9656` because this is the value of your smallest sample.

Or, you could try different depths and let me know what you find! :qiime2:

Colin

---

<div class="post-metadata">

**Author:** ![Tian](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Tian](https://forum.qiime2.org/u/Tian)\
**Post date:** [June 18, 2018, 12:06pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/9 "2018-06-18T12:06:48Z")

</div>

Dear Sir,  
I am using qiime2 software for my study. I have problem in alpha rarefaction plottings. Here the sequence count as well as frequency per sample is attached. I also attached rarefaction.qzv file.

 ![frequency%20per%20samples](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/0/072ef300bce9bcefe957c392d6dcf376fd5936cc.png) ![alpha%20rarefaction%20plots](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/6/6a65186fec2aedf32a401cfc15028391dfbc150c.png) ![sample%20counts](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/3/3f560548d1cc80e08fc7d1144431e742995cad60.png)

I use the following parameters looking into median frequency of table. qzv table.  
qiime diversity alpha-rarefaction   
--i-table table.qza   
--i-phylogeny rooted-tree.qza   
--p-max-depth 9124   
--m-metadata-file sample-metadata.tsv   
--o-visualization alpha-rarefaction.qzv

However I could not understand the alpha rarefaction plots. Could anyone help, If I am going in a right way or I am doing mistake. Please look at the picture and reply me.

Thanks  
Tian Lan

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [June 18, 2018, 2:50pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/10 "2018-06-18T14:50:25Z")

</div>

Hi @Tian,  
See [this tutorial](https://docs.qiime2.org/2018.4/tutorials/moving-pictures/#alpha-rarefaction-plotting) for a description of the alpha rarefaction plots and how to use that information for downstream steps.

> [@Can anyone solve Alpha rarefaction plotting issue in my study?](https://forum.qiime2.org/t/can-anyone-solve-alpha-rarefaction-plotting-issue-in-my-study/4604/1):
>
> I have problem in alpha rarefaction plottings

What is the problem? Looks like you have the expected outputs.

I hope that helps!

---

<div class="post-metadata">

**Author:** ![Aqleem12](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@Aqleem12](https://forum.qiime2.org/u/Aqleem12)\
**Post date:** [June 19, 2018, 11:47pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/16 "2018-06-19T23:47:14Z")

</div>

Dear Sir,

Thank you for your suggestions. Please find here:

 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/3/3f5ade80f29b0f1fbf078c02ab9367c4eac5a10d.png)

Now what interpretation, I should draw from these two figures.

Thanks in advance  
Aqleem Abbas

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [June 19, 2018, 11:51pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/17 "2018-06-19T23:51:25Z")

</div>

> [@Aqleem12](#):
>
> Now what interpretation, I should draw from these two figures.

Your minimum frequency, around 6000 sequences per sample, is a sufficient depth for rarefying with `qiime diversity core-metrics`. The majority of observed phylogenetic diversity is observed by that depth.

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [June 21, 2018, 8:10pm UTC](https://forum.qiime2.org/t/can-someone-help-in-alpha-rarefaction-plotting-depths/4580/18 "2018-06-21T20:10:27Z")

</div>


