plotMolecules {ggspavis} | R Documentation

## plotMolecules

### Description

Plotting functions for spatially resolved transcriptomics data.

### Usage

    plotMolecules(
      spe,
      molecule = NULL,
      x_coord = "x",
      y_coord = "y",
      palette = c("gray90", "navy"),
      size = 0.3
    )

### Arguments

`spe` | (SpatialExperiment) Input data, assumed to be a `SpatialExperiment` object.
`molecule` | (character) Name of mRNA molecule to plot (assumed to match one of the row names of `rowData`).
`x_coord` | (character) Name of column in `spatialCoords` containing x-coordinates of the cell centroids. Default = "x".
`y_coord` | (character) Name of column in `spatialCoords` containing y-coordinates of the cell centroids. Default = "y".
`palette` | (character) Color palette, provided as a vector of length 2 for the low and high range. Default = `c("gray90", "navy")`.
`size` | (numeric) Point size for `geom_point()`. Default = 0.3.

### Details

Function to plot molecule-based spatially resolved transcriptomics data stored in a `SpatialExperiment` object.

This function generates a plot in spatial coordinates (e.g. x-y coordinates on a tissue slide), for a selected molecule.

### Value

Returns a ggplot object. Additional plot elements can be added as ggplot elements (e.g. title, labels, formatting, etc).

### Examples

    library(STexampleData)
    spe <- seqFISH_mouseEmbryo()
    plotMolecules(spe, molecule = "Sox2")

[Package ggspavis version 1.0.0 Index]