Skip to contents

Visualize spatial patterns of a single gene

Usage

plotGene(
  expr,
  clufitRes = NULL,
  coord,
  sc,
  gene,
  cellclu = NULL,
  background = FALSE,
  ...
)

Arguments

expr

The normalized gene expression matrix

clufitRes

The output from ctsvg_fit (NULL by default, original gene expression matrix)

coord

The matrix of spatial locations

sc

The named vector of cell cluster assignments

gene

Which gene to plot

cellclu

A character value indicating which cell cluster to plot (NULL by default, all cells)

background

Whether to plot all cells (FALSE by default)

...

The parameters in the geom_point(...) function

Value

A ggplot2 plot