View source: R/prevalence_abundance.R
prevalence_abundance | R Documentation |
prevalence_abundance return a list that contains a dataframe of the prevalence and abundance (mean across samples) of each taxon (from relative abundance matrix) and a plot.
prevalence_abundance(abundance_matrix)
abundance_matrix |
dataframe; samples are columns and features are rows (relative abundance) |
list
feature_count <- dss_example$merged_abundance_id %>%
tibble::column_to_rownames('featureID')
colnames(feature_count) <- paste0('id', colnames(feature_count))
feature_tax <- dss_example$merged_taxonomy
feature_count <- feature_count[feature_tax$featureID,]
aggregated_list <- aggregate_count(feature_count, feature_tax,
aggregate_by = "Genus")
abundance_matrix <- relab(aggregated_list[['count_df']])
pa <- prevalence_abundance(abundance_matrix)
pa$data
pa$plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.