View source: R/aggregateCount.R
aggregateCount | R Documentation |
Aggregate read counts based on taxonomic level
r
aggregateCount
was renamed to aggregate_count
for more consistent
function naming nomenclature in OCMSutility
. Usage is still exactly the same
aggregateCount(count_df, tax_df = NULL, aggregate_by = NULL)
data(dss_example)
# featureID should be row names
feature_count <- dss_example$merged_abundance_id %>%
tibble::column_to_rownames('featureID')
# cleanup sample names
colnames(feature_count) <- paste0('id', colnames(feature_count))
feature_tax <- dss_example$merged_taxonomy
# set row order of count and tax tables to be the same
feature_count <- feature_count[feature_tax$featureID,]
aggregated_list <- aggregateCount(feature_count, feature_tax,
aggregate_by = "Family")
# ->
aggregated_list <- aggregate_count(feature_count, feature_tax,
aggregate_by = "Family")
summary(aggregated_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.