Plotting cell points on a reduced 2D plane and coloring according to the groups.
Usage
CellDimPlot(
srt,
group.by,
reduction = NULL,
dims = c(1, 2),
split.by = NULL,
cells = NULL,
show_na = FALSE,
show_stat = ifelse(identical(theme_use, "theme_blank"), FALSE, TRUE),
pt.size = NULL,
pt.alpha = 1,
palette = "Paired",
palcolor = NULL,
bg_color = "grey80",
label = FALSE,
label.size = 4,
label.fg = "white",
label.bg = "black",
label.bg.r = 0.1,
label_insitu = FALSE,
label_repel = FALSE,
label_repulsion = 20,
label_point_size = 1,
label_point_color = "black",
label_segment_color = "black",
cells.highlight = NULL,
cols.highlight = "black",
sizes.highlight = 1,
alpha.highlight = 1,
stroke.highlight = 0.5,
add_density = FALSE,
density_color = "grey80",
density_filled = FALSE,
density_filled_palette = "Greys",
density_filled_palcolor = NULL,
add_mark = FALSE,
mark_type = c("hull", "ellipse", "rect", "circle"),
mark_expand = grid::unit(3, "mm"),
mark_alpha = 0.1,
mark_linetype = 1,
lineages = NULL,
lineages_trim = c(0.01, 0.99),
lineages_span = 0.75,
lineages_palette = "Dark2",
lineages_palcolor = NULL,
lineages_arrow = grid::arrow(length = grid::unit(0.1, "inches")),
lineages_linewidth = 1,
lineages_line_bg = "white",
lineages_line_bg_stroke = 0.5,
lineages_whiskers = FALSE,
lineages_whiskers_linewidth = 0.5,
lineages_whiskers_alpha = 0.5,
stat.by = NULL,
stat_type = "percent",
stat_plot_type = "pie",
stat_plot_position = c("stack", "dodge"),
stat_plot_size = 0.15,
stat_plot_palette = "Set1",
stat_palcolor = NULL,
stat_plot_alpha = 1,
stat_plot_label = FALSE,
stat_plot_label_size = 3,
graph = NULL,
edge_size = c(0.05, 0.5),
edge_alpha = 0.1,
edge_color = "grey40",
paga = NULL,
paga_type = "connectivities",
paga_node_size = 4,
paga_edge_threshold = 0.01,
paga_edge_size = c(0.2, 1),
paga_edge_color = "grey40",
paga_edge_alpha = 0.5,
paga_transition_threshold = 0.01,
paga_transition_size = c(0.2, 1),
paga_transition_color = "black",
paga_transition_alpha = 1,
paga_show_transition = FALSE,
velocity = NULL,
velocity_plot_type = "raw",
velocity_n_neighbors = ceiling(ncol(srt@assays[[1]])/50),
velocity_density = 1,
velocity_smooth = 0.5,
velocity_scale = 1,
velocity_min_mass = 1,
velocity_cutoff_perc = 5,
velocity_arrow_color = "black",
velocity_arrow_angle = 20,
streamline_L = 5,
streamline_minL = 1,
streamline_res = 1,
streamline_n = 15,
streamline_width = c(0, 0.8),
streamline_alpha = 1,
streamline_color = NULL,
streamline_palette = "RdYlBu",
streamline_palcolor = NULL,
streamline_bg_color = "white",
streamline_bg_stroke = 0.5,
hex = FALSE,
hex.linewidth = 0.5,
hex.count = TRUE,
hex.bins = 50,
hex.binwidth = NULL,
raster = NULL,
raster.dpi = c(512, 512),
aspect.ratio = 1,
title = NULL,
subtitle = NULL,
xlab = NULL,
ylab = NULL,
legend.position = "right",
legend.direction = "vertical",
theme_use = "theme_scop",
theme_args = list(),
combine = TRUE,
nrow = NULL,
ncol = NULL,
byrow = TRUE,
force = FALSE,
seed = 11
)
Arguments
- srt
A Seurat object.
- group.by
Name of one or more meta.data columns to group (color) cells by (for example, orig.ident).
- reduction
Which dimensionality reduction to use. If not specified, will use the reduction returned by DefaultReduction.
- dims
Dimensions to plot, must be a two-length numeric vector specifying x- and y-dimensions
- split.by
Name of a column in meta.data column to split plot by.
- cells
Subset cells to plot.
- show_na
Whether to assign a color from the color palette to NA group. If
FALSE
, cell points with NA level will colored bybg_color
.- show_stat
Whether to show statistical information on the plot.
- pt.size
Point size.
- pt.alpha
Point transparency.
- palette
Name of a color palette name collected in scop. Default is "Paired".
- palcolor
Custom colors used to create a color palette.
- bg_color
Color value for background(NA) points.
- label
Whether to label the cell groups.
- label.size
Size of labels.
- label.fg
Foreground color of label.
- label.bg
Background color of label.
- label.bg.r
Background ratio of label.
- label_insitu
Whether to place the raw labels (group names) in the center of the cells with the corresponding group. Default is
FALSE
, which using numbers instead of raw labels.- label_repel
Logical value indicating whether the label is repel away from the center points.
- label_repulsion
Force of repulsion between overlapping text labels. Defaults to 20.
- label_point_size
Size of the center points.
- label_point_color
Color of the center points.
- label_segment_color
Color of the line segment for labels.
- cells.highlight
A vector of cell names to highlight.
- cols.highlight
Color used to highlight the cells.
- sizes.highlight
Size of highlighted cell points.
- alpha.highlight
Transparency of highlighted cell points.
- stroke.highlight
Border width of highlighted cell points.
- add_density
Whether to add a density layer on the plot.
- density_color
Color of the density contours lines.
- density_filled
Whether to add filled contour bands instead of contour lines.
- density_filled_palette
Color palette used to fill contour bands.
- density_filled_palcolor
Custom colors used to fill contour bands.
- add_mark
Whether to add marks around cell groups. Default is
FALSE
.- mark_type
Type of mark to add around cell groups. One of "hull", "ellipse", "rect", or "circle". Default is "hull".
- mark_expand
Expansion of the mark around the cell group. Default is
grid::unit(3, "mm")
.- mark_alpha
Transparency of the mark. Default is 0.1.
- mark_linetype
Line type of the mark border. Default is 1 (solid line).
- lineages
Lineages/pseudotime to add to the plot. If specified, curves will be fitted using stats::loess method.
- lineages_trim
Trim the leading and the trailing data in the lineages.
- lineages_span
The parameter α which controls the degree of smoothing in stats::loess method.
- lineages_palette
Color palette used for lineages.
- lineages_palcolor
Custom colors used for lineages.
- lineages_arrow
Set arrows of the lineages. See grid::arrow.
- lineages_linewidth
Width of fitted curve lines for lineages.
- lineages_line_bg
Background color of curve lines for lineages.
- lineages_line_bg_stroke
Border width of curve lines background.
- lineages_whiskers
Whether to add whiskers for lineages.
- lineages_whiskers_linewidth
Width of whiskers for lineages.
- lineages_whiskers_alpha
Transparency of whiskers for lineages.
- stat.by
The name of a metadata column to stat.
- stat_type
Set stat types ("percent" or "count").
- stat_plot_type
Set the statistical plot type.
- stat_plot_position
Position adjustment in statistical plot.
- stat_plot_size
Set the statistical plot size. Defaults to 0.1
- stat_plot_palette
Color palette used in statistical plot.
- stat_palcolor
Custom colors used in statistical plot
- stat_plot_alpha
Transparency of the statistical plot.
- stat_plot_label
Whether to add labels in the statistical plot.
- stat_plot_label_size
Label size in the statistical plot.
- graph
Specify the graph name to add edges between cell neighbors to the plot.
- edge_size
Size of edges.
- edge_alpha
Transparency of edges.
- edge_color
Color of edges.
- paga
Specify the calculated paga results to add a PAGA graph layer to the plot.
- paga_type
PAGA plot type. "connectivities" or "connectivities_tree".
- paga_node_size
Size of the nodes in PAGA plot.
- paga_edge_threshold
Threshold of edge connectivities in PAGA plot.
- paga_edge_size
Size of edges in PAGA plot.
- paga_edge_color
Color of edges in PAGA plot.
- paga_edge_alpha
Transparency of edges in PAGA plot.
- paga_transition_threshold
Threshold of transition edges in PAGA plot.
- paga_transition_size
Size of transition edges in PAGA plot.
- paga_transition_color
Color of transition edges in PAGA plot.
- paga_transition_alpha
Transparency of transition edges in PAGA plot.
- paga_show_transition
Whether to show transitions between edges.
- velocity
Specify the calculated RNA velocity mode to add a velocity layer to the plot.
- velocity_plot_type
Set the velocity plot type.
- velocity_n_neighbors
Set the number of neighbors used in velocity plot.
- velocity_density
Set the density value used in velocity plot.
- velocity_smooth
Set the smooth value used in velocity plot.
- velocity_scale
Set the scale value used in velocity plot.
- velocity_min_mass
Set the min_mass value used in velocity plot.
- velocity_cutoff_perc
Set the cutoff_perc value used in velocity plot.
- velocity_arrow_color
Color of arrows in velocity plot.
- velocity_arrow_angle
Angle of arrows in velocity plot.
- streamline_L
Typical length of a streamline in x and y units
- streamline_minL
Minimum length of segments to show.
- streamline_res
Resolution parameter (higher numbers increases the resolution).
- streamline_n
Number of points to draw.
- streamline_width
Size of streamline.
- streamline_alpha
Transparency of streamline.
- streamline_color
Color of streamline.
- streamline_palette
Color palette used for streamline.
- streamline_palcolor
Custom colors used for streamline.
- streamline_bg_color
Background color of streamline.
- streamline_bg_stroke
Border width of streamline background.
- hex
Whether to chane the plot type from point to the hexagonal bin.
- hex.linewidth
Border width of hexagonal bins.
- hex.count
Whether show cell counts in each hexagonal bin.
- hex.bins
Number of hexagonal bins.
- hex.binwidth
Hexagonal bin width.
- raster
Convert points to raster format, default is NULL which automatically rasterizes if plotting more than 100,000 cells
- raster.dpi
Pixel resolution for rasterized plots, passed to geom_scattermore(). Default is c(512, 512).
- aspect.ratio
Aspect ratio of the panel.
- title
The text for the title.
- subtitle
The text for the subtitle for the plot which will be displayed below the title.
- xlab
x-axis label.
- ylab
y-axis label.
- legend.position
The position of legends ("none", "left", "right", "bottom", "top").
- legend.direction
Layout of items in legends ("horizontal" or "vertical")
- theme_use
Theme used. Can be a character string or a theme function. For example,
"theme_blank"
or ggplot2::theme_classic.- theme_args
Other arguments passed to the
theme_use
.- combine
Combine plots into a single
patchwork
object. IfFALSE
, return a list of ggplot objects.- nrow
Number of rows in the combined plot.
- ncol
Number of columns in the combined plot.
- byrow
Logical value indicating if the plots should be arrange by row (default) or by column.
- force
Whether to force drawing regardless of maximum levels in any cell group is greater than 100.
- seed
Random seed set for reproducibility
Examples
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
#> ℹ [2025-09-20 13:01:44] Start standard scop workflow...
#> ℹ [2025-09-20 13:01:45] Checking a list of <Seurat> object...
#> ! [2025-09-20 13:01:45] Data 1/1 of the `srt_list` is "unknown"
#> ℹ [2025-09-20 13:01:45] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on the data 1/1 of the `srt_list`...
#> ℹ [2025-09-20 13:01:47] Perform `Seurat::FindVariableFeatures()` on the data 1/1 of the `srt_list`...
#> ℹ [2025-09-20 13:01:47] Use the separate HVF from srt_list
#> ℹ [2025-09-20 13:01:47] Number of available HVF: 2000
#> ℹ [2025-09-20 13:01:47] Finished check
#> ℹ [2025-09-20 13:01:48] Perform `Seurat::ScaleData()`
#> Warning: Different features in new layer data than already exists for scale.data
#> ℹ [2025-09-20 13:01:48] Perform pca linear dimension reduction
#> StandardPC_ 1
#> Positive: Aplp1, Cpe, Gnas, Fam183b, Map1b, Hmgn3, Pcsk1n, Chga, Tuba1a, Bex2
#> Syt13, Isl1, 1700086L19Rik, Pax6, Chgb, Scgn, Rbp4, Scg3, Gch1, Camk2n1
#> Cryba2, Pcsk2, Pyy, Tspan7, Mafb, Hist3h2ba, Dbpht2, Abcc8, Rap1b, Slc38a5
#> Negative: Spp1, Anxa2, Sparc, Dbi, 1700011H14Rik, Wfdc2, Gsta3, Adamts1, Clu, Mgst1
#> Bicc1, Ldha, Vim, Cldn3, Cyr61, Rps2, Mt1, Ptn, Phgdh, Nudt19
#> Smtnl2, Smco4, Habp2, Mt2, Col18a1, Rpl12, Galk1, Cldn10, Acot1, Ccnd1
#> StandardPC_ 2
#> Positive: Rbp4, Tagln2, Tuba1b, Fkbp2, Pyy, Pcsk2, Iapp, Tmem27, Meis2, Tubb4b
#> Pcsk1n, Dbpht2, Rap1b, Dynll1, Tubb2a, Sdf2l1, Scgn, 1700086L19Rik, Scg2, Abcc8
#> Atp1b1, Hspa5, Fam183b, Papss2, Slc38a5, Scg3, Mageh1, Tspan7, Ppp1r1a, Ociad2
#> Negative: Neurog3, Btbd17, Gadd45a, Ppp1r14a, Neurod2, Sox4, Smarcd2, Mdk, Pax4, Btg2
#> Sult2b1, Hes6, Grasp, Igfbpl1, Gpx2, Cbfa2t3, Foxa3, Shf, Mfng, Tmsb4x
#> Amotl2, Gdpd1, Cdc14b, Epb42, Rcor2, Cotl1, Upk3bl, Rbfox3, Cldn6, Cer1
#> StandardPC_ 3
#> Positive: Nusap1, Top2a, Birc5, Aurkb, Cdca8, Pbk, Mki67, Tpx2, Plk1, Ccnb1
#> 2810417H13Rik, Incenp, Cenpf, Ccna2, Prc1, Racgap1, Cdk1, Aurka, Cdca3, Hmmr
#> Spc24, Kif23, Sgol1, Cenpe, Cdc20, Hist1h1b, Cdca2, Mxd3, Kif22, Ska1
#> Negative: Anxa5, Pdzk1ip1, Acot1, Tpm1, Anxa2, Dcdc2a, Capg, Sparc, Ttr, Pamr1
#> Clu, Cxcl12, Ndrg2, Hnf1aos1, Gas6, Gsta3, Krt18, Ces1d, Atp1b1, Muc1
#> Hhex, Acadm, Spp1, Enpp2, Bcl2l14, Sat1, Smtnl2, 1700011H14Rik, Tgm2, Fam159a
#> StandardPC_ 4
#> Positive: Glud1, Tm4sf4, Akr1c19, Cldn4, Runx1t1, Fev, Pou3f4, Gm43861, Pgrmc1, Arx
#> Cd200, Lrpprc, Hmgn3, Ppp1r14c, Pam, Etv1, Tsc22d1, Slc25a5, Akap17b, Pgf
#> Fam43a, Emb, Jun, Krt8, Dnajc12, Mid1ip1, Ids, Rgs17, Uchl1, Alcam
#> Negative: Ins2, Ins1, Ppp1r1a, Nnat, Calr, Sytl4, Sdf2l1, Iapp, Pdia6, Mapt
#> G6pc2, C2cd4b, Npy, Gng12, P2ry1, Ero1lb, Adra2a, Papss2, Arhgap36, Fam151a
#> Dlk1, Creld2, Gip, Tmem215, Gm27033, Cntfr, Prss53, C2cd4a, Lyve1, Ociad2
#> StandardPC_ 5
#> Positive: Pdx1, Nkx6-1, Npepl1, Cldn4, Cryba2, Fev, Jun, Chgb, Gng12, Adra2a
#> Mnx1, Sytl4, Pdk3, Gm27033, Nnat, Chga, Ins2, 1110012L19Rik, Enho, Krt7
#> Mlxipl, Tmsb10, Flrt1, Pax4, Tubb3, Prrg2, Gars, Frzb, BC023829, Gm2694
#> Negative: Irx2, Irx1, Gcg, Ctxn2, Tmem27, Ctsz, Tmsb15l, Nap1l5, Pou6f2, Gria2
#> Ghrl, Peg10, Smarca1, Arx, Lrpap1, Rgs4, Ttr, Gast, Tmsb15b2, Serpina1b
#> Slc16a10, Wnk3, Ly6e, Auts2, Sct, Arg1, Dusp10, Sphkap, Dock11, Edn3
#> ℹ [2025-09-20 13:01:49] Perform `Seurat::FindClusters()` with louvain and `cluster_resolution` = 0.6
#> ℹ [2025-09-20 13:01:49] Reorder clusters...
#> ! [2025-09-20 13:01:49] Using `Seurat::AggregateExpression()` to calculate pseudo-bulk data for <Assay5>
#> ℹ [2025-09-20 13:01:49] Perform umap nonlinear dimension reduction
#> ℹ [2025-09-20 13:01:49] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2025-09-20 13:01:49] UMAP will return its model
#> ℹ [2025-09-20 13:01:52] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2025-09-20 13:01:52] UMAP will return its model
#> ✔ [2025-09-20 13:01:55] Run scop standard workflow done
p1 <- CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP"
)
p1
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
panel_fix(
p1,
height = 2,
raster = TRUE,
dpi = 30
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> ℹ [2025-09-20 13:01:55] Installing: ragg...
#>
#> → Will install 5 packages.
#> → All 5 packages (0 B) are cached.
#> + base64enc 0.1-3
#> + ragg 1.5.0 + ✔ libfreetype6-dev, ✔ libjpeg-dev, ✔ libpng-dev, ✔ libtiff-dev, ✔ libwebp-dev
#> + stringi 1.8.7 + ✔ libicu-dev
#> + systemfonts 1.2.3 + ✔ libfontconfig1-dev, ✔ libfreetype6-dev
#> + textshaping 1.0.3 + ✔ libfreetype6-dev, ✔ libfribidi-dev, ✔ libharfbuzz-dev
#> ✔ All system requirements are already installed.
#>
#> ℹ No downloads are needed, 5 pkgs are cached
#> ✔ Got base64enc 0.1-3 (x86_64-pc-linux-gnu-ubuntu-24.04) (26.57 kB)
#> ✔ Got textshaping 1.0.3 (x86_64-pc-linux-gnu-ubuntu-24.04) (188.95 kB)
#> ✔ Got systemfonts 1.2.3 (x86_64-pc-linux-gnu-ubuntu-24.04) (350.85 kB)
#> ✔ Got ragg 1.5.0 (x86_64-pc-linux-gnu-ubuntu-24.04) (743.63 kB)
#> ✔ Got stringi 1.8.7 (x86_64-pc-linux-gnu-ubuntu-24.04) (3.29 MB)
#> ℹ Installing system requirements
#> ℹ Executing `sudo sh -c apt-get -y update`
#> Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
#> Hit:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease
#> Hit:3 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease
#> Hit:4 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease
#> Hit:5 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease
#> Hit:6 https://packages.microsoft.com/repos/azure-cli noble InRelease
#> Hit:7 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease
#> Reading package lists...
#> ℹ Executing `sudo sh -c apt-get -y install libfreetype6-dev libjpeg-dev libpng-dev libtiff-dev libwebp-dev libicu-dev libfontconfig1-dev libfribidi-dev libharfbuzz-dev`
#> Reading package lists...
#> Building dependency tree...
#> Reading state information...
#> libfreetype-dev is already the newest version (2.13.2+dfsg-1build3).
#> libjpeg-dev is already the newest version (8c-2ubuntu11).
#> libpng-dev is already the newest version (1.6.43-5build1).
#> libtiff-dev is already the newest version (4.5.1+git230720-4ubuntu2.3).
#> libwebp-dev is already the newest version (1.3.2-0.4build3).
#> libicu-dev is already the newest version (74.2-1ubuntu3.1).
#> libfontconfig1-dev is already the newest version (2.15.0-1.1ubuntu2).
#> libfribidi-dev is already the newest version (1.0.13-3build1).
#> libharfbuzz-dev is already the newest version (8.3.0-2build2).
#> 0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
#> ✔ Installed base64enc 0.1-3 (93ms)
#> ✔ Installed ragg 1.5.0 (120ms)
#> ✔ Installed stringi 1.8.7 (156ms)
#> ✔ Installed systemfonts 1.2.3 (169ms)
#> ✔ Installed textshaping 1.0.3 (74ms)
#> ✔ 1 pkg + 9 deps: kept 5, added 5, dld 5 (4.60 MB) [3.5s]
#> ℹ [2025-09-20 13:01:59] png and ragg installed successfully
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
theme_use = "theme_blank"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
theme_use = ggplot2::theme_classic,
theme_args = list(base_size = 16)
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Highlight cells
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
cells.highlight = colnames(
pancreas_sub
)[pancreas_sub$SubCellType == "Epsilon"]
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
split.by = "Phase",
reduction = "UMAP",
cells.highlight = TRUE,
theme_use = "theme_blank",
legend.position = "none"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Add group labels
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
label = TRUE
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
label = TRUE,
label.fg = "orange",
label.bg = "red",
label.size = 5
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
label = TRUE,
label_insitu = TRUE
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
label = TRUE,
label_insitu = TRUE,
label_repel = TRUE,
label_segment_color = "red"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Add various shape of marks
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_mark = TRUE
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_mark = TRUE,
mark_expand = grid::unit(1, "mm")
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_mark = TRUE,
mark_alpha = 0.3
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_mark = TRUE,
mark_linetype = 2
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_mark = TRUE,
mark_type = "ellipse"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_mark = TRUE,
mark_type = "rect"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_mark = TRUE,
mark_type = "circle"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Add a density layer
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_density = TRUE
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_density = TRUE,
density_filled = TRUE
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: Removed 396 rows containing missing values or values outside the scale range
#> (`geom_raster()`).
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
add_density = TRUE,
density_filled = TRUE,
density_filled_palette = "Blues",
cells.highlight = TRUE
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: Removed 396 rows containing missing values or values outside the scale range
#> (`geom_raster()`).
# Add statistical charts
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "UMAP",
stat.by = "Phase"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "UMAP",
stat.by = "Phase",
stat_plot_type = "ring",
stat_plot_label = TRUE,
stat_plot_size = 0.15
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_col()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_text_repel()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_col()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_text_repel()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_col()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_text_repel()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_col()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_text_repel()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_col()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_text_repel()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_col()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_text_repel()`).
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "UMAP",
stat.by = "Phase",
stat_plot_type = "bar",
stat_type = "count",
stat_plot_position = "dodge"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Chane the plot type from point to the hexagonal bin
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "UMAP",
hex = TRUE
)
#> ℹ [2025-09-20 13:02:08] Installing: hexbin...
#>
#> → Will install 1 package.
#> → The package (0 B) is cached.
#> + hexbin 1.28.5
#>
#> ℹ No downloads are needed, 1 pkg is cached
#> ✔ Got hexbin 1.28.5 (x86_64-pc-linux-gnu-ubuntu-24.04) (1.60 MB)
#> ✔ Installed hexbin 1.28.5 (1s)
#> ✔ 1 pkg + 1 dep: kept 1, added 1, dld 1 (1.60 MB) [1.9s]
#> ℹ [2025-09-20 13:02:10] hexbin installed successfully
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_hex()`).
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "UMAP",
hex = TRUE,
hex.bins = 20
)
#> ℹ [2025-09-20 13:02:11] hexbin installed successfully
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_hex()`).
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "UMAP",
hex = TRUE,
hex.count = FALSE
)
#> ℹ [2025-09-20 13:02:11] hexbin installed successfully
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_hex()`).
# Show neighbors graphs on the plot
pancreas_sub <- standard_scop(pancreas_sub)
#> ℹ [2025-09-20 13:02:11] Start standard scop workflow...
#> ℹ [2025-09-20 13:02:11] Checking a list of <Seurat> object...
#> ℹ [2025-09-20 13:02:12] Data 1/1 of the `srt_list` has been log-normalized
#> ℹ [2025-09-20 13:02:12] Perform `Seurat::FindVariableFeatures()` on the data 1/1 of the `srt_list`...
#> ℹ [2025-09-20 13:02:12] Use the separate HVF from srt_list
#> ℹ [2025-09-20 13:02:12] Number of available HVF: 2000
#> ℹ [2025-09-20 13:02:12] Finished check
#> ℹ [2025-09-20 13:02:12] Perform `Seurat::ScaleData()`
#> ℹ [2025-09-20 13:02:13] Perform pca linear dimension reduction
#> StandardPC_ 1
#> Positive: Aplp1, Cpe, Gnas, Fam183b, Map1b, Hmgn3, Pcsk1n, Chga, Tuba1a, Bex2
#> Syt13, Isl1, 1700086L19Rik, Pax6, Chgb, Scgn, Rbp4, Scg3, Gch1, Camk2n1
#> Cryba2, Pcsk2, Pyy, Tspan7, Mafb, Hist3h2ba, Dbpht2, Abcc8, Rap1b, Slc38a5
#> Negative: Spp1, Anxa2, Sparc, Dbi, 1700011H14Rik, Wfdc2, Gsta3, Adamts1, Clu, Mgst1
#> Bicc1, Ldha, Vim, Cldn3, Cyr61, Rps2, Mt1, Ptn, Phgdh, Nudt19
#> Smtnl2, Smco4, Habp2, Mt2, Col18a1, Rpl12, Galk1, Cldn10, Acot1, Ccnd1
#> StandardPC_ 2
#> Positive: Rbp4, Tagln2, Tuba1b, Fkbp2, Pyy, Pcsk2, Iapp, Tmem27, Meis2, Tubb4b
#> Pcsk1n, Dbpht2, Rap1b, Dynll1, Tubb2a, Sdf2l1, Scgn, 1700086L19Rik, Scg2, Abcc8
#> Atp1b1, Hspa5, Fam183b, Papss2, Slc38a5, Scg3, Mageh1, Tspan7, Ppp1r1a, Ociad2
#> Negative: Neurog3, Btbd17, Gadd45a, Ppp1r14a, Neurod2, Sox4, Smarcd2, Mdk, Pax4, Btg2
#> Sult2b1, Hes6, Grasp, Igfbpl1, Gpx2, Cbfa2t3, Foxa3, Shf, Mfng, Tmsb4x
#> Amotl2, Gdpd1, Cdc14b, Epb42, Rcor2, Cotl1, Upk3bl, Rbfox3, Cldn6, Cer1
#> StandardPC_ 3
#> Positive: Nusap1, Top2a, Birc5, Aurkb, Cdca8, Pbk, Mki67, Tpx2, Plk1, Ccnb1
#> 2810417H13Rik, Incenp, Cenpf, Ccna2, Prc1, Racgap1, Cdk1, Aurka, Cdca3, Hmmr
#> Spc24, Kif23, Sgol1, Cenpe, Cdc20, Hist1h1b, Cdca2, Mxd3, Kif22, Ska1
#> Negative: Anxa5, Pdzk1ip1, Acot1, Tpm1, Anxa2, Dcdc2a, Capg, Sparc, Ttr, Pamr1
#> Clu, Cxcl12, Ndrg2, Hnf1aos1, Gas6, Gsta3, Krt18, Ces1d, Atp1b1, Muc1
#> Hhex, Acadm, Spp1, Enpp2, Bcl2l14, Sat1, Smtnl2, 1700011H14Rik, Tgm2, Fam159a
#> StandardPC_ 4
#> Positive: Glud1, Tm4sf4, Akr1c19, Cldn4, Runx1t1, Fev, Pou3f4, Gm43861, Pgrmc1, Arx
#> Cd200, Lrpprc, Hmgn3, Ppp1r14c, Pam, Etv1, Tsc22d1, Slc25a5, Akap17b, Pgf
#> Fam43a, Emb, Jun, Krt8, Dnajc12, Mid1ip1, Ids, Rgs17, Uchl1, Alcam
#> Negative: Ins2, Ins1, Ppp1r1a, Nnat, Calr, Sytl4, Sdf2l1, Iapp, Pdia6, Mapt
#> G6pc2, C2cd4b, Npy, Gng12, P2ry1, Ero1lb, Adra2a, Papss2, Arhgap36, Fam151a
#> Dlk1, Creld2, Gip, Tmem215, Gm27033, Cntfr, Prss53, C2cd4a, Lyve1, Ociad2
#> StandardPC_ 5
#> Positive: Pdx1, Nkx6-1, Npepl1, Cldn4, Cryba2, Fev, Jun, Chgb, Gng12, Adra2a
#> Mnx1, Sytl4, Pdk3, Gm27033, Nnat, Chga, Ins2, 1110012L19Rik, Enho, Krt7
#> Mlxipl, Tmsb10, Flrt1, Pax4, Tubb3, Prrg2, Gars, Frzb, BC023829, Gm2694
#> Negative: Irx2, Irx1, Gcg, Ctxn2, Tmem27, Ctsz, Tmsb15l, Nap1l5, Pou6f2, Gria2
#> Ghrl, Peg10, Smarca1, Arx, Lrpap1, Rgs4, Ttr, Gast, Tmsb15b2, Serpina1b
#> Slc16a10, Wnk3, Ly6e, Auts2, Sct, Arg1, Dusp10, Sphkap, Dock11, Edn3
#> ℹ [2025-09-20 13:02:14] Perform `Seurat::FindClusters()` with louvain and `cluster_resolution` = 0.6
#> ℹ [2025-09-20 13:02:14] Reorder clusters...
#> ! [2025-09-20 13:02:14] Using `Seurat::AggregateExpression()` to calculate pseudo-bulk data for <Assay5>
#> ℹ [2025-09-20 13:02:14] Perform umap nonlinear dimension reduction
#> ℹ [2025-09-20 13:02:14] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2025-09-20 13:02:14] UMAP will return its model
#> Warning: Key ‘StandardpcaUMAP2D_’ taken, using ‘standardpcaumap2d_’ instead
#> ℹ [2025-09-20 13:02:17] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2025-09-20 13:02:17] UMAP will return its model
#> Warning: Key ‘StandardpcaUMAP3D_’ taken, using ‘standardpcaumap3d_’ instead
#> ✔ [2025-09-20 13:02:20] Run scop standard workflow done
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "UMAP",
graph = "Standardpca_SNN"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "UMAP",
graph = "Standardpca_SNN",
edge_color = "grey80"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Show lineages based on the pseudotime
pancreas_sub <- RunSlingshot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
show_plot = FALSE
)
FeatureDimPlot(
pancreas_sub,
features = paste0("Lineage", 1:2),
reduction = "UMAP"
)
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
lineages = paste0("Lineage", 1:2)
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: Removed 8 rows containing missing values or values outside the scale range
#> (`geom_path()`).
#> Warning: Removed 8 rows containing missing values or values outside the scale range
#> (`geom_path()`).
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
lineages = paste0("Lineage", 1:2),
lineages_whiskers = TRUE
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: Removed 8 rows containing missing values or values outside the scale range
#> (`geom_segment()`).
#> Warning: Removed 8 rows containing missing values or values outside the scale range
#> (`geom_path()`).
#> Warning: Removed 8 rows containing missing values or values outside the scale range
#> (`geom_path()`).
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
lineages = paste0("Lineage", 1:2),
lineages_span = 0.1
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Show PAGA results on the plot
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
#> ℹ [2025-09-20 13:02:25] Start standard scop workflow...
#> ℹ [2025-09-20 13:02:25] Checking a list of <Seurat> object...
#> ℹ [2025-09-20 13:02:26] Data 1/1 of the `srt_list` has been log-normalized
#> ℹ [2025-09-20 13:02:26] Perform `Seurat::FindVariableFeatures()` on the data 1/1 of the `srt_list`...
#> ℹ [2025-09-20 13:02:26] Use the separate HVF from srt_list
#> ℹ [2025-09-20 13:02:26] Number of available HVF: 2000
#> ℹ [2025-09-20 13:02:26] Finished check
#> ℹ [2025-09-20 13:02:26] Perform `Seurat::ScaleData()`
#> ℹ [2025-09-20 13:02:27] Perform pca linear dimension reduction
#> StandardPC_ 1
#> Positive: Aplp1, Cpe, Gnas, Fam183b, Map1b, Hmgn3, Pcsk1n, Chga, Tuba1a, Bex2
#> Syt13, Isl1, 1700086L19Rik, Pax6, Chgb, Scgn, Rbp4, Scg3, Gch1, Camk2n1
#> Cryba2, Pcsk2, Pyy, Tspan7, Mafb, Hist3h2ba, Dbpht2, Abcc8, Rap1b, Slc38a5
#> Negative: Spp1, Anxa2, Sparc, Dbi, 1700011H14Rik, Wfdc2, Gsta3, Adamts1, Clu, Mgst1
#> Bicc1, Ldha, Vim, Cldn3, Cyr61, Rps2, Mt1, Ptn, Phgdh, Nudt19
#> Smtnl2, Smco4, Habp2, Mt2, Col18a1, Rpl12, Galk1, Cldn10, Acot1, Ccnd1
#> StandardPC_ 2
#> Positive: Rbp4, Tagln2, Tuba1b, Fkbp2, Pyy, Pcsk2, Iapp, Tmem27, Meis2, Tubb4b
#> Pcsk1n, Dbpht2, Rap1b, Dynll1, Tubb2a, Sdf2l1, Scgn, 1700086L19Rik, Scg2, Abcc8
#> Atp1b1, Hspa5, Fam183b, Papss2, Slc38a5, Scg3, Mageh1, Tspan7, Ppp1r1a, Ociad2
#> Negative: Neurog3, Btbd17, Gadd45a, Ppp1r14a, Neurod2, Sox4, Smarcd2, Mdk, Pax4, Btg2
#> Sult2b1, Hes6, Grasp, Igfbpl1, Gpx2, Cbfa2t3, Foxa3, Shf, Mfng, Tmsb4x
#> Amotl2, Gdpd1, Cdc14b, Epb42, Rcor2, Cotl1, Upk3bl, Rbfox3, Cldn6, Cer1
#> StandardPC_ 3
#> Positive: Nusap1, Top2a, Birc5, Aurkb, Cdca8, Pbk, Mki67, Tpx2, Plk1, Ccnb1
#> 2810417H13Rik, Incenp, Cenpf, Ccna2, Prc1, Racgap1, Cdk1, Aurka, Cdca3, Hmmr
#> Spc24, Kif23, Sgol1, Cenpe, Cdc20, Hist1h1b, Cdca2, Mxd3, Kif22, Ska1
#> Negative: Anxa5, Pdzk1ip1, Acot1, Tpm1, Anxa2, Dcdc2a, Capg, Sparc, Ttr, Pamr1
#> Clu, Cxcl12, Ndrg2, Hnf1aos1, Gas6, Gsta3, Krt18, Ces1d, Atp1b1, Muc1
#> Hhex, Acadm, Spp1, Enpp2, Bcl2l14, Sat1, Smtnl2, 1700011H14Rik, Tgm2, Fam159a
#> StandardPC_ 4
#> Positive: Glud1, Tm4sf4, Akr1c19, Cldn4, Runx1t1, Fev, Pou3f4, Gm43861, Pgrmc1, Arx
#> Cd200, Lrpprc, Hmgn3, Ppp1r14c, Pam, Etv1, Tsc22d1, Slc25a5, Akap17b, Pgf
#> Fam43a, Emb, Jun, Krt8, Dnajc12, Mid1ip1, Ids, Rgs17, Uchl1, Alcam
#> Negative: Ins2, Ins1, Ppp1r1a, Nnat, Calr, Sytl4, Sdf2l1, Iapp, Pdia6, Mapt
#> G6pc2, C2cd4b, Npy, Gng12, P2ry1, Ero1lb, Adra2a, Papss2, Arhgap36, Fam151a
#> Dlk1, Creld2, Gip, Tmem215, Gm27033, Cntfr, Prss53, C2cd4a, Lyve1, Ociad2
#> StandardPC_ 5
#> Positive: Pdx1, Nkx6-1, Npepl1, Cldn4, Cryba2, Fev, Jun, Chgb, Gng12, Adra2a
#> Mnx1, Sytl4, Pdk3, Gm27033, Nnat, Chga, Ins2, 1110012L19Rik, Enho, Krt7
#> Mlxipl, Tmsb10, Flrt1, Pax4, Tubb3, Prrg2, Gars, Frzb, BC023829, Gm2694
#> Negative: Irx2, Irx1, Gcg, Ctxn2, Tmem27, Ctsz, Tmsb15l, Nap1l5, Pou6f2, Gria2
#> Ghrl, Peg10, Smarca1, Arx, Lrpap1, Rgs4, Ttr, Gast, Tmsb15b2, Serpina1b
#> Slc16a10, Wnk3, Ly6e, Auts2, Sct, Arg1, Dusp10, Sphkap, Dock11, Edn3
#> ℹ [2025-09-20 13:02:28] Perform `Seurat::FindClusters()` with louvain and `cluster_resolution` = 0.6
#> ℹ [2025-09-20 13:02:28] Reorder clusters...
#> ! [2025-09-20 13:02:28] Using `Seurat::AggregateExpression()` to calculate pseudo-bulk data for <Assay5>
#> ℹ [2025-09-20 13:02:28] Perform umap nonlinear dimension reduction
#> ℹ [2025-09-20 13:02:28] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2025-09-20 13:02:28] UMAP will return its model
#> ℹ [2025-09-20 13:02:31] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2025-09-20 13:02:31] UMAP will return its model
#> ✔ [2025-09-20 13:02:34] Run scop standard workflow done
pancreas_sub <- RunPAGA(
pancreas_sub,
group_by = "SubCellType",
linear_reduction = "PCA",
nonlinear_reduction = "UMAP",
return_seurat = TRUE
)
#> ! [2025-09-20 13:02:49] `envname`: "scop_env" python environment does not exist. Create it with `PrepareEnv()`
#> ℹ [2025-09-20 13:02:49] Preparing scop Python Environment
#> ℹ [2025-09-20 13:02:49] Environment name: scop_env
#> ℹ [2025-09-20 13:02:49] Python version: 3.10-1
#> ℹ [2025-09-20 13:02:49] Number of packages to install: 21
#> ℹ [2025-09-20 13:02:49] Auto-detecting conda...
#> ℹ [2025-09-20 13:02:50] Creating conda environment with Python "3.10-1"...
#> + /usr/share/miniconda/bin/conda create --yes --name scop_env 'python=3.10-1' pip setuptools wheel --quiet -c conda-forge
#> ✔ [2025-09-20 13:03:16] Environment created successfully: /usr/share/miniconda/envs/scop_env
#> ℹ [2025-09-20 13:03:16] Checking and installing required packages...
#> ℹ [2025-09-20 13:03:16] Installing conda packages
#> ℹ [2025-09-20 13:03:16] Try to install: leidenalg==0.10.2, tbb==2022.2.0, and python-igraph==0.11.9
#> ℹ [2025-09-20 13:03:16] Installing 3 packages into environment: scop_env
#> ℹ [2025-09-20 13:03:18] Installing packages via conda...
#> ℹ [2025-09-20 13:03:18] Using channel: "conda-forge"
#> ℹ [2025-09-20 13:03:18] Installing 3 packages...
#> + /usr/share/miniconda/bin/conda 'install' '--yes' '--name' 'scop_env' '-c' 'conda-forge' 'leidenalg==0.10.2' 'tbb==2022.2.0' 'python-igraph==0.11.9'
#> ✔ [2025-09-20 13:03:26] conda installation completed successfully
#> ℹ [2025-09-20 13:03:26] Checking 3 packages in environment: scop_env
#> ℹ [2025-09-20 13:03:27] Retrieving package list for environment: scop_env
#> ℹ [2025-09-20 13:03:28] Found 51 packages installed
#> ✔ [2025-09-20 13:03:28] leidenalg 0.10.2
#> ✔ [2025-09-20 13:03:28] tbb 2022.2.0
#> ✔ [2025-09-20 13:03:28] python-igraph 0.11.9
#> ℹ [2025-09-20 13:03:28] Installing pip packages
#> ℹ [2025-09-20 13:03:28] Try to install: matplotlib==3.10.3, numba==0.59.1, llvmlite==0.42.0, numpy==1.26.4, palantir==1.4.1, pandas==2.0.3, scanpy==1.11.3, scikit-learn==1.7.0, scipy==1.15.3, scvelo==0.3.3, wot==1.0.8.post2, trimap==1.1.4, pacmap==0.8.0, phate==1.0.11, bbknn==1.6.0, scanorama==1.7.4, scvi-tools==1.2.1, and cellrank==2.0.7
#> ℹ [2025-09-20 13:03:28] Installing 19 packages into environment: scop_env
#> ℹ [2025-09-20 13:03:30] Installing packages via pip...
#> ✔ [2025-09-20 13:05:52] pip installation completed
#> ℹ [2025-09-20 13:05:53] Checking 18 packages in environment: scop_env
#> ℹ [2025-09-20 13:05:54] Retrieving package list for environment: scop_env
#> ℹ [2025-09-20 13:05:56] Found 197 packages installed
#> ✔ [2025-09-20 13:05:56] matplotlib 3.10.3
#> ✔ [2025-09-20 13:05:56] numba 0.59.1
#> ✔ [2025-09-20 13:05:56] llvmlite 0.42.0
#> ✔ [2025-09-20 13:05:56] numpy 1.26.4
#> ✔ [2025-09-20 13:05:56] palantir 1.4.1
#> ✔ [2025-09-20 13:05:56] pandas 2.0.3
#> ✔ [2025-09-20 13:05:56] scanpy 1.11.3
#> ✔ [2025-09-20 13:05:56] scikit-learn 1.7.0
#> ✔ [2025-09-20 13:05:56] scipy 1.15.3
#> ✔ [2025-09-20 13:05:56] scvelo 0.3.3
#> ✔ [2025-09-20 13:05:56] wot 1.0.8.post2
#> ✔ [2025-09-20 13:05:56] trimap 1.1.4
#> ✔ [2025-09-20 13:05:56] pacmap 0.8.0
#> ✔ [2025-09-20 13:05:56] phate 1.0.11
#> ✔ [2025-09-20 13:05:56] bbknn 1.6.0
#> ✔ [2025-09-20 13:05:56] scanorama 1.7.4
#> ✔ [2025-09-20 13:05:56] scvi-tools 1.2.1
#> ✔ [2025-09-20 13:05:56] cellrank 2.0.7
#> ✔ [2025-09-20 13:06:01] Python Environment Ready
#> conda environment:
#> conda: /usr/share/miniconda/bin/conda
#> environment: /usr/share/miniconda/envs/scop_env
#> python config:
#> python: /usr/share/miniconda/envs/scop_env/bin/python3.10
#> libpython: /usr/share/miniconda/envs/scop_env/lib/libpython3.10.so
#> pythonhome: /usr/share/miniconda/envs/scop_env:/usr/share/miniconda/envs/scop_env
#> version: 3.10.1 | packaged by conda-forge | (main, Dec 22 2021, 01:39:36) [GCC 9.4.0]
#> numpy: /usr/share/miniconda/envs/scop_env/lib/python3.10/site-packages/numpy
#> numpy_version: 1.26.4
#>
#> NOTE: Python version was forced by use_python() function
#> ℹ [2025-09-20 13:06:02] Checking 2 packages in environment: scop_env
#> ℹ [2025-09-20 13:06:03] Retrieving package list for environment: scop_env
#> ℹ [2025-09-20 13:06:05] Found 197 packages installed
#> ✔ [2025-09-20 13:06:05] scanpy version: 1.11.3
#> ✔ [2025-09-20 13:06:05] numpy version: 1.26.4
#> ℹ [2025-09-20 13:06:05] Converting <Seurat> to <AnnData> ...
#> ! [2025-09-20 13:06:10] "misc" slot is not converted
#> ! [2025-09-20 13:06:10] "tools" slot is not converted
#> ✔ [2025-09-20 13:06:10] Convert <Seurat> object to <AnnData> object completed
#> ℹ [2025-09-20 13:06:10] Running PAGA analysis...
#> ✔ [2025-09-20 13:06:25] PAGA analysis completed
#> ℹ [2025-09-20 13:06:25] Converting <AnnData> object to <Seurat> object...
#> ✔ [2025-09-20 13:06:26] Convert <AnnData> object to <Seurat> object completed
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
paga = pancreas_sub@misc$paga
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
paga = pancreas_sub@misc$paga,
paga_type = "connectivities_tree"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
pt.size = 5,
pt.alpha = 0.2,
label = TRUE,
label_repel = TRUE,
label_insitu = TRUE,
label_segment_color = "transparent",
paga = pancreas_sub@misc$paga,
paga_edge_threshold = 0.1,
paga_edge_color = "black",
paga_edge_alpha = 1,
legend.position = "none",
theme_use = "theme_blank"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Show RNA velocity results on the plot
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
#> ℹ [2025-09-20 13:06:28] Start standard scop workflow...
#> ℹ [2025-09-20 13:06:28] Checking a list of <Seurat> object...
#> ℹ [2025-09-20 13:06:28] Data 1/1 of the `srt_list` has been log-normalized
#> ℹ [2025-09-20 13:06:28] Perform `Seurat::FindVariableFeatures()` on the data 1/1 of the `srt_list`...
#> ℹ [2025-09-20 13:06:29] Use the separate HVF from srt_list
#> ℹ [2025-09-20 13:06:29] Number of available HVF: 2000
#> ℹ [2025-09-20 13:06:29] Finished check
#> ℹ [2025-09-20 13:06:29] Perform `Seurat::ScaleData()`
#> ℹ [2025-09-20 13:06:29] Perform pca linear dimension reduction
#> StandardPC_ 1
#> Positive: Aplp1, Cpe, Gnas, Fam183b, Map1b, Hmgn3, Pcsk1n, Chga, Tuba1a, Bex2
#> Syt13, Isl1, 1700086L19Rik, Pax6, Chgb, Scgn, Rbp4, Scg3, Gch1, Camk2n1
#> Cryba2, Pcsk2, Pyy, Tspan7, Mafb, Hist3h2ba, Dbpht2, Abcc8, Rap1b, Slc38a5
#> Negative: Spp1, Anxa2, Sparc, Dbi, 1700011H14Rik, Wfdc2, Gsta3, Adamts1, Clu, Mgst1
#> Bicc1, Ldha, Vim, Cldn3, Cyr61, Rps2, Mt1, Ptn, Phgdh, Nudt19
#> Smtnl2, Smco4, Habp2, Mt2, Col18a1, Rpl12, Galk1, Cldn10, Acot1, Ccnd1
#> StandardPC_ 2
#> Positive: Rbp4, Tagln2, Tuba1b, Fkbp2, Pyy, Pcsk2, Iapp, Tmem27, Meis2, Tubb4b
#> Pcsk1n, Dbpht2, Rap1b, Dynll1, Tubb2a, Sdf2l1, Scgn, 1700086L19Rik, Scg2, Abcc8
#> Atp1b1, Hspa5, Fam183b, Papss2, Slc38a5, Scg3, Mageh1, Tspan7, Ppp1r1a, Ociad2
#> Negative: Neurog3, Btbd17, Gadd45a, Ppp1r14a, Neurod2, Sox4, Smarcd2, Mdk, Pax4, Btg2
#> Sult2b1, Hes6, Grasp, Igfbpl1, Gpx2, Cbfa2t3, Foxa3, Shf, Mfng, Tmsb4x
#> Amotl2, Gdpd1, Cdc14b, Epb42, Rcor2, Cotl1, Upk3bl, Rbfox3, Cldn6, Cer1
#> StandardPC_ 3
#> Positive: Nusap1, Top2a, Birc5, Aurkb, Cdca8, Pbk, Mki67, Tpx2, Plk1, Ccnb1
#> 2810417H13Rik, Incenp, Cenpf, Ccna2, Prc1, Racgap1, Cdk1, Aurka, Cdca3, Hmmr
#> Spc24, Kif23, Sgol1, Cenpe, Cdc20, Hist1h1b, Cdca2, Mxd3, Kif22, Ska1
#> Negative: Anxa5, Pdzk1ip1, Acot1, Tpm1, Anxa2, Dcdc2a, Capg, Sparc, Ttr, Pamr1
#> Clu, Cxcl12, Ndrg2, Hnf1aos1, Gas6, Gsta3, Krt18, Ces1d, Atp1b1, Muc1
#> Hhex, Acadm, Spp1, Enpp2, Bcl2l14, Sat1, Smtnl2, 1700011H14Rik, Tgm2, Fam159a
#> StandardPC_ 4
#> Positive: Glud1, Tm4sf4, Akr1c19, Cldn4, Runx1t1, Fev, Pou3f4, Gm43861, Pgrmc1, Arx
#> Cd200, Lrpprc, Hmgn3, Ppp1r14c, Pam, Etv1, Tsc22d1, Slc25a5, Akap17b, Pgf
#> Fam43a, Emb, Jun, Krt8, Dnajc12, Mid1ip1, Ids, Rgs17, Uchl1, Alcam
#> Negative: Ins2, Ins1, Ppp1r1a, Nnat, Calr, Sytl4, Sdf2l1, Iapp, Pdia6, Mapt
#> G6pc2, C2cd4b, Npy, Gng12, P2ry1, Ero1lb, Adra2a, Papss2, Arhgap36, Fam151a
#> Dlk1, Creld2, Gip, Tmem215, Gm27033, Cntfr, Prss53, C2cd4a, Lyve1, Ociad2
#> StandardPC_ 5
#> Positive: Pdx1, Nkx6-1, Npepl1, Cldn4, Cryba2, Fev, Jun, Chgb, Gng12, Adra2a
#> Mnx1, Sytl4, Pdk3, Gm27033, Nnat, Chga, Ins2, 1110012L19Rik, Enho, Krt7
#> Mlxipl, Tmsb10, Flrt1, Pax4, Tubb3, Prrg2, Gars, Frzb, BC023829, Gm2694
#> Negative: Irx2, Irx1, Gcg, Ctxn2, Tmem27, Ctsz, Tmsb15l, Nap1l5, Pou6f2, Gria2
#> Ghrl, Peg10, Smarca1, Arx, Lrpap1, Rgs4, Ttr, Gast, Tmsb15b2, Serpina1b
#> Slc16a10, Wnk3, Ly6e, Auts2, Sct, Arg1, Dusp10, Sphkap, Dock11, Edn3
#> ℹ [2025-09-20 13:06:30] Perform `Seurat::FindClusters()` with louvain and `cluster_resolution` = 0.6
#> ℹ [2025-09-20 13:06:30] Reorder clusters...
#> ! [2025-09-20 13:06:30] Using `Seurat::AggregateExpression()` to calculate pseudo-bulk data for <Assay5>
#> ℹ [2025-09-20 13:06:30] Perform umap nonlinear dimension reduction
#> ℹ [2025-09-20 13:06:30] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2025-09-20 13:06:30] UMAP will return its model
#> Warning: Key ‘StandardpcaUMAP2D_’ taken, using ‘standardpcaumap2d_’ instead
#> ℹ [2025-09-20 13:06:34] Non-linear dimensionality reduction (umap) using (Standardpca) dims (1-50) as input
#> ℹ [2025-09-20 13:06:34] UMAP will return its model
#> Warning: Key ‘StandardpcaUMAP3D_’ taken, using ‘standardpcaumap3d_’ instead
#> ✔ [2025-09-20 13:06:37] Run scop standard workflow done
pancreas_sub <- RunSCVELO(
pancreas_sub,
group_by = "SubCellType",
linear_reduction = "PCA",
nonlinear_reduction = "UMAP",
mode = "stochastic",
return_seurat = TRUE
)
#> ℹ [2025-09-20 13:06:38] Checking 1 packages in environment: scop_env
#> ℹ [2025-09-20 13:06:39] Retrieving package list for environment: scop_env
#> ℹ [2025-09-20 13:06:41] Found 197 packages installed
#> ✔ [2025-09-20 13:06:41] scvelo version: 0.3.3
#> ℹ [2025-09-20 13:06:42] Checking 2 packages in environment: scop_env
#> ℹ [2025-09-20 13:06:43] Retrieving package list for environment: scop_env
#> ℹ [2025-09-20 13:06:45] Found 197 packages installed
#> ✔ [2025-09-20 13:06:45] scanpy version: 1.11.3
#> ✔ [2025-09-20 13:06:45] numpy version: 1.26.4
#> ℹ [2025-09-20 13:06:45] Converting <Seurat> to <AnnData> ...
#> ! [2025-09-20 13:06:45] "misc" slot is not converted
#> ! [2025-09-20 13:06:45] "tools" slot is not converted
#> ✔ [2025-09-20 13:06:45] Convert <Seurat> object to <AnnData> object completed
#> ℹ [2025-09-20 13:06:45] Running scVelo analysis...
#> ✔ [2025-09-20 13:06:51] scVelo analysis completed
#> ℹ [2025-09-20 13:06:51] Converting <AnnData> object to <Seurat> object...
#> ✔ [2025-09-20 13:06:56] Convert <AnnData> object to <Seurat> object completed
#> Warning: Different features in new layer data than already exists for counts
#> Warning: Different features in new layer data than already exists for data
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
paga = pancreas_sub@misc$paga,
paga_show_transition = TRUE
)
#> Error in .subset2(x, i, exact = exact): attempt to select less than one element in get1index
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
pt.size = NA,
velocity = "stochastic"
)
#> ℹ [2025-09-20 13:07:00] Installing: metR...
#>
#> → Will install 20 packages.
#> → All 20 packages (0 B) are cached.
#> + Formula 1.2-5
#> + backports 1.5.0
#> + checkmate 2.3.3
#> + classInt 0.4-11
#> + data.table 1.17.8
#> + e1071 1.7-16
#> + formula.tools 1.7.1
#> + lubridate 1.9.4
#> + magrittr 2.0.4
#> + metR 0.18.2
#> + operator.tools 1.6.3
#> + plyr 1.8.9
#> + proxy 0.4-27
#> + purrr 1.1.0
#> + s2 1.1.9 + ✔ libabsl-dev, ✔ cmake, ✔ libssl-dev
#> + sf 1.0-21 + ✔ libgdal-dev, ✔ gdal-bin, ✔ libgeos-dev, ✔ libproj-dev, ✔ libsqlite3-dev
#> + stringr 1.5.2
#> + timechange 0.3.0
#> + units 0.8-7 + ✔ libudunits2-dev
#> + wk 0.9.4
#> ✔ All system requirements are already installed.
#>
#> ℹ No downloads are needed, 20 pkgs are cached
#> ✔ Got backports 1.5.0 (x86_64-pc-linux-gnu-ubuntu-24.04) (115.90 kB)
#> ✔ Got Formula 1.2-5 (x86_64-pc-linux-gnu-ubuntu-24.04) (159.13 kB)
#> ✔ Got proxy 0.4-27 (x86_64-pc-linux-gnu-ubuntu-24.04) (175.47 kB)
#> ✔ Got formula.tools 1.7.1 (x86_64-pc-linux-gnu-ubuntu-24.04) (87.50 kB)
#> ✔ Got classInt 0.4-11 (x86_64-pc-linux-gnu-ubuntu-24.04) (496.56 kB)
#> ✔ Got e1071 1.7-16 (x86_64-pc-linux-gnu-ubuntu-24.04) (596.57 kB)
#> ✔ Got operator.tools 1.6.3 (x86_64-pc-linux-gnu-ubuntu-24.04) (52.84 kB)
#> ✔ Got stringr 1.5.2 (x86_64-pc-linux-gnu-ubuntu-24.04) (311.71 kB)
#> ✔ Got checkmate 2.3.3 (x86_64-pc-linux-gnu-ubuntu-24.04) (777.39 kB)
#> ✔ Got purrr 1.1.0 (x86_64-pc-linux-gnu-ubuntu-24.04) (554.62 kB)
#> ✔ Got timechange 0.3.0 (x86_64-pc-linux-gnu-ubuntu-24.04) (174.23 kB)
#> ✔ Got units 0.8-7 (x86_64-pc-linux-gnu-ubuntu-24.04) (467.34 kB)
#> ✔ Got plyr 1.8.9 (x86_64-pc-linux-gnu-ubuntu-24.04) (787.35 kB)
#> ✔ Got wk 0.9.4 (x86_64-pc-linux-gnu-ubuntu-24.04) (1.73 MB)
#> ✔ Got lubridate 1.9.4 (x86_64-pc-linux-gnu-ubuntu-24.04) (990.67 kB)
#> ✔ Got data.table 1.17.8 (x86_64-pc-linux-gnu-ubuntu-24.04) (2.67 MB)
#> ✔ Got s2 1.1.9 (x86_64-pc-linux-gnu-ubuntu-24.04) (2.21 MB)
#> ✔ Got metR 0.18.2 (x86_64-pc-linux-gnu-ubuntu-24.04) (3.79 MB)
#> ✔ Got sf 1.0-21 (x86_64-pc-linux-gnu-ubuntu-24.04) (4.08 MB)
#> ℹ Installing system requirements
#> ℹ Executing `sudo sh -c apt-get -y update`
#> Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
#> Hit:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease
#> Hit:6 https://packages.microsoft.com/repos/azure-cli noble InRelease
#> Hit:3 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease
#> Hit:7 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease
#> Hit:4 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease
#> Hit:5 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease
#> Reading package lists...
#> ℹ Executing `sudo sh -c apt-get -y install libabsl-dev cmake libssl-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libudunits2-dev libicu-dev`
#> Reading package lists...
#> Building dependency tree...
#> Reading state information...
#> libabsl-dev is already the newest version (20220623.1-3.1ubuntu3.2).
#> cmake is already the newest version (3.28.3-1build7).
#> libssl-dev is already the newest version (3.0.13-0ubuntu3.5).
#> libgdal-dev is already the newest version (3.8.4+dfsg-3ubuntu3).
#> gdal-bin is already the newest version (3.8.4+dfsg-3ubuntu3).
#> libgeos-dev is already the newest version (3.12.1-3build1).
#> libproj-dev is already the newest version (9.4.0-1build2).
#> libsqlite3-dev is already the newest version (3.45.1-1ubuntu2.5).
#> libudunits2-dev is already the newest version (2.2.28-7build1).
#> libicu-dev is already the newest version (74.2-1ubuntu3.1).
#> 0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
#> ✔ Installed backports 1.5.0 (63ms)
#> ✔ Installed checkmate 2.3.3 (86ms)
#> ✔ Installed classInt 0.4-11 (108ms)
#> ✔ Installed data.table 1.17.8 (148ms)
#> ✔ Installed e1071 1.7-16 (70ms)
#> ✔ Installed Formula 1.2-5 (59ms)
#> ✔ Installed formula.tools 1.7.1 (61ms)
#> ✔ Installed lubridate 1.9.4 (62ms)
#> ✔ Installed magrittr 2.0.4 (94ms)
#> ✔ Installed metR 0.18.2 (63ms)
#> ✔ Installed operator.tools 1.6.3 (63ms)
#> ✔ Installed plyr 1.8.9 (63ms)
#> ✔ Installed proxy 0.4-27 (62ms)
#> ✔ Installed purrr 1.1.0 (64ms)
#> ✔ Installed s2 1.1.9 (67ms)
#> ✔ Installed stringr 1.5.2 (1s)
#> ✔ Installed sf 1.0-21 (1.1s)
#> ✔ Installed timechange 0.3.0 (67ms)
#> ✔ Installed units 0.8-7 (63ms)
#> ✔ Installed wk 0.9.4 (46ms)
#> ✔ 1 pkg + 46 deps: kept 27, added 20, dld 19 (20.23 MB) [7.3s]
#> ℹ [2025-09-20 13:07:07] metR installed successfully
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: Removed 1000 rows containing missing values or values outside the scale range
#> (`geom_point()`).
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: Removed 1000 rows containing missing values or values outside the scale range
#> (`geom_point()`).
#> Warning: Removed 3 rows containing missing values or values outside the scale range
#> (`geom_segment()`).
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
pt.size = 5,
pt.alpha = 0.2,
velocity = "stochastic",
velocity_plot_type = "grid"
)
#> ℹ [2025-09-20 13:07:08] metR installed successfully
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Error in cbind_gtable(x, y, size = size): `x` and `y` must have the same number of rows
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
pt.size = 5,
pt.alpha = 0.2,
velocity = "stochastic",
velocity_plot_type = "grid",
velocity_scale = 1.5
)
#> ℹ [2025-09-20 13:07:09] metR installed successfully
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Error in cbind_gtable(x, y, size = size): `x` and `y` must have the same number of rows
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
pt.size = 5,
pt.alpha = 0.2,
velocity = "stochastic",
velocity_plot_type = "stream"
)
#> ℹ [2025-09-20 13:07:10] metR installed successfully
#> ℹ [2025-09-20 13:07:10] metR installed successfully
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` instead.
#> ℹ The deprecated feature was likely used in the scop package.
#> Please report the issue at <https://github.com/mengxu98/scop/issues>.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = "UMAP",
pt.size = 5,
pt.alpha = 0.2,
label = TRUE,
label_insitu = TRUE,
velocity = "stochastic",
velocity_plot_type = "stream",
velocity_arrow_color = "yellow",
velocity_density = 2,
velocity_smooth = 1,
streamline_n = 20,
streamline_color = "black",
legend.position = "none",
theme_use = "theme_blank"
)
#> ℹ [2025-09-20 13:07:11] metR installed successfully
#> ℹ [2025-09-20 13:07:11] metR installed successfully
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Error in cbind_gtable(x, y, size = size): `x` and `y` must have the same number of rows