Alpha & Beta diversity

QIIME 1

update 2018: consider using the new version → QIIME 2

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,shannon,observed_otus -o Alpha/alpha_diversity.csv

Difference in microbial composition between samples

# Normalize data (CSS normalization, 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 (Bray-Curtis sample to sample distance, and UniFrac distance)

# -t specifies phylogenetic distances used in UniFrac

# unweighted UniFrac does not take abundances into account

beta_diversity.py -i OTU/otu_table_CSSnorm.biom -m bray_curtis,unweighted_unifrac -t OTU/rep_set.tre -o Beta_PCoA/

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_PCoA/bray_curtis_otu_table_CSSnorm.txt -o Beta_PCoA/PCoA_data.txt

# Plot PCoA

make_2d_plots.py -i Beta_PCoA/PCoA_data.txt -m metadata.csv -o Beta_PCoA/

# results: Beta/beta_div_coords_2D_PCoA_plots.html (to open in web-browser)