aggregateCount: aggregateCount

View source: R/aggregateCount.R

aggregateCountR Documentation

aggregateCount

Description

Aggregate read counts based on taxonomic level [Deprecated]r

aggregateCount was renamed to aggregate_count for more consistent function naming nomenclature in OCMSutility. Usage is still exactly the same

Usage

aggregateCount(count_df, tax_df = NULL, aggregate_by = NULL)

Examples

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)

OxfordCMS/OCMSutility documentation built on Feb. 27, 2025, 8:19 p.m.