The 2D spatial coordinates (x and y) should be stored as two columns in colData.

VizSpatial(
  obj,
  x_coord = "x",
  y_coord = "y",
  ptSize = 2,
  ptShape = 16,
  groupBy = NULL,
  feature = NULL,
  assay2use = NULL,
  reducedDim = NULL,
  reducedDim2use = "PhiSpace",
  censor = FALSE,
  quant = 0.5,
  legend.position = "right",
  legend.symb.size = NULL,
  legend.title = NULL,
  fsize = 14,
  reOrder = F,
  ...
)

Arguments

obj

Input object; either SingleCellExperiemnt or SpatialExperiment. If SingleCellExperiemnt, then colData(obj) has to contain columns named by x_coord and y_coord below.

x_coord

x coordinate name of a column of colData (if type(ojb) == SingleCellExperiemnt).

y_coord

y coordinate name of a column of colData (if type(ojb) == SingleCellExperiemnt).

ptSize

Size of point, representing spatial cell like objects (segmented cells, spots etc).

ptShape

Shape of point.

groupBy

Name of a metadata column to colour points by.

feature

Name of a feature (eg gene) to colour points by.

assay2use

Which assay to use when feature is specified.

reducedDim

Name of reducedDim column to colour points by.

reducedDim2use

Name of reducedDim layer to use when reducedDim is specified.

censor

Logical. Whether to set smaller colour values to zero. Default is FALSE. (Recommend to set to TRUE when visualise PhiSpace scores,)

quant

A value between 0 and 1. Colour values below quant will be set to zero if censor=TRUE.

legend.position

Position of legened, one of "right", "bottome", "left" and "top".

legend.symb.size

Legend symbol size (for discrete legend).

legend.title

Alternative legend name to replace the original.

fsize

Base font size of figure.

reOrder

Logical. Whether to reorder points according to their values (ascending) or not. Set to be TRUE to avoid overplotting.

...

Other arguments to pass to basicPlotFormat.

Value

A ggplot2 object.