genomewalker
7/18/2017 - 11:50 AM

beta.r

# Transform to proportions
my_physeq_prop <- transform_sample_counts(my_physeq, function(x) x/sum(x))
# Calculate the average counts of each DVS
tax.mean <- taxa_sums(my_physeq_prop)/nsamples(my_physeq_prop)
# Remove all those that have an average < 1e-5
my_physeq_for_beta <- prune_taxa(tax.mean > 1e-5, my_physeq)