plot_prcomp: Plot PCA of subsampled data using ggplot

View source: R/plot_prcomp.R

plot_prcompR Documentation

Plot PCA of subsampled data using ggplot

Description

Plot PCA of subsampled data using ggplot

Usage

plot_prcomp(
  df_samples,
  protein_names,
  color_var = "treatment",
  subsample_size = 10000,
  repel = TRUE
)

Arguments

df_samples

Data frame or tibble with proteins counts, cell condition, and group information

protein_names

A vector of column names of protein to use in the analysis

color_var

A column name

subsample_size

Subsample per color_var variable

repel

Repel labels

Value

cowplot object

Examples

set.seed(23)
df <- generate_data()
protein_names <- names(df)[3:12]
df <- dplyr::mutate_at(df, protein_names, function(x) asinh(x/5))
CytoGLMM::plot_prcomp(df,
                      protein_names = protein_names,
                      color_var = "condition")

ChristofSeiler/CytoGLMM documentation built on April 21, 2023, 3:38 a.m.