Visualizes the screenining direction of an SAS set up on top of a surface plots. See examples.

ggpLayerScreeningDirectionSAS(
  object,
  ids,
  distance = "dte",
  line_alpha = 1,
  line_color = "black",
  line_size = 1,
  line_type = "solid",
  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.

ids

Character vector. Specifies the IDs of the spatial annotations of interest.

distance

Distance measure. Specifies the distance from the border of the spatial annotation to the horizon in the periphery up to which the screening is conducted. Defaults to a distance that covers the whole tissue section the spatial annotation is located on using distToEdge(). (This distance must not be exceeded.)

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.

line_type

Character. The line type. One of 'blank', 'solid', 'dashed', 'dotted', 'dotdash', 'longdash' and 'twodash'.

verbose

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

(Warning messages will always be printed.)

...

Used to absorb deprecated arguments or functions.

Details

In contrast to ggpLayerExprEstimates(), which visualizes the precise positions of the expression estimates, ggpLayerScreeningDiretionSAS() visualizes only the concept, the idea, of the screening direction. This is particularly useful, if the screening set up includes multiple annotations in one tissue section, where ggpLayerExprEstimates() fails to visualize the combined expression estimates.

Examples

library(SPATA2)

data("example_data")

object <- example_data$object_UKF313T_diet

ids <- getSpatAnnIds(object, tags = c("necrotic", "compr"))

plotImage(object) +
  ggpLayerSpatAnnOutline(object, ids = ids, fill = "lightgrey") +
  ggpLayerScreeningDirectionSAS(object, ids = ids, line_size = 0.5)