count_fold_changes {omu}R Documentation

Get counts for significant fold changes by metabolite class.

Description

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.

Usage

count_fold_changes(count_data, column, sig_threshold, keep_unknowns)

Arguments

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

Examples

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")

[Package omu version 1.1.2 Index]