plot_dims: Plot a tSNE or umap colored by feature.

Description Usage Arguments Value Examples

View source: R/plot.R

Description

Plot a tSNE or umap colored by feature.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plot_dims(
  data,
  x = "UMAP_1",
  y = "UMAP_2",
  feature = NULL,
  legend_name = "",
  c_cols = pretty_palette2,
  d_cols = NULL,
  pt_size = 0.25,
  alpha_col = NULL,
  group_col = NULL,
  scale_limits = NULL,
  do_label = FALSE,
  do_legend = TRUE,
  do_repel = TRUE
)

Arguments

data

input data

x

x variable

y

y variable

feature

feature to color by

legend_name

legend name to display, defaults to no name

c_cols

character vector of colors to build color gradient for continuous values, defaults to pretty_palette

d_cols

character vector of colors for discrete values. defaults to RColorBrewer paired palette

pt_size

point size

alpha_col

whether to refer to data column for alpha values

group_col

group by another column instead of feature, useful for labels

scale_limits

defaults to min = 0, max = max(data$x), otherwise a two-element numeric vector indicating min and max to plot

do_label

whether to label each cluster at median center

do_legend

whether to draw legend

do_repel

whether to use ggrepel on labels

Value

ggplot object, cells projected by dr, colored by feature

Examples

1
2
3
4
plot_dims(
    pbmc_meta,
    feature = "classified"
)

clustifyr documentation built on Nov. 8, 2020, 5:32 p.m.