plotDimDual: Dimensionality Reduction Plot (Dual Color)

Description Usage Arguments Value

View source: R/plot-dim.R

Description

Plots cells according to their coordinates in a dimensionality reduction (tSNE by default). Cells are colored according to two user set labels (label.red and label.green) in a mode that simulates dual-color microscopy - cells that express neither label are black, cells that express one label are red or green, and cells that express both labels are yellow. Both labels must be continuous variables (i.e. not cluster identities).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
plotDimDual(
  object,
  label.red,
  label.green,
  label.red.type = "search",
  label.green.type = "search",
  reduction.use = c("tsne", "pca", "dm"),
  dim.x = 1,
  dim.y = 2,
  point.size = 1,
  alpha = 1,
  plot.title = "",
  legend = T,
  legend.size = 1/5.5,
  legend.offset.x = 0,
  legend.offset.y = 0,
  x.lim = NULL,
  y.lim = NULL,
  na.rm = F,
  na.alpha = 0.4 * alpha
)

Arguments

object

An URD object

label.red

(Character) Data to use for coloring points for the red channel

label.green

(Character) Data to use for coloring points for the green channel

label.red.type

(Character) Type of data to search for the label for the red channel. Default is "search" which checks several data types in order. For more information: data.for.plot

label.green.type

(Character) Type of data to search for the label for the green channel. Default is "search" which checks several data types in order. For more information: data.for.plot

reduction.use

(Character) Dimensionality reduction to use (tSNE, PCA, or Diffusion Map)

dim.x

(Numeric) Component to use on x-axis

dim.y

(Numeric) Component to use on y-axis

point.size

(Numeric) Size of points on plot

alpha

(Numeric) Transparency of points on plot: 0 (Transparent) - 1 (Opaque)

plot.title

(Character) Title of the plot

legend

(Logical) Show a legend?

legend.size

(Numeric) Adjusts the size of the legend.

legend.offset.x

(Numeric) Adjust the legend position (in terms of dimensionality reduction coordinates)

legend.offset.y

(Numeric) Adjust the legend position (in terms of dimensionality reduction coordinates)

x.lim

(Numeric) Limits of x-axis (NULL autodetects)

y.lim

(Numeric) Limits of y-axis (NULL autodetects)

na.rm

(Logical) If TRUE, points with an NA value for either label are displayed as transparent grey. If FALSE, they are removed from the plot.

na.alpha

(Numeric) If na.rm=FALSE, thae alpha value that should be used for NA points

Value

A ggplot2 object


farrellja/URD documentation built on June 17, 2020, 4:48 a.m.