Skip to contents

Function that wraps plotRepresentation. Visualizes the results of the QCMetrics %>% FilterCodex pipeline, showing the distribution of cells on the chosen representation and their filtering results (by default, showing the spatial distribution). Produces a list of ggplot2 plots (may be a list of one depending on the value passed to analyze) which can subsequently be printed, uploaded, or saved.

Usage

plotFilteredCells(
  object,
  representation = "spatial",
  plot.titles.from = NULL,
  plot.title = NULL,
  qc.var = ".qc_result",
  ...,
  analyze = "regions"
)

plotFilteredCells.SpatialMap(
  object,
  representation = "spatial",
  plot.titles.from = NULL,
  qc.var = ".qc_result",
  ...,
  analyze = "regions"
)

plotFilteredCells.Region(
  object,
  representation = "spatial",
  plot.title = NULL,
  qc.var = ".qc_result",
  ...
)

Arguments

object

A SpatialMap object

representation

Which representation to plot on?

plot.titles.from

A projectMetadata or cellMetadata column from which to pull plot titles, e.g. "region_display_label" (for SpatialMap or Region objects, respectively). Takes precedence over plot.title. Only tested when the activeAnalysis is "regions"

plot.title

Plot title

qc.var

The name of the QC results column in cellMetadata that will detail the QC results for each cell. Should represent a categorical variable, with values including "pass" and comma-separated reasons for why a cell failed QC (e.g., "DNA, signal sum").

...

Other arguments passed to plotRepresentation

analyze

What to analyze (and how). The options are "regions", NULL (activeAnalysis), the name of a currently existing formal analysis, or the name of a column in object's projectMetadata (an "informal" analysis).

Value

A ggplot object

Details

See vignette("AnalysisGuide2_QC_with_SpatialMap") for a representative workflow that uses this function.

See also

Scroll to top