Plots the surface of the sample three times with different coloring to visualize how spatialAnnotationScreening() screens the sample depending on the input of arguments binwidth, n_bins_dist, n_bins_angle.

plotSurfaceSAS(object, ...)

# S4 method for class 'SPATA2'
plotSurfaceSAS(
  object,
  ids,
  distance = distToEdge(object, id),
  resolution = recSgsRes(object),
  color_by = c("dist", "bins_dist", "angle", "bins_angle"),
  unit = getDefaultUnit(object),
  angle_span = c(0, 360),
  color_outside = ggplot2::alpha("lightgrey", 0.25),
  show_plots = TRUE,
  ggpLayers = list(),
  bcs_exclude = NULL,
  verbose = NULL,
  ...
)

# S4 method for class 'SpatialAnnotationScreening'
plotSurfaceSAS(
  object,
  show_plots = TRUE,
  display_angle = FALSE,
  display_bins_angle = TRUE,
  display_bins_dist = TRUE,
  ggpLayers = list(),
  ...
)

Arguments

object

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

...

Used to absorb deprecated arguments or functions.

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.)

resolution

Distance measure. The resolution with which the expression gradient is inferred. Defaults are platform specific. See more in detail section of recSgsRes().

color_by

Character value. The variables by which to color the data points.

unit

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

angle_span

Numeric vector of length 2. Confines the area screened by an angle span relative to the center of its closest spatial annotation.

show_plots

Logical value. If TRUE, the plots are immediately plotted. If FALSE, only a list of plots is returned (invisibly).

ggpLayers

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

bcs_exclude

Character value containing the barcodes of observations to be excluded from the analysis.

verbose

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

(Warning messages will always be printed.)

display_angle, display_bins_angle, display_circle

Logical value. If TRUE, the plot is included. If FALSE, plotting is skipped.

color_core, color_outside

Character value. Denotes the colors with which the area of image annotation (color_core) and the area that is not included in the screening (color_outside) is displayed.

Value

An invisible list of ggplots.

Details

The method for class SpatialAnnotationScreening (the output of the function spatialAnnotationScreening()) can be used to show the area on which the results are based on. Therefore, it does not have arguments binwidth, n_bins_circle and n_bins_angle.