
Plot Filtered Cells in Spatial Context, or by Other Representations
plotFilteredCells.Rd
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
orcellMetadata
column from which to pull plot titles, e.g."region_display_label"
(for SpatialMap or Region objects, respectively). Takes precedence overplot.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
'sprojectMetadata
(an "informal" analysis).
Details
See vignette("AnalysisGuide2_QC_with_SpatialMap")
for a representative workflow that uses this function.