PomaBoxplots: Boxplots and Violin Plots

View source: R/PomaBoxplots.R

PomaBoxplotsR Documentation

Boxplots and Violin Plots

Description

PomaBoxplots generates boxplots and violin plots for samples and features. This function can be used for data exploration (e.g., comparison between pre and post normalized datasets).

Usage

PomaBoxplots(
  data,
  x = "samples",
  violin = FALSE,
  feature_name = NULL,
  theme_params = list(legend_title = FALSE, axis_x_rotate = TRUE)
)

Arguments

data

A SummarizedExperiment object.

x

Character. Options are "samples" (to visualize sample boxplots) and "features" (to visualize feature boxplots). Default is "samples".

violin

Logical. Indicates if violin plots should be displayed instead of boxplots. Default is FALSE.

feature_name

Character vector. Indicates the feature/s to display. Default is NULL (all features will be displayed).

theme_params

List. Indicates theme_poma parameters.

Value

A ggplot object.

Author(s)

Pol Castellano-Escuder

Examples

data("st000284")

# Sample boxplots
st000284 %>%
PomaNorm() %>% 
PomaBoxplots(theme_params = list(axistext = "y"))

# Sample violin plots
st000284 %>%
PomaNorm() %>% 
PomaBoxplots(violin = TRUE, theme_params = list(axistext = "y"))

# All feature boxplots
st000284 %>% 
PomaNorm() %>% 
PomaBoxplots(x = "features", theme_params = list(axis_x_rotate = TRUE))
             
# Specific feature boxplots
st000284 %>% 
PomaNorm() %>% 
PomaBoxplots(x = "features", 
             feature_name = c("ornithine", "orotate"))
             
# Specific feature violin plots
st000284 %>% 
PomaNorm() %>% 
PomaBoxplots(x = "features", 
             violin = TRUE,
             feature_name = c("ornithine", "orotate"))

pcastellanoescuder/POMA documentation built on March 15, 2024, 10:08 p.m.