plotChangeMap {SoupX}R Documentation

Plot maps comparing corrected/raw expression

Description

Given some reduced dimensional representation of the data (such as UMAP or tSNE) that has been calculated however you would like, this provides a way to visualise how the expression of a geneSet changes after soup correction.

Usage

plotChangeMap(
  sc,
  cleanedMatrix,
  geneSet,
  DR,
  dataType = c("soupFrac", "binary", "counts"),
  logData = FALSE,
  pointSize = 0.5
)

Arguments

sc

SoupChannel object.

cleanedMatrix

A cleaned matrix to compare against the raw one. Usually the output of adjustCounts.

geneSet

A vector with the names of the genes to aggregate and plot evidence for.

DR

A data.frame, with rows named by unique cell IDs (i.e., <ChannelName>_<Barcode>) the first two columns of which give the coordinates of each cell in some reduced dimension representation of the data.

dataType

How should data be represented. Binary sets each cell to expressed or not, counts converts everything to counts, soupFrac plots the fraction of the observed counts that are identified as contamination (i.e., (old-new)/old) for each cell and is the default.

logData

Should we log the thing we plot?

pointSize

Size of points

Value

A ggplot2 containing the plot.

Examples

out = adjustCounts(scToy)
gg = plotChangeMap(scToy,out,'S100A9')

[Package SoupX version 1.6.2 Index]