Alpha Diversity¶
Alpha diversity describes the diversity within individual samples. We calculate multiple complementary metrics and test whether they differ significantly between sample groups.
Core Metrics (All Samples)¶
The core-metrics-phylogenetic command calculates a standard suite of alpha and beta diversity metrics in a single step, rarefying the table to the specified depth:
alpha_rarefaction_curves.qzv from the Rarefaction step. The sampling depth should be the point where diversity curves plateau, deep enough to capture diversity, shallow enough to retain as many samples as possible. The workshop confirmed this depth as 1,500 reads.
--p-sampling-depth, Rarefaction depth (integer). All samples are subsampled to exactly this many reads. Samples with fewer reads than this value are excluded from all downstream diversity analyses.
This creates the core_metrics/ directory containing alpha diversity vectors, distance matrices, and PCoA results.
Observed Features¶
Number of unique ASVs per sample:
qiime diversity alpha-group-significance \
--i-alpha-diversity core_metrics/observed_features_vector.qza \
--m-metadata-file metadata_q2_workshop.txt \
--o-visualization core_metrics/observed_features_statistics.qzv
Shannon Diversity¶
Information-theoretic diversity accounting for both richness and evenness:
qiime diversity alpha-group-significance \
--i-alpha-diversity core_metrics/shannon_vector.qza \
--m-metadata-file metadata_q2_workshop.txt \
--o-visualization core_metrics/shannon_statistics.qzv
Pielou's Evenness¶
How evenly reads are distributed across ASVs (0 = completely uneven, 1 = perfectly even):
qiime diversity alpha-group-significance \
--i-alpha-diversity core_metrics/evenness_vector.qza \
--m-metadata-file metadata_q2_workshop.txt \
--o-visualization core_metrics/evenness_statistics.qzv
Faith's Phylogenetic Diversity¶
Sum of branch lengths in the phylogenetic tree spanned by a sample's ASVs:
qiime diversity alpha-group-significance \
--i-alpha-diversity core_metrics/faith_pd_vector.qza \
--m-metadata-file metadata_q2_workshop.txt \
--o-visualization core_metrics/faith_pd_statistics.qzv
Soil-Only Analysis¶
Filter to soil samples and re-run core metrics:
qiime feature-table filter-samples \
--i-table table_nomitochloro.qza \
--m-metadata-file metadata_q2_workshop.txt \
--p-where "[sample_type]='soil'" \
--o-filtered-table table_nomitochloro_soil.qza
qiime diversity core-metrics-phylogenetic \
--i-table table_nomitochloro_soil.qza \
--i-phylogeny tree_gg2.qza \
--m-metadata-file metadata_q2_workshop.txt \
--p-sampling-depth 1500 \
--output-dir core_metrics_soil
Re-run observed features visualization for soil only:
qiime diversity alpha-group-significance \
--i-alpha-diversity core_metrics_soil/observed_features_vector.qza \
--m-metadata-file metadata_q2_workshop.txt \
--o-visualization core_metrics_soil/observed_features_statistics.qzv
Outputs¶
| File | Type | Description |
|---|---|---|
core_metrics/observed_features_vector.qza |
Artifact | Observed features per sample |
core_metrics/shannon_vector.qza |
Artifact | Shannon entropy per sample |
core_metrics/evenness_vector.qza |
Artifact | Pielou's evenness per sample |
core_metrics/faith_pd_vector.qza |
Artifact | Faith's PD per sample |
core_metrics/observed_features_statistics.qzv |
Visualization | Group significance for observed features |
core_metrics/shannon_statistics.qzv |
Visualization | Group significance for Shannon |
core_metrics/evenness_statistics.qzv |
Visualization | Group significance for evenness |
core_metrics/faith_pd_statistics.qzv |
Visualization | Group significance for Faith's PD |
table_nomitochloro_soil.qza |
Artifact | Feature table filtered to soil samples |
core_metrics_soil/ |
Directory | Core metrics for soil samples only |
Next: Beta Diversity