plot_lda: LDA on marker expression

View source: R/plot_lda.R

plot_ldaR Documentation

LDA on marker expression

Description

LDA on marker expression

Usage

plot_lda(
  df_samples,
  protein_names,
  group,
  cor_scaling_factor = 1,
  arrow_color = "black",
  marker_color = "black",
  marker_size = 5
)

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

group

The column name of the group variable

cor_scaling_factor

Scaling factor of circle of correlations

arrow_color

Color of correlation circle

marker_color

Colors of marker names

marker_size

Size of markerr names

Value

ggplot2 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))
df$condition <- rep(c("A", "B", "C", "D"), each = length(df$condition)/4)
CytoGLMM::plot_lda(df,
                   protein_names = protein_names,
                   group = "condition",
                   cor_scaling_factor = 2)

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