| calculate_abundance_stats | R Documentation |
This function calculates mean relative abundance, standard deviation, and log2 fold change for each feature between two groups.
calculate_abundance_stats(abundance, metadata, group, features, group1, group2)
abundance |
A matrix or data frame with features as rows and samples as columns |
metadata |
A data frame containing sample information |
group |
Character string specifying the group column name in metadata |
features |
Character vector of feature names to calculate statistics for |
group1 |
Character string specifying the first group name |
group2 |
Character string specifying the second group name |
A data frame with columns:
feature |
Feature identifier |
mean_rel_abundance_group1 |
Mean relative abundance for group1 |
sd_rel_abundance_group1 |
Standard deviation of relative abundance for group1 |
mean_rel_abundance_group2 |
Mean relative abundance for group2 |
sd_rel_abundance_group2 |
Standard deviation of relative abundance for group2 |
log2_fold_change |
Log2 fold change (group2/group1) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.