Skip to contents

This function adapts the SpatialFeaturePlot Seurat function by providing additional plotting options.

Usage

spatial_feature_plot(
  seu,
  features = "nFeature_Spatial",
  title = NULL,
  alpha = c(0.1, 0.9),
  pt.size.factor = 1.1,
  ncol = NULL,
  max.cutoff = "q98",
  min.cutoff = NA,
  crop = FALSE,
  col_pal = "inferno",
  legend.position = "top",
  combine = TRUE,
  ...
)

Arguments

seu

Seurat object (required).

features

Vector of features to plot.

title

Plot title

alpha

Controls opacity of spots. Provide as a vector specifying the min and max range of values (between 0 and 1).

pt.size.factor

Scale the size of the spots.

ncol

Number of columns for display when having multiple features.

max.cutoff

Vector of maximum cutoff values for each feature, may specify quantile in the form of 'q##' where '##' is the quantile (eg, 'q1', 'q10').

min.cutoff

Vector of minimum cutoff values for each feature, may specify quantile in the form of 'q##' where '##' is the quantile (eg, 'q1', 'q10').

crop

Crop the plot in to focus on points plotted. Set to FALSE to show entire background image.

col_pal

Continuous colour palette to use from viridis package, default "inferno".

legend.position

Position of legend, default "right" (set to "none" for clean plot).

combine

Combine plots into a single patchworked ggplot object. If FALSE, return a list of ggplot objects

...

Additional parameters passed to Seurat's SpatialFeaturePlot.

Value

A ggplot2 object.

Author

C.A.Kapourani C.A.Kapourani@ed.ac.uk