Draw a Manhattan-style plot of differential expression results by cell type.
Usage
DEtestManhattanPlot(
srt,
group.by = NULL,
test.use = "wilcox",
res = NULL,
DE_threshold = "avg_log2FC > 0 & p_val_adj < 0.05",
group_palette = "Paired",
group_palcolor = NULL,
pt.size = 1,
pt.alpha = 1,
cols.highlight = "black",
sizes.highlight = 1,
alpha.highlight = 1,
stroke.highlight = 0.5,
nlabel = 5,
features_label = NULL,
label.fg = "black",
label.bg = "white",
label.bg.r = 0.1,
label.size = 4,
palette = "RdBu",
palcolor = NULL,
theme_use = "theme_scop",
theme_args = list(),
manhattan.bg = "white",
jitter_width = 0.5,
jitter_height = 0.4,
aspect.ratio = NULL,
xlab = NULL,
ylab = NULL
)Arguments
- srt
An object of class
Seuratcontaining the results of differential expression analysis.- group.by
Name of one or more meta.data columns to group (color) cells by.
- test.use
A character string specifying the type of statistical test to use. Default is
"wilcox".- res
A
data.frameordata.tablewith differential expression results. Whenresis provided,srtwill be ignored. The data.frame must contain columns:gene,group1(factor or character),avg_log2FC,p_val_adj, and optionallypct.1andpct.2for calculatingdiff_pct.- DE_threshold
A character string specifying the threshold for differential expression (used to highlight significant genes in all plot types). Default is
"avg_log2FC > 0 & p_val_adj < 0.05".- group_palette
Palette for cell types (groups) in Manhattan plot. Default is
"Paired".- group_palcolor
Custom colors for cell types (groups) in Manhattan plot. Default is
NULL.- pt.size
The size of the points. Default is
1.- pt.alpha
The transparency of the data points. Default is
1.- cols.highlight
A character string specifying the color for highlighted points. Default is
"black".- sizes.highlight
The size of the highlighted points. Default is
1.- alpha.highlight
The transparency of the highlighted points. Default is
1.- stroke.highlight
The stroke width for the highlighted points. Default is
0.5.- nlabel
An integer value specifying the number of labeled points per group. Default is
5.- features_label
A character vector specifying the feature labels to plot. Default is
NULL.- label.fg
A character string specifying the color for the labels' foreground. Default is
"black".- label.bg
A character string specifying the color for the labels' background. Default is
"white".- label.bg.r
The radius of the rounding of the labels' background. Default is
0.1.- label.size
The size of the labels. Default is
4.- palette
Color palette name. Available palettes can be found in thisplot::show_palettes. Default is
"RdBu".- palcolor
Custom colors used to create a color palette. Default is
NULL.- theme_use
Theme to use for the plot. Default is
"theme_scop".- theme_args
A list of additional arguments to pass to the theme function. Default is
list().- manhattan.bg
Background color for Manhattan plot. Default is
"white".- jitter_width
Horizontal jitter range for points in Manhattan plot. Default is
0.5.- jitter_height
Vertical jitter range for points in Manhattan plot. Default is
0.4.- aspect.ratio
Aspect ratio of the panel. Default is
NULL.- xlab
A character string specifying the x-axis label.
- ylab
A character string specifying the y-axis label.
Examples
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
#> ℹ [2026-02-11 03:15:48] Start standard scop workflow...
#> ℹ [2026-02-11 03:15:49] Checking a list of <Seurat>...
#> ! [2026-02-11 03:15:49] Data 1/1 of the `srt_list` is "unknown"
#> ℹ [2026-02-11 03:15:49] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on the data 1/1 of the `srt_list`...
#> ℹ [2026-02-11 03:15:51] Perform `Seurat::FindVariableFeatures()` on the data 1/1 of the `srt_list`...
#> ℹ [2026-02-11 03:15:51] Use the separate HVF from srt_list
#> ℹ [2026-02-11 03:15:51] Number of available HVF: 2000
#> ℹ [2026-02-11 03:15:52] Finished check
#> ℹ [2026-02-11 03:15:52] Perform `Seurat::ScaleData()`
#> ℹ [2026-02-11 03:15:52] Perform pca linear dimension reduction
#> ℹ [2026-02-11 03:15:53] Perform `Seurat::FindClusters()` with `cluster_algorithm = 'louvain'` and `cluster_resolution = 0.6`
#> ℹ [2026-02-11 03:15:53] Reorder clusters...
#> ℹ [2026-02-11 03:15:53] Perform umap nonlinear dimension reduction
#> ℹ [2026-02-11 03:15:53] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2026-02-11 03:15:56] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ✔ [2026-02-11 03:15:59] Run scop standard workflow completed
pancreas_sub <- RunDEtest(
pancreas_sub,
group.by = "CellType",
only.pos = FALSE
)
#> ℹ [2026-02-11 03:15:59] Data type is log-normalized
#> ℹ [2026-02-11 03:15:59] Start differential expression test
#> ℹ [2026-02-11 03:16:00] Find all markers(wilcox) among [1] 5 groups...
#> ℹ [2026-02-11 03:16:00] Using 1 core
#> ⠙ [2026-02-11 03:16:00] Running for Ductal [1/5] ■■■■■■■ …
#> ✔ [2026-02-11 03:16:00] Completed 5 tasks in 1s
#>
#> ℹ [2026-02-11 03:16:00] Building results
#> ✔ [2026-02-11 03:16:01] Differential expression test completed
DEtestManhattanPlot(
pancreas_sub,
group.by = "CellType"
)