Plots inferred gene expression along a spatial trajectory against model values.

plotTrajectoryEvaluation(
  object,
  id,
  variables,
  binwidth = getCCD(object),
  n_bins_circle = NA_integer_,
  model_subset = NULL,
  model_remove = NULL,
  model_add = NULL,
  pt_alpha = 0.9,
  pt_color = "black",
  pt_size = 1,
  line_alpha = 0.9,
  line_color = "blue",
  line_size = 1,
  display_se = FALSE,
  display_corr = FALSE,
  corr_p_min = 5e-05,
  corr_pos_x = NULL,
  corr_pos_y = NULL,
  corr_text_sep = "\n",
  corr_text_size = 1,
  force_grid = FALSE,
  ncol = NULL,
  nrow = NULL,
  verbose = NULL
)

Arguments

object

An object of class spata2.

id

Character value. The ID of the image annotation of interest.

variables

Character vector. All numeric variables (meaning genes, gene-sets and numeric features) that are supposed to be included in the screening process.

binwidth

Distance value. The width of the circular bins to which the barcode-spots are assigned. We recommend to set it equal to the center-center distance: binwidth = getCCD(object). (See details for more.) - See details of ?is_dist for more information about distance values.

n_bins_circle

Numeric value or vector of length 2. Specifies how many times the area is buffered with the value denoted in binwidth. (See details for more.)

model_subset

Character value. Used as a regex to subset models. Use validModelNames() to obtain all model names that are known to SPATA2 and showModels() to visualize them.

model_remove

Character value. Used as a regex to remove models are not supposed to be included.

model_add

Named list. Every slot in the list must be either a formula containing a function that takes a numeric vector as input and returns a numeric vector with the same length as its input vector. Or a numeric vector with the same length as the input vector. Test models with showModels().

pt_alpha

Numeric value. Specifies the degree of transparency of all points.

pt_size

Numeric value. Specifies the size of all points.

line_alpha

Numeric. Affects alpha of main lines of the plot.

line_color

Character. Affects color of the main lines of the plot.

line_size

Numeric. Affects size of the main lines of the plot.

display_corr

Logical. If TRUE, correlation values are added to the plots.

corr_p_min

Numeric value. Everything below is displayed as <corr_p_min.

corr_pos_x, corr_pos_y

Numeric vector of length two. The position of the correlation text with x- and y-coordinates.

corr_text_sep

Character value used to separate correlation value and corresponding p-value.

corr_text_size

Numeric value. Size of text.

force_grid

Logical value. If TRUE, facet_grid() is used regardless of variables being of length 1.

nrow, ncol

Numeric values or NULL. Used to arrange multiple plots.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)