alpha and beta diversity metrics

Dear all,

I used 80 samples to detect the bacteria on the human skin.
the problem is that after I tried many sample depth there was no reliable curves to choose the proper sample depth. my question is that since there are some commands in qiime2 for alpha and beta diversity metrics which don't include the sample depth, is it ok if I use them? if yes, are they include all the sample reads when we don't choose any sample depth in the commands?
I share the commands I used and the pictures of the outputs.
Thank you.

To create a phylogenetic tree artifact.

qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza

Then create a “alpha diversity” folder.

mkdir alpha-diversity
mkdir alpha-diversity/alpha-rarefaction alpha-diversity/alpha-diversity-index alpha-diversity/alpha-group-significance

Then create the rarefaction curve.

qiime diversity alpha-rarefaction  \
--i-table table.qza  \
--i-phylogeny rooted-tree.qza  \
--p-metrics chao1  \
--p-metrics observed_features  \
--p-metrics shannon  \
--p-metrics faith_pd  \
--p-max-depth 6500  \
--m-metadata-file sample-metadata.txt  \
--o-visualization alpha-diversity/alpha-rarefaction/sample_depth-6500.qzv
qiime dada2 denoise-paired \
--i-demultiplexed-seqs paired-end-demux.qza  \
--p-trim-left-f 30 \
--p-trim-left-r 30 \
--p-trunc-len-f 240 \
--p-trunc-len-r 220 \
--o-representative-sequences rep-seqs-dada2.qza  \
--o-table table-dada2.qza   \
--o-denoising-stats stats-dada2.qza \

To check the alpha diversity value.

qiime diversity alpha \
--i-table table.qza \
--p-metric shannon \
--o-alpha-diversity alpha-diversity/shannon-SampleData[AlphaDiversity]

To get the diversity index.

qiime metadata tabulate \
--m-input-file alpha-diversity/shannon-SampleData[AlphaDiversity].qza \
--o-visualization alpha-diversity/alpha-diversity-index/shannon-index

To perform the statistical analysis.

qiime diversity alpha-group-significance \
--i-alpha-diversity alpha-diversity/shannon-SampleData[AlphaDiversity].qza \
--m-metadata-file sample-metadata.txt \
--o-visualization alpha-diversity/alpha-group-significance/shannon-significance.qzv

Hi @mohsen_ej,

Welcome back to the :qiime2: forum! :nerd_face:

I would be interested to see the interactive sample detail in your feature table summary - this is typically how you'll choose a sampling depth. There isn't a hard and fast rule for how to choose an even sampling depth - this will entirely depend on your study and what you are trying to test. Are you trying to retain more features or more samples? With that being said, more data will generally be better - so you can try to pick a depth that will retain more sequences per sample while excluding as few samples as possible.

Again, that entirely depends on your study and what information you are trying to obtain from QIIME 2 - but within the commands that you've shared, alpha-rarefaction does require a sampling depth, albeit indirectly. The --p-max-depth parameter should be a value that's around 2-3x greater than the sampling depth for your data.

Yes - but the thing to keep in mind here is that most alpha and beta diversity metrics do require a sampling depth. You will get poor results if your samples have different sequencing depths.

My first recommendation here would be to increase your max-depth fairly significantly to see how that affects your alpha diversity - if you are still not seeing any stability in those curves, you may try using presence-absence, since that doesn't require a sampling depth.

I hope this helps!

Cheers :lizard:


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