Confused about --p-sampling depth and and --p-max-depth

(Yogesh Gupta) #1

Hi,

we use --p-max-depth in alpha rarefaction curve and --p-sampling-depth at alpha diversity analysis step. Are these both same or there is a difference?
Thanks

(Justine) #2

Hi @Yogesh_Gupta,

The p--min-depth parameter on the alpha rarefaction curve is the smallest depth where you want to rarify your data. This should be lower than whatever your smallest sampling depth is, probably. The rarefaction curve varies your sampling depth to calculate diversity, and can help you pick a good analysis depth.

One you’ve settled on that depth, you pass that into alpha diversity with the --p-sampling-depth parameter.

Best,
Justine

2 Likes
(Yogesh Gupta) #3

Hi @jwdebelius,

Thanks, I am using qiime2,2018.11 and following the moving tutorial in which alpha diversity step comes first and then alpha rarefaction.

are you suggesting both value should be same, that we decide based on qiime feature-table summarize output to choose the maximum value while retaining all samples.

(Matthew Ryan Dillon) #4

That is just how that tutorial presents it. You can also run alpha rare before core metrics phylo, and use the results from alpha rare to make a decision about what even sampling depth to use.

No.

Alpha rarefaction is a diagnostic tool for understanding how various even sampling depths impact alpha diversity metrics — a characteristic curve is usually seen where alpha diversity measures get “larger” as you increase the even sampling depth.

(Yogesh Gupta) #5

Thanks. I understand how to decide value for --p-sampling-depth in core-metrics-phylogenetic analysis, it is based on feature-table summarize.

But still confused on how to decide value for --p-max-depth alpha-rarefaction?

It will be great help if you can help me to understand it.

Thanks again!

(Matthew Ryan Dillon) #6

The min and max depths are effectively the range of the x axis on the alpha rare plot. You cannot rarefy lower than 0, so that handles the min depth. For the max, you can only rarefy to as many features are present in your most populated sample. For example, from the Moving Pictures tutorial:

10,095 is the largest possible rarefaction depth for this feature table.

(Yogesh Gupta) #7

Thanks a lot. I understand it.

1 Like
(Matthew Ryan Dillon) split this topic #8

An off-topic reply has been merged into an existing topic: Phylogenetic tree

Please keep replies on-topic in the future.

(Yogesh Gupta) #9

sorry for posting on other question, I removed from question from that topic:

Hi @thermokarst,

here is details of samping depth for my data:
here is the depth summary of sample:
> summary(depths)

Min. 1st Qu. Median Mean 3rd Qu. Max.
18396 77714 103546 112311 135904 308487

so In core-metric-phylogenetic it can be 18396
qiime diversity core-metrics-phylogenetic
–i-phylogeny rooted-tree.qza
–i-table table.qza
–p-sampling-depth 18396
–m-metadata-file sample-metadata.tsv
–output-dir core-metrics-results

but in case of alpha rarefaction plot, it should be: 308487
qiime diversity alpha-rarefaction
–i-table table.qza
–i-phylogeny rooted-tree.qza
–p-max-depth 308487
–m-metadata-file sample-metadata.tsv
–o-visualization alpha-rarefaction.qzv

is it ok?

Thanks
Yogesh

(Matthew Ryan Dillon) #10

Your alpha rarefaction is fine - it doesn’t matter what value you use there — the only impact is the extent of the x-axis in the resulting plot.

For the core-metrics-phylo command, I can’t really answer that — even sampling depth is a bit subjective, and it really depends on your goals. What I can say is that the value you selected appears to be the same as your lowest-sequenced sample, which means that you won’t “lose” any samples when you rarefy. Similarly, that rarefaction depth is nice and high — we usually want to see this number as big as possible, that way we “maximize” our data — looks like you have done that.

If you are really curious, I would recommend computing “core metrics” at a few different even sampling depths and comparing the results. Please note, this is also how alpha rarefaction works.

(system) closed #11

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