plotPhenoData {scater} | R Documentation

## Plot cell phenotype data from an SingleCellExperiment object

### Description

`plotPhenoData`, `plotColData` and `plotCellData` are synonymous.

### Usage

    plotPhenoData(object, aesth = aes_string(x = "log10(total_counts)", y =
      "total_features"), ...)

    plotColData(...)

    plotCellData(...)

### Arguments

`object` | an `SingleCellExperiment` object containing expression values and experimental information. Must have been appropriately prepared.
`aesth` | aesthetics function call to pass to ggplot. This function expects at least x and y variables to be supplied. The default is to plot total_features against log10(total_counts).
`...` | arguments passed to `plotPhenoData` (if `plotColData` or `plotCellData`) or to `plotMetadata`, e.g.`theme_size`, `size`, `alpha`, `shape`.

### Details

Plot phenotype data from a SingleCellExperiment object. If one variable is supplied then a density plot will be returned. If both variables are continuous (numeric) then a scatter plot will be returned. If one variable is discrete and one continuous then a violin plot with jittered points overlaid will be returned. If both variables are discrete then a jitter plot will be produced. The object returned is a ggplot object, so further layers and plotting options (titles, facets, themes etc) can be added.

### Value

a ggplot plot object

### Examples

    data("sc_example_counts")
    data("sc_example_cell_info")
    example_sce <- SingleCellExperiment(
    assays = list(counts = sc_example_counts), colData = sc_example_cell_info)
    example_sce <- calculateQCMetrics(example_sce)
    plotPhenoData(example_sce, aesth = aes_string(x = "log10(total_counts)",
    y = "total_features", colour = "Mutation_Status"))

    plotColData(example_sce, aesth = aes_string(x = "log10(total_counts)",
    y = "total_features", colour = "Mutation_Status"))

    plotCellData(example_sce, aesth = aes_string(x = "log10(total_counts)",
    y = "total_features", colour = "Mutation_Status"))

[Package scater version 1.6.3 Index]