demux.SNP.summary {dittoSeq} | R Documentation

## Plots the number of SNPs sequenced per droplet

### Description

Plots the number of SNPs sequenced per droplet

### Usage

    demux.SNP.summary(
      object,
      group.by = "Lane",
      color.by = group.by,
      plots = c("jitter", "boxplot"),
      boxplot.color = "grey30",
      add.line = 50,
      min = 0,
      ...
    )

### Arguments

`object` | A Seurat or SingleCellExperiment object
`group.by` | String "name" of a metadata to use for grouping values. Default is "Lane".
`color.by` | String "name" of a metadata to use for coloring. Default is whatever was provided to `group.by`.
`plots` | String vector which sets the types of plots to include: possibilities = "jitter", "boxplot", "vlnplot", "ridgeplot". NOTE: The order matters, so use c("back","middle","front") when inputing multiple to put them in the order you want.
`boxplot.color` | The color of the lines of the boxplot.
`add.line` | numeric value(s) where a dashed horizontal line should go. Default = 50, a high confidence minimum number of SNPs per cell for highly accurate demuxlet sample deconvolution.
`min` | numeric value which sets the minimum value shown on the y-axis.
`...` | extra arguments passed to `dittoPlot`

### Details

This function is a wrapper that essentially runs `dittoPlot``("demux.N.SNP")` with a few modified defaults. The altered defaults:

- Data is grouped and colored by the "Lane" metadata (unless `group.by` or `color.by` are adjusted otherwise).

- Data is displayed as boxplots with gray lines on top of dots for individual cells (unless `plots` or `boxplot.color` are adjusted otherwise).

- The plot is set to have minimum y axis value of zero (unless `min` is adjusted otherwise).

- A dashed line is added at the value 50, a very conservative minimum number of SNPs for high confidence sample calls (unless `add.line` is adjusted otherwise).

### Value

A ggplot, made with `dittoPlot` showing a summary of how many SNPs were available to Demuxlet for each cell of a dataset.

Alternatively, a plotly object if `data.hover = TRUE` is provided.

Alternatively, list containing a ggplot and the underlying data as a dataframe if `data.out = TRUE` is provided.

### Author(s)

Daniel Bunis

### See Also

`demux.calls.summary` for plotting the number of sample annotations assigned within each lane. This is the other Demuxlet-associated QC visualization included with dittoSeq.

`dittoPlot`, as `demux.SNP.summary` is essentially just a `dittoPlot` wrapper.

`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.SNP.summary(myRNA)

    #Function wraps dittoPlot. See dittoPlot docs for more examples

[Package dittoSeq version 1.0.2 Index]