plot_genes_by_group: Create a dot plot to visualize the mean gene expression and...

plot_genes_by_groupR Documentation

Create a dot plot to visualize the mean gene expression and percentage of expressed cells in each group of cells

Description

Create a dot plot to visualize the mean gene expression and percentage of expressed cells in each group of cells

Usage

plot_genes_by_group(
  cds,
  markers,
  group_cells_by = "cluster",
  reduction_method = "UMAP",
  norm_method = c("log", "size_only"),
  lower_threshold = 0,
  max.size = 10,
  ordering_type = c("cluster_row_col", "maximal_on_diag", "none"),
  axis_order = c("group_marker", "marker_group"),
  flip_percentage_mean = FALSE,
  pseudocount = 1,
  scale_max = 3,
  scale_min = -3,
  color_by_group = FALSE
)

Arguments

cds

A cell_data_set for plotting.

markers

A list of gene ids (or short names) to show in the plot

group_cells_by

How to group cells when labeling them. Must be either the name of a column of colData(cds), or one of "clusters" or "partitions". If a column in colData(cds), must be a categorical variable.

reduction_method

The dimensionality reduction method used for clusters and partitions.

norm_method

Determines how to transform expression values prior to plotting. Options are "log" and "size_only". Default is "log".

lower_threshold

The lowest gene expressed treated as expressed. By default, zero.

max.size

The maximum size of the dot. By default, it is 10.

ordering_type

How to order the genes / groups on the dot plot. Only accepts 'cluster_row_col' (use biclustering to cluster the rows and columns), 'maximal_on_diag' (position each column so that the maximal color shown on each column on the diagonal, if the current maximal is used in earlier columns, the next largest one is position), and 'none' (preserve the ordering from the input gene or alphabetical ordering of groups). Default is 'cluster_row_col'.

axis_order

Whether to put groups on x-axis, genes on y-axis (option 'group_marker') or the reverse order (option 'marker_group'). Default is "group_marker".

flip_percentage_mean

Logical indicating whether to use color of the dot to represent the percentage (by setting flip_percentage_mean = FALSE, default) and size of the dot the mean expression, or the opposite (by setting flip_percentage_mean = TRUE).

pseudocount

A pseudo-count added to the average gene expression.

scale_max

The maximum value (in standard deviations) to show in the heatmap. Values larger than this are set to the max.

scale_min

The minimum value (in standard deviations) to show in the heatmap. Values smaller than this are set to the min.

color_by_group

Color cells by the group to which they belong.

Value

a ggplot2 plot object


cole-trapnell-lab/monocle3 documentation built on April 7, 2024, 9:24 p.m.