plotMarkerMap: Plot ratio of observed to expected counts on reduced...

View source: R/plotFunctions.R

plotMarkerMapR Documentation

Plot ratio of observed to expected counts on reduced dimension map

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 likely a set of genes are to be soup derived on that map. That is, given a set of genes, this function calculates how many counts would be expected if that droplet were nothing but soup and compares that to the observed count. This is done via a log2 ratio of the two values. A Poisson test is performed and points that have a statistically significant enrichment over the background (at 5

Usage

plotMarkerMap(
  sc,
  geneSet,
  DR,
  ratLims = c(-2, 2),
  FDR = 0.05,
  useToEst = NULL,
  pointSize = 2,
  pointShape = 21,
  pointStroke = 0.5,
  naPointSize = 0.25
)

Arguments

sc

SoupChannel object.

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. Try and fetch automatically if missing.

ratLims

Truncate log ratios at these values.

FDR

False Discovery Rate for statistical test of enrichment over background.

useToEst

A vector (usually obtained from estimateNonExpressingCells), that will be used to mark cells instead of the usual Poisson test.

pointSize

Size of points

pointShape

Shape of points

pointStroke

Stroke size for points

naPointSize

Point size for NAs.

Value

A ggplot2 containing the plot.

Examples

gg = plotMarkerMap(scToy,'CD7')

constantAmateur/SoupX documentation built on Nov. 2, 2022, 10:16 a.m.