Hi QIIME2 Team,
I've encountered some discrepancies when calculating the Shannon index using two different methods: QIIME2 and the diversity function from the R package vegan. I followed the "Moving Pictures" tutorial to compute the Shannon index in QIIME2 with the following command:
qiime diversity alpha-group-significance \
--i-alpha-diversity shannon_vector.qza \
--m-metadata-file metadata.txt \
--o-visualization shannon-group-significance.qzv
This was done after applying the core-metrics-phylogenetic
method. However, when I attempted to calculate the Shannon index using the vegan package in R, I found that the results were different, and the significance between groups was inconsistent.
I understand that the two methods might use different bases for their calculations, such as base 2 for QIIME2 and base e for vegan. Even after converting the results to a common base, the discrepancy remains unclear.
Additionally, I've noticed that the values for corresponding samples are significantly different. For instance, QIIME2 yielded values of 7.02, 7.68, and 6.96, while vegan provided 3.60, 5.07, and 4.77.
I also considered the downsampling performed in the core-metrics-phylogenetic
method and tried the following command:
qiime diversity alpha \
--i-table table.qza \
--p-metric shannon \
--o-alpha-diversity shannon_vector.qza
Unfortunately, this did not resolve the issue.
I'm curious to know what might be causing these differences and how I can reconcile the results.
Best,
Bella