Skip to content

Plot contrast

Plot a UMAP colored by how cells shift in a given contrast

plot_contrast(
  ccm,
  cond_b_vs_a_tbl,
  log_abundance_thresh = -5,
  scale_shifts_by = c("receiver", "sender", "none"),
  edge_size = 2,
  cell_size = 1,
  q_value_thresh = 1,
  group_label_size = 2,
  plot_labels = c("significant", "all", "none"),
  fc_limits = c(-3, 3),
  sender_cell_groups = NULL,
  receiver_cell_groups = NULL,
  plot_edges = c("none", "all", "directed", "undirected"),
  edge_significance = c("both", "one-sided"),
  keep_colors = FALSE,
  label_cell_groups = list(),
  repel_labels = TRUE,
  model_for_pcors = c("reduced", "full"),
  switch_label = NULL,
  sub_cds = NULL,
  alpha = 1,
  x = 1,
  y = 2
)

Arguments

ccm

A cell_count_model object.

cond_b_vs_a_tbl

data.frame A data frame from compare_abundances.

log_abundance_thresh

numeric Select cell groups by log abundance.

scale_shifts_by

string A scale directed graph edges by "sender", "receiver", or "none".

edge_size

numeric The size of edges in the plot.

cell_size

numeric The size of cells in the plot.

q_value_thresh

numeric Remove contrasts whose change in q-value exceeds q_value_thresh.

group_label_size

numeric The size of group labels in the plot.

plot_labels

string Choose cell groups to label.

fc_limits

vector The range of cell abundance changes to include in the plot.

sender_cell_groups

list Sender cell groups of directed graph.

receiver_cell_groups

list Receiver cell groups of directed graph.

plot_edges

string Type of edges to plot.

label_cell_groups

list The cell_group labels to include in the plot.

repel_labels

logical Repel overlapping plot labels.

model_for_pcors

string The model to use for orienting graph edges from the PLNnetwork.

switch_label

string The name of the cell_data_set column with cell_group identifiers.

sub_cds

string A cell_data_set.

alpha

numeric A the ggplot opacity. A value between 0 and 1.

x

numeric The column number for the UMAP x coordinate.

y

numeric The column number for the UMAP y coordinate.

Value

A ggplot2 plot object.