pie_chart {omu}R Documentation

Create a pie chart

Description

Creates a pie chart as ggplot2 object using the output from ra_table.

Usage

pie_chart(ratio_data, variable, column, color)

Arguments

ratio_data

a dataframe object of percents. output from ra_table function

variable

The metadata variable you are measuring, i.e. "Class"

column

either "Increase", "Decrease", or "Significant_Changes"

color

string denoting color for outline. use NA for no outline

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)

ra_table <- ra_table(fc_data = fold_change_counts, variable = "Class")

pie_chart(ratio_data = ra_table, variable = "Class", column = "Decrease", color = "black")

[Package omu version 1.1.2 Index]