Learn R Programming

monocle (version 1.6.2)

plot_spanning_tree: Plots the minimum spanning tree on cells.

Description

Plots the minimum spanning tree on cells.

Usage

plot_spanning_tree(cds, x = 1, y = 2, color_by = "State",
  show_tree = TRUE, show_backbone = TRUE, backbone_color = "black",
  markers = NULL, show_cell_names = FALSE, cell_name_size = 1)

Arguments

cds
CellDataSet for the experiment
x
the column of reducedDimS(cds) to plot on the horizontal axis
y
the column of reducedDimS(cds) to plot on the vertical axis
color_by
the cell attribute (e.g. the column of pData(cds)) to map to each cell's color
show_tree
whether to show the links between cells connected in the minimum spanning tree
show_backbone
whether to show the diameter path of the MST used to order the cells
backbone_color
the color used to render the backbone.
markers
a gene name or gene id to use for setting the size of each cell in the plot
show_cell_names
draw the name of each cell in the plot
cell_name_size
the size of cell name labels

Value

  • a ggplot2 plot object

Examples

Run this code
data(HSMM)
plot_spanning_tree(HSMM)
plot_spanning_tree(HSMM, color_by="Pseudotime", show_backbone=FALSE)
plot_spanning_tree(HSMM, markers="MYH3")

Run the code above in your browser using DataLab