massqc_rsd_plot: massqc_rsd_plot

View source: R/massqc_rsd_plot.R

massqc_rsd_plotR Documentation

massqc_rsd_plot

Description

RSD plot for each variable.

Usage

massqc_rsd_plot(
  object,
  color_by,
  order_by = "variable_id",
  show_x_text = FALSE,
  show_x_ticks = FALSE,
  desc = FALSE,
  point_alpha = 0.8,
  point_size = 3
)

Arguments

object

tidymass-class object.

color_by

which column (sample_info) is used to color samples

order_by

which column (sample_info) is used to order samples

show_x_text

show_x_text

show_x_ticks

show_x_ticks

desc

desc

point_alpha

point_alpha

point_size

point_size

Value

ggplot2 plot.

Author(s)

Xiaotao Shen shenxt1990@163.com

Examples

library(massdataset)
library(ggplot2)
data("expression_data")
data("sample_info")
data("variable_info")

object =
  create_mass_dataset(
    expression_data = expression_data,
    sample_info = sample_info,
    variable_info = variable_info
  )

object %>%
  massqc_rsd_plot()

object %>%
  massqc_rsd_plot(color_by = "rsd")

object %>%
  massqc_rsd_plot(color_by = "rsd", order_by = "rsd")

object %>%
  massqc_rsd_plot(color_by = "rsd", point_alpha = 1) +
  scale_color_gradient(low = "skyblue", high = "red") +
  geom_hline(yintercept = 0.3, color = "red")

object %>%
  activate_mass_dataset(what = "sample_info") %>%
  filter(class == "Subject") %>%
  massqc_rsd_plot(color_by = "rsd", point_alpha = 1) +
  scale_color_gradient(low = "skyblue", high = "red") +
  geom_hline(yintercept = 0.3, color = "red")

tidymass/massqc documentation built on Sept. 24, 2022, 9:23 p.m.