Skip to contents

Visualize spatial features w/ or w/o tissue image

Usage

plot_spatial_feature(
  spe,
  feature,
  cells_of_interest = NULL,
  spot_size = 1.6,
  spot_alpha = 1,
  image_alpha = NA,
  show_tissue_image = TRUE,
  clip = TRUE
)

Arguments

spe

SpatialExperiment object

feature

string, column name for a feature to be visualized

cells_of_interest

array of cell ids to highlight.

spot_size

specify size of spot (feature). Currently, default values do not work well. Might need some manual adjustments.

spot_alpha

specify transparency of spot (feature)

image_alpha

alpha value for tissue image. If NA, keep the current value.

show_tissue_image

if TRUE, tissue image is shown.

clip

if TRUE (dafault), tissue image will be cliped to the size to cover only the spots

Value

ggplot object of spatial feature plot

Details

The spots are placed on their original locations, keeping spatial relations.

Examples

if (FALSE) {
plot_spatial_features(spe,
                      feature = "mclust_6")

plot_spatial_features(spe,
                      feature = "mclust_6",
                      image_alpha = 0.75)
}