plotTreeDiscretized: Plot 2D Dendrogram of URD Tree, Discretized

Description Usage Arguments Details Value

View source: R/tree-plots.R

Description

Plots cells on the URD 2D dendrogram. Cells are colored according to which of 1-3 labels are 'on' after conversion to discrete on/off values according to label.min and label.max. All 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
plotTreeDiscretized(
  object,
  labels,
  label.types = rep("search", length(labels)),
  label.min = rep(0, length(labels)),
  label.max = rep(Inf, length(labels)),
  colors = c("grey", "blue", "green", "red", "cyan", "magenta", "yellow", "black"),
  title = NULL,
  tree.alpha = 1,
  tree.size = 1,
  tree.color = "grey",
  cell.alpha = 0.5,
  cell.size = 0.3,
  label.x = T,
  label.segments = F,
  hide.y.ticks = T
)

Arguments

object

An URD object

labels

(Character vector, length 1-3) Data to plot

label.types

(Character vector, length 1-3) Type of data to search for the label for the first channel. Default is "search" which checks several data types in order. For more information: data.for.plot

label.min

(Numeric vector, length 1-3) Consider a cell positive for a feature if its value is between label.min and label.max

label.max

(Numeric vector, length 1-3) Consider a cell positive for a feature if its value is between label.min and label.max

colors

(Character vector) Colors to use for plotting. Color order is as follows: With one label (A): 1 A-, 2 A+; With two labels (A, B): 1 A- B-, 2 A+ B-, 3 A- B+, 4 A+ B+; With three labels (A, B, C): 1 A- B- C-, 2 A+ B- C-, 3 A- B+ C-, 4 A- B- C+, 5 A+ B+ C-, 6 A+ B- C+, 7 A- B+ C+, 8 A+ B+ C+

title

(Character) Title to display on the plot.

tree.alpha

(Numeric) Transparency of dendrogram (0 is transparent, 1 is opaque)

tree.size

(Numeric) Thickness of lines of dendrogram

tree.color

(Character) Color to use for tree lines

cell.alpha

(Numeric) Transparency of cells (0 is transparent, 1 is opaque)

cell.size

(Numeric) How large should cells be

label.x

(Logical) Should tips on the x-axis be labeled

label.segments

(Logical) Should segments of the dendrogram be labeled with their numbers

Details

Shamelessly inspired by the behavior of FeaturePlot in Seurat when overlay is turned on.

Value

A ggplot2 object


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