Plot Scissor results
Usage
ScissorPlot(
srt,
plot_type = c("umap", "heatmap", "bar", "upset", "rose", "ring", "pie", "dot"),
reduction = NULL,
prefix = "Scissor",
group.by = NULL,
split.by = NULL,
features = NULL,
nfeatures = 50,
feature_method = c("variance", "status_diff", "coef_cor", "input_order"),
tool_name = "Scissor",
status = c("Scissor+", "Scissor-"),
include.background = TRUE,
upset_top_n = NULL,
cells = NULL,
layer = "data",
assay = NULL,
max_cells = 100,
cell_order = NULL,
exp_method = "zscore",
stat_type = c("percent", "count"),
combine = TRUE,
nrow = NULL,
ncol = NULL,
byrow = TRUE,
pt.size = NULL,
pt.alpha = 1,
palette = "Chinese",
palcolor = NULL,
heatmap_palette = "RdBu",
group_palette = "Chinese",
group_palcolor = NULL,
cell_annotation = NULL,
cell_annotation_palette = "Chinese",
cell_annotation_palcolor = NULL,
show_row_names = FALSE,
show_column_names = FALSE,
cluster_rows = FALSE,
cluster_columns = FALSE,
theme_use = "theme_scop",
theme_args = list(),
verbose = TRUE,
...
)Arguments
- srt
A
Seuratobject after RunScissor.- plot_type
Plot type.
"umap"shows embedding panels,"heatmap"shows aFeatureHeatmap, and statistical views such as"bar"and"upset"are drawn with thisplot::StatPlot.- reduction
Reduction to plot.
NULLuses DefaultReduction.- prefix
Prefix used by RunScissor.
- group.by
Optional metadata column shown together with Scissor status. For
"heatmap", the default is the Scissor status column. For statistical plots, it is passed to thisplot::StatPlot, except that"upset"uses it to split Scissor status distributions by group.- split.by
Metadata column to facet by.
- features
Features to plot.
- nfeatures
Number of features to show when
plot_type = "heatmap"andfeatures = NULL.- feature_method
Method used to rank heatmap features when
features = NULL."variance"ranks genes by variance in selected cells,"status_diff"ranks by the largest mean-expression difference between Scissor status groups,"coef_cor"ranks by absolute correlation with Scissor coefficients, and"input_order"keeps the RunScissor input order.- tool_name
Name of the
srt@toolsentry created by RunScissor.- status
Scissor status levels included in the heatmap.
- include.background
Whether to include background cells in heatmap and background status in upset plots.
- upset_top_n
Maximum number of
group.bylevels to show inplot_type = "upset". The most frequent levels are kept.NULLkeeps all.- cells
Cell names to include.
- layer
Assay layer to use.
- assay
Assay to use.
NULLuses the default assay.- max_cells
An integer, maximum number of cells to sample per group.
- cell_order
A vector of cell names defining the order of cells.
- exp_method
Expression transform:
"zscore","raw","fc","log2fc", or"log1p".- stat_type
The type of statistic to compute for the plot. Can be one of
"percent","count", or"value". Continuous value mode supportsplot_type = "bar"andplot_type = "dot".- combine
Whether to combine UMAP panels or StatPlot panels.
- nrow, ncol, byrow
Layout parameters passed to
patchwork::wrap_plots()or thisplot::StatPlot.- pt.size, pt.alpha
Point size and transparency.
pt.size = NULLscales withsqrt(n)(minimum0.3). Rasterized points keep at least a two-pixel radius atraster.dpi = c(512, 512)and scale withraster.dpi.- palette, palcolor
Palette name (thisplot::show_palettes) or custom colors.
- heatmap_palette
Palette used for CNV heatmap values.
- group_palette
Palette for cell types (groups) in Manhattan plot.
- group_palcolor
Custom colors for cell types (groups) in Manhattan plot.
- cell_annotation
Cell annotations. Palette length should match
cell_annotation.- cell_annotation_palette
Color palette for cell-type annotations.
- cell_annotation_palcolor
Custom colors for cell-type annotations.
- show_row_names
Whether to draw row/column names for the heatmap body.
- show_column_names
Whether to draw row/column names for the heatmap body.
- cluster_rows
Whether to cluster heatmap rows/columns. Defaults are both
FALSE.- cluster_columns
Whether to cluster heatmap rows/columns. Defaults are both
FALSE.- theme_use, theme_args
Theme used by thisplot::StatPlot.
- verbose
Whether to print messages.
- ...
Additional arguments passed to CellDimPlot, FeatureDimPlot, FeatureHeatmap, or thisplot::StatPlot, depending on
plot_type.
Value
A ggplot/patchwork object for embedding and statistical plots, or a
list returned by FeatureHeatmap for plot_type = "heatmap".
Examples
data(panc8_sub)
data(islet_bulk)
panc8_sub <- RunScissor(
panc8_sub,
bulk_dataset = islet_bulk,
condition.by = "condition",
positive = "bfa",
family = "binomial",
features = head(intersect(
rownames(panc8_sub),
rownames(SummarizedExperiment::assay(islet_bulk, "counts"))
), 1000),
alpha = 0.2,
cutoff = 0.5
)
#> ℹ [2026-08-30 05:54:35] Build a temporary Scissor-style SNN graph
#> ℹ [2026-08-30 05:55:30] Scissor alpha 0.2 selected 1 positive and 501 negative cells (31.375%)
#> ✔ [2026-08-30 05:55:30] Scissor stored 1 Scissor+ and 501 Scissor- cells
panc8_sub <- RunStandardWorkflow(panc8_sub, verbose = FALSE)
#> ℹ [2026-08-30 05:55:32] Skip `log1p()` because `layer = data` is not "counts"
ScissorPlot(
panc8_sub,
xlab = "UMAP_1",
ylab = "UMAP_2"
)
ScissorPlot(
panc8_sub,
group.by = "celltype",
xlab = "UMAP_1",
ylab = "UMAP_2"
)
ht <- ScissorPlot(
panc8_sub,
plot_type = "heatmap",
group.by = "celltype"
)
ht$plot
ScissorPlot(
panc8_sub,
plot_type = "bar",
group.by = "celltype"
)
ScissorPlot(
panc8_sub,
plot_type = "upset"
)
#> `geom_line()`: Each group consists of only one observation.
#> ℹ Do you need to adjust the group aesthetic?
#> `geom_line()`: Each group consists of only one observation.
#> ℹ Do you need to adjust the group aesthetic?
ScissorPlot(
panc8_sub,
plot_type = "rose",
label = TRUE
)
ScissorPlot(
panc8_sub,
plot_type = "ring",
label = TRUE
)
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_col()`).
ScissorPlot(
panc8_sub,
plot_type = "pie",
label = TRUE
)
ScissorPlot(
panc8_sub,
plot_type = "dot",
label = TRUE
)