| plotExprVsDistSA | R Documentation | 
Generates a scatterplot to visualize the relationship between gene expression and
the distance of data points to a spatial reference. Set line_alpha > 0 to visualize the
inferred expression pattern used for spatial gradient screening.
plotExprVsDistSA(
  object,
  variables,
  ids = idSA(object),
  distance = "dte",
  resolution = recSgsRes(object),
  core = FALSE,
  pt_alpha = 0.1,
  pt_color = "black",
  pt_clrp = NULL,
  pt_size = 1.5,
  line_alpha = 0,
  line_color = "forestgreen",
  line_size = 1.75,
  border_linealpha = 1,
  border_linecolor = "black",
  border_linesize = 1,
  border_linetype = "solid",
  ee_linealpha = 0,
  ee_linecolor = "black",
  ee_lineend = "point",
  ee_linesize = 1,
  ee_linetype = "solid",
  se_fill = ggplot2::alpha("lightgrey", 0.5),
  unit = getDefaultUnit(object),
  ggpLayers = NULL,
  ncol = NULL,
  nrow = NULL,
  ...
)
plotExprVsDistST(
  object,
  variables,
  id = idST(object),
  resolution = recSgsRes(object),
  width = NULL,
  pt_alpha = 0.5,
  pt_color = "black",
  pt_clrp = NULL,
  pt_size = 1.5,
  line_alpha = 0.9,
  line_color = "forestgreen",
  line_size = 1,
  unit = getDefaultUnit(object),
  ggpLayers = NULL,
  ncol = NULL,
  nrow = NULL,
  ...
)
| object | An object of class  | 
| variables | Character vector. All numeric variables hat are supposed to be plotted. | 
| ids | Character vector. Specifies the IDs of the spatial annotations of interest. | 
| distance | A numeric vector of distances to the annotation's edge. | 
| resolution | Distance measure. The resolution
with which the expression gradient is inferred. Defaults are platform specific.
See more in detail section of  | 
| pt_alpha | Numeric value. Specifies the degree of transparency of all points. | 
| pt_clrp | The color palette to be used if the specified variable displayed by
color is categorical/discrete. Run  | 
| 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. | 
| se_fill | The fill color for the smoothing line's standard error area (default: "lightgrey"). | 
| unit | Character value. Specifies the desired unit in
which distance measures
or  area measures are provided.
Run  | 
| ggpLayers | List of  | 
| nrow,ncol | Numeric values or NULL. Used to arrange multiple plots. | 
| ... | Used to absorb deprecated arguments or functions. | 
| id | Character value. The ID of the spatial trajectory. | 
A ggplot.
library(SPATA2)
library(tidyverse)
data("example_data")
object <- example_data$object_UKF275T_diet
object <- normalizeCounts(object, activate = TRUE)
object <-
 createNumericAnnotations(
   object = object,
   variable = "HM_HYPOXIA",
   threshold = "kmeans_high",
   id = "hypoxia_ann",
   inner_borders = FALSE,
   force1 = TRUE
   )
 plotExprVsDistSA(object, variables = c("HM_HYPOXIA", "METRN"), ids = "hypoxia_ann", core = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.