plotDimReduceModule {celda} | R Documentation

## Plotting the Celda module probability on a dimensionality reduction plot

### Description

Create a scatterplot for each row of a normalized gene expression matrix where x and y axis are from a data dimensionality reduction tool. The cells are colored by the module probability(s).

### Usage

    plotDimReduceModule(
      dim1,
      dim2,
      counts,
      celdaMod,
      modules = NULL,
      rescale = TRUE,
      size = 1,
      xlab = "Dimension_1",
      ylab = "Dimension_2",
      colorLow = "grey",
      colorMid = NULL,
      colorHigh = "blue",
      ncol = NULL
    )

### Arguments

`dim1` | Numeric vector. First dimension from data dimensionality reduction output.
`dim2` | Numeric vector. Second dimension from data dimensionality reduction output.
`counts` | Integer matrix. Rows represent features and columns represent cells. This matrix should be the same as the one used to generate 'celdaMod'.
`celdaMod` | Celda object of class "celda_G" or "celda_CG".
`modules` | Character vector. Module(s) from celda model to be plotted. e.g. c("1", "2").
`rescale` | Logical. Whether rows of the matrix should be rescaled to [0, 1]. Default TRUE.
`size` | Numeric. Sets size of point on plot. Default 1.
`xlab` | Character vector. Label for the x-axis. Default "Dimension_1".
`ylab` | Character vector. Label for the y-axis. Default "Dimension_2".
`colorLow` | Character. A color available from 'colors()'. The color will be used to signify the lowest values on the scale. Default 'grey'.
`colorMid` | Character. A color available from 'colors()'. The color will be used to signify the midpoint on the scale.
`colorHigh` | Character. A color available from 'colors()'. The color will be used to signify the highest values on the scale. Default 'blue'.
`ncol` | Integer. Passed to facet_wrap. Specify the number of columns for facet wrap.

### Value

The plot as a ggplot object

### Examples

    data(celdaCGSim, celdaCGMod)
    celdaTsne <- celdaTsne(counts = celdaCGSim$counts,
        celdaMod = celdaCGMod)
    plotDimReduceModule(
        dim1 = celdaTsne[, 1], dim2 = celdaTsne[, 2],
        counts = celdaCGSim$counts, celdaMod = celdaCGMod,
        modules = c("1", "2"))

[Package celda version 1.3.4 Index]