Description Usage Arguments Details Value Note Examples
A wrapper function to calculate Sobs, Choa1, Goods, Shannon's diversity and evenness, and Simpson's diversity and evenness alpha diversities for your micro_set. Estimates are calculated based on rarefied bootstrapped samples
1 |
micro_set |
A tidy_micro data set |
table |
OTU table of interest |
iter |
The number of bootstrap resamples used for estimation |
min_depth |
Filter out libraries with sequencing depth (Total) below min_depth |
min_goods |
Filter out libraries Good's coverage below min_goods |
If you have multiple otu tables, you can specify the table you'd like to use to calculate your alpha diversities using the table
option. We highly recommend using the lowest taxonomic rank available to calculate your alpha diversity. If you would like to calculate alpha diversities for each otu table in your micro_set, you can leave the table
option as NULL
and the function will calculate the alpha diversity for each table. The function will append the estimated alpha diversities to the tidy_micro supplied. The alpha diversity columns will be just before your clinical data. Since alpha diversity is estimated for each individual library (Lib), it will be repeated within each taxa block.
A tidy_micro set with alpha diversity columns added in to the left of clinical data
Be aware of your minimal sequencing depth as this will be the size of all bootstrapped resamples (rarefied).
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(bpd_phy); data(bpd_cla); data(bpd_ord); data(bpd_fam); data(bpd_clin)
otu_tabs = list(Phylum = bpd_phy, Class = bpd_cla,
Order = bpd_ord, Family = bpd_fam)
set <- tidy_micro(otu_tabs = otu_tabs, clinical = bpd_clin) %>%
filter(day == 7) ## Only including the first week
## calculate alpha diversity for every table
set_alpha <- set %>% alpha_div(min_depth = 5000, min_goods = 90)
## calculate alpha diversity for a specific table
set_fam_alpha <- set %>% alpha_div(table = "Family", min_depth = 5000, min_goods = 90)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.