Performs an anova across all response variables, followed by a Tukeys test on every possible contrast in your model and calculates group means and fold changes for each contrast. Returns a list of data frames for each contrast, and includes a dataframe of model residuals
omu_anova(
count_data,
metadata,
response_variable = "Metabolite",
model,
log_transform = FALSE,
method = "anova"
)
A metabolomics count data frame
Metadata dataframe for the metabolomics count data frame
String of the column header for the response variables, usually "Metabolite"
A formual class object, see ?formula for more info on formulas in R. an interaction between independent variables. Optional parameter
Boolean of TRUE or FALSE for whether or not you wish to log transform your metabolite counts
A string of 'anova', 'kruskal', or 'welch'. anova performs an anova with a post hoc tukeys test, kruskal performs a kruskal wallis with a post hoc dunn test, welch performs a welch's anova with a post hoc games howell test
c57_nos2KO_mouse_countDF <- c57_nos2KO_mouse_countDF[1:12,];
c57_nos2KO_mouse_metadata <- c57_nos2KO_mouse_metadata;
anova_df <- omu_anova(count_data = c57_nos2KO_mouse_countDF, metadata = c57_nos2KO_mouse_metadata,
response_variable = "Metabolite", model = ~ Treatment, log_transform = TRUE)
anova_df <- omu_anova(count_data = c57_nos2KO_mouse_countDF, metadata = c57_nos2KO_mouse_metadata,
response_variable = "Metabolite", model = ~ Treatment + Background, log_transform = TRUE)
anova_df <- omu_anova(count_data = c57_nos2KO_mouse_countDF, metadata = c57_nos2KO_mouse_metadata,
response_variable = "Metabolite", model = ~ Treatment + Background + Treatment*Background,
log_transform = TRUE)
Run the code above in your browser using DataLab