Displays values along a trajectory direction with a smoothed lineplot or ridgeplot.

plotStsLineplot(
  object,
  variables,
  id = idST(object),
  width = getTrajectoryLength(object, id),
  unit = getSpatialMethod(object)@unit,
  smooth_span = 0.2,
  smooth_se = TRUE,
  line_color = NULL,
  line_size = 1.5,
  clrp = NULL,
  clrp_adjust = NULL,
  display_facets = TRUE,
  display_eval = FALSE,
  eval_size = 4,
  ggpLayers = NULL,
  ncol = NULL,
  nrow = NULL,
  verbose = NULL,
  ...
)

plotStsRidgeplot(
  object,
  variables,
  id = idST(object),
  width = getTrajectoryLength(object, id),
  unit = getSpatialMethod(object)@unit,
  smooth_span = 0.2,
  smooth_se = TRUE,
  line_color = NULL,
  line_size = 1.5,
  clrp = NULL,
  clrp_adjust = NULL,
  display_eval = FALSE,
  eval_size = 4,
  ggpLayers = NULL,
  ncol = NULL,
  nrow = NULL,
  verbose = NULL,
  ...
)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

variables

Character vector. The names of the data variables of interest.

unit

Character value. Specifies the desired unit in which distance measures or area measures are provided. Run validUnitsOfLength() or validUnitsofArea() for valid input options.

smooth_span

Numeric value. Controls the degree of smoothing. Given to argument span of stats::loess().

line_color

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

line_size

Numeric value. Specifies the thicknes of the lines with which the trajectory dynamics are displayed.

clrp

Character value. Specifies the color palette to be used to represent groups of discrete variables. Run validColorPalettes() to obtain valid input options.

clrp_adjust

Named character vector or NULL. If character, it adjusts the color palette that is used to represent the groups. Names of the input vector must refer to the group and the respective named element denotes the color with which to represent the group.

display_facets

Logical. If set to TRUE sub plots for every specified gene, gene-set or feature are displayed via ggplot2::facet_wrap()

ggpLayers

List of ggproto-objects that are added to each plot. Skim ggpLayer*()-functions for more options.

nrow, ncol

Numeric values or NULL. Used to arrange multiple plots.

verbose

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

(Warning messages will always be printed.)

...

Additional arguments given to ggplot2::facet_wrap() if argument display_facets is set to TRUE.

Value

A ggplot.

Examples

library(SPATA2)

data("example_data")

object <- example_data$object_UKF269T_diet

object <- normalizeCounts(objcect, activate = TRUE)

genes <- c("EGFR", "MBP", "MAG", "SNAP25")

plotStsHeatmap(object, id = "horizontal_mid", variables = genes)

plotStsLineplot(object, id = "horizontal_mid", variables = genes)

plotStsRidgeplot(object, id = "horizontal_mid", variables = genes)