PomaDensity: Density Plots

View source: R/PomaDensity.R

PomaDensityR Documentation

Density Plots

Description

PomaDensity generates a density plot for samples and features. This function can be used for data exploration (e.g., comparison between pre and post normalized datasets).

Usage

PomaDensity(
  data,
  x = "samples",
  feature_name = NULL,
  theme_params = list(legend_title = FALSE)
)

Arguments

data

A SummarizedExperiment object.

x

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

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 density plots
st000284 %>%
PomaNorm() %>% 
PomaDensity(theme_params = list(axistext = "y"))

# All feature density plots
st000284 %>% 
PomaNorm() %>% 
PomaDensity(x = "features", theme_params = list(legend_position = "none"))
             
# Specific feature density plots
st000284 %>% 
PomaNorm() %>% 
PomaDensity(x = "features", 
            feature_name = c("ornithine", "orotate"))

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