demux.calls.summary {dittoSeq} | R Documentation

## Plots the number of annotations per sample, per lane

### Description

Plots the number of annotations per sample, per lane

### Usage

    demux.calls.summary(
      object,
      singlets.only = FALSE,
      main = "Sample Annotations by Lane",
      sub = NULL,
      ylab = "Annotations",
      xlab = "Sample",
      color = dittoColors()[2],
      theme = NULL,
      rotate.labels = TRUE,
      data.out = FALSE
    )

### Arguments

`object` | A Seurat or SingleCellExperiment object
`singlets.only` | Whether to only show data for cells called as singlets by demuxlet. Default is TRUE. Note: if doublets are included, only one of their sample calls will be used.
`main` | plot title. Default = "Sample Annotations by Lane"
`sub` | plot subtitle
`ylab` | y axis label, default is "Annotations"
`xlab` | x axis label, default is "Sample"
`color` | bars color. Default is the dittoColors skyBlue.
`theme` | A complete ggplot theme. Default is a slightly modified theme_bw().
`rotate.labels` | whether sample names / x-axis labels should be rotated or not. Default is TRUE.
`data.out` | Logical, whether underlying data for the plot should be output instead of the plot itself.

### Value

A faceted ggplot summarizing how many cells in each lane were anotated to each sample. Assumes that the Sample calls of each cell, and which lane each cell belonged to, are stored in 'Sample' and 'Lane' metadata slots, respectively, as would be the case if demuxlet information was imported with `importDemux`.

Alternatively, value will be a data.frame containing the underlying data if `data.out = TRUE` is provided.

### Author(s)

Daniel Bunis

### See Also

`demux.SNP.summary` for plotting the number of SNPs measured per cell. This is the other Demuxlet-associated QC visualization included with dittoSeq.

`importDemux`, for how to import relevant demuxlet information as metadata.

Kang et al. Nature Biotechnology, 2018 https://www.nature.com/articles/nbt.4042 for more information about the demuxlet cell-sample deconvolution method.

### Examples

    example(importDemux, echo = FALSE)

    demux.calls.summary(myRNA)

    # Exclude doublets by setting 'singlets only = TRUE'
    demux.calls.summary(myRNA,
        singlets.only = TRUE)

    # To return the underlying data.frame
    demux.calls.summary(myRNA, data.out = TRUE)

[Package dittoSeq version 1.4.4 Index]