SpaPlot: Spatial heatmap

View source: R/SetClass.R

SpaPlotR Documentation

Spatial heatmap

Description

Plot spatial heatmap for a Seurat object with spatial transcriptomics data.

Usage

  SpaPlot(seuInt, batch=NULL, item=NULL, point_size=2,text_size=12, 
                    cols=NULL,font_family='', border_col="gray10",
                    fill_col='white', ncol=2, combine = TRUE,
                    title_name="Sample", ...)

Arguments

seuInt

an object named "Seurat".

batch

an optional positive integer or integer vector, specify the batches to be extracted. Users can check the batches' names by unique(seuInt$batch).

item

an optional string, which column is plotted in the meta data of seuInt. Users can check the meta data by head(seuInt@meta.data). If item takes value from ("RGB_UMAP", "RGB_tSNE"), this function will plot the RGB plot.

point_size

the size of point in the scatter plot.

text_size

the text size in the plot.

cols

colors used in the plot

font_family

the font family used for the plot, default as Times New Roman.

border_col

the border color in the plot.

fill_col

the color used in backgroup.

ncol

the number of columns in the layout of plots.

combine

an optional logical value, whether plot all on a figure. If TRUE, all figures are plotted; otherwise, return a list with each plot as component.

title_name

an optional string, title name in the plot.

...

other arguments passed to plot_scatter

.

Details

Nothing

Value

Return a ggplot2 object or list of ggplots objects.

Note

nothing

Author(s)

Wei Liu

See Also

None

Examples


  data(PRECASTObj)
  PRECASTObj <- SelectModel(PRECASTObj)
  seuInt <- IntegrateSpaData(PRECASTObj, species='unknown')
  SpaPlot(seuInt)
  

PRECAST documentation built on May 29, 2024, 3 a.m.