Learn R Programming

monocle3 (version 0.1.3)

plot_cells_3d: Plot a dataset and trajectory in 3 dimensions

Description

Plot a dataset and trajectory in 3 dimensions

Usage

plot_cells_3d(cds, dims = c(1, 2, 3), reduction_method = c("UMAP",
  "tSNE", "PCA", "LSI"), color_cells_by = "cluster", genes = NULL,
  show_trajectory_graph = TRUE, trajectory_graph_color = "black",
  trajectory_graph_segment_size = 5, norm_method = c("log",
  "size_only"), cell_size = 25, alpha = 1, min_expr = 0.1)

Arguments

cds

cell_data_set to plot

dims

numeric vector that indicates the dimensions used to create the 3D plot, by default it is the first three dimensions.

reduction_method

string indicating the reduction method to plot.

color_cells_by

the cell attribute (e.g. the column of colData(cds)) to map to each cell's color. Default is cluster.

genes

a gene name or gene id to color the plot by.

show_trajectory_graph

a logical used to indicate whether to graph the principal graph backbone. Default is TRUE.

trajectory_graph_color

the color of graph backbone. Default is black.

trajectory_graph_segment_size

numeric indicating the width of the graph backbone. Default is 5.

norm_method

string indicating the method used to transform gene expression when gene markers are provided. Default is "log". "size_only" is also supported.

cell_size

numeric indicating the size of the point to be plotted. Default is 25.

alpha

numeric indicating the alpha value of the plotted cells. Default is 1.

min_expr

numeric indicating the minimum marker gene value to be colored. Default is 0.1.

Value

a plotly plot object

Examples

Run this code
# NOT RUN {
plot_cells_3d(cds, markers=c("Rbfox3, Neurod1", "Sox2"))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab