Skip to contents

Takes the output of SummarizeFilters, or a SpatialMap object, and plots key findings from the FilterCodex function.

Usage

plotFilterSummary(
  object,
  group.variable = "Region",
  qc.var = ".qc_result",
  sort = FALSE,
  across = NA,
  other.threshold = 50
)

Arguments

object

SpatialMap object

group.variable

What to group the data by. The default is to show results by Region.

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").

sort

Whether to sort the data by how many cells pass

across

Deprecated. Alias for group.variable.

other.threshold

An integer. If a category in qc.var has fewer cells

Value

A list of three ggplot plots:

  1. A stacked bar chart showing the results of QC filtering for each category in group.variable (e.g. each Region).

  2. A stacked bar chart showing the results of QC filtering for the entire object. Also, contains a color legend that applies to the first plot as well as this plot.

  3. A scatter plot showing the relationship between the number of failing cells and the total number of cells for each category in group.variable. In some cases regions with very few cells have a high proportion of failing cells, which may indicate that the image as a whole is too poor quality to be included in further analysis.

Details

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

See also

Scroll to top