Tools‎ > ‎QIIME‎ > ‎

Alpha & Beta diversity

Alpha diversity

How many taxa (OTU's) are detected in each sample?

mkdir Alpha
alpha_diversity.py
-i OTU/otu_table_mc2_w_tax_no_pynast_failures.biom -m chao1,observed_otus -o Alpha/alpha_div_chao1.txt




# CSS normalization of OTU abundances (instead of classical rarefaction)
# requires additional R packages
normalize_table.py -i OTU/otu_table_mc2_w_tax_no_pynast_failures.biom -a CSS -o OTU/otu_table_CSSnorm.biom

# get beta diversity
# (-t specifies phylogenetic distances used in unifrac)
beta_diversity.py -i OTU/otu_table_CSSnorm.biom -m bray_curtis,unweighted_unifrac -t OTU/rep_set.tre -o Beta/

Result: distance matries for each distance measure
   Beta/bray_curtis_otu_table_CSSnorm.txt
   Beta/unweighted_unifrac_otu_table_CSSnorm.txt


PCoA plot of Beta diversity


# calculate PC's variances and sample position in PCoA plot
principal_coordinates.py -i Beta/bray_curtis_otu_table_CSSnorm.txt -o Beta/PCoA_data.txt

# Plot PCoA
make_2d_plots.py -i Beta/PCoA_data.txt -m metadata.txt -o Beta/
# results: Beta/beta_div_coords_2D_PCoA_plots.html (to open in web-browser)