plotExpression {traviz} | R Documentation

## Plot gene expression along pseudotime.

### Description

Plot gene expression along pseudotime.

Plots a fast loess smoother of gene expression for each lineage.

### Usage

    plotExpression(counts, sds, gene, ...)

    ## S4 method for signature 'matrix,SlingshotDataSet,character'
    plotExpression(
      counts,
      sds,
      gene,
      type = "loess",
      span = 0.75,
      alpha = 1,
      lwd = 1,
      size = 2/3
    )

    ## S4 method for signature 'matrix,PseudotimeOrdering,character'
    plotExpression(
      counts,
      sds,
      gene,
      type = "loess",
      span = 0.75,
      alpha = 1,
      lwd = 1,
      size = 2/3
    )

### Arguments

`counts` | The matrix of gene expression counts.
`sds` | A `SlingshotDataSet` or `PseudotimeOrdering` object, typically obtained after trajectory inference using `Slingshot`.
`gene` | Gene name of gene to plot.
`...` | parameters including:
`type` | The type of smoother. Defaults to `"loess"`.
`span` | If `type` is `"loess"`, the `span` of the smoother. See `loess` documentation.
`alpha` | Numeric between 0 and 1, determines the transparency of data points, see `scale_color_viridis_d`.
`lwd` | Line width of the smoother. Passed to `geom_line`.
`size` | Character expansion of the data points. Passed to `geom_point`.

### Value

A `ggplot` object.

### Examples

    library(ggplot2)
    data(crv, package="traviz")
    data(counts, package="traviz")
    plotExpression(counts = counts, sds=crv, gene=rownames(counts)[1])

[Package traviz version 1.0.0 Index]