View source: R/count_fold_changes.R
count_fold_changes | R Documentation |
Takes an input data frame from the output of omu_summary and creates a data frame of counts for significantly changed metabolites by class hierarchy data.
count_fold_changes(count_data, column, sig_threshold, keep_unknowns)
count_data |
Output dataframe from the omu_summary function or omu_anova. |
column |
Metabolite metadata you want to group by, i.e. "Class", "Subclass_1". |
sig_threshold |
Significance threshold for compounds that go towars the count, sig_threshold = 0.05 |
keep_unknowns |
TRUE or FALSE for whether to drop compounds that weren't assigned hierarchy metadata |
c57_nos2KO_mouse_countDF <- assign_hierarchy(c57_nos2KO_mouse_countDF, TRUE, "KEGG")
t_test_df <- omu_summary(count_data = c57_nos2KO_mouse_countDF,
metadata = c57_nos2KO_mouse_metadata,
numerator = "Strep", denominator = "Mock", response_variable = "Metabolite",
Factor = "Treatment", log_transform = TRUE, p_adjust = "BH", test_type = "welch")
fold_change_counts <- count_fold_changes(count_data = t_test_df,
column = "Class", sig_threshold = 0.05, keep_unknowns = "FALSE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.