Skip to content

Commit 0c2b035

Browse files
authored
Merge pull request #8180 from samuel-marsh/dimplot_stroke
Add stroke.size parameter DimPlot
2 parents 2a70a24 + b814066 commit 0c2b035

File tree

8 files changed

+22
-4
lines changed

8 files changed

+22
-4
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: Seurat
2-
Version: 5.1.0.9014
2+
Version: 5.1.0.9015
33
Title: Tools for Single Cell Genomics
44
Description: A toolkit for quality control, analysis, and exploration of single cell RNA sequencing data. 'Seurat' aims to enable users to identify and interpret sources of heterogeneity from single cell transcriptomic measurements, and to integrate diverse types of single cell data. See Satija R, Farrell J, Gennert D, et al (2015) <doi:10.1038/nbt.3192>, Macosko E, Basu A, Satija R, et al (2015) <doi:10.1016/j.cell.2015.05.002>, Stuart T, Butler A, et al (2019) <doi:10.1016/j.cell.2019.05.031>, and Hao, Hao, et al (2020) <doi:10.1101/2020.10.12.335331> for more details.
55
Authors@R: c(

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22

33
## Changes
4+
- Added `stroke.size` parameter to `DimPlot` ([#8180](https://github.com/satijalab/seurat/pull/8180))
45
- Updated `RunLeiden` to use the `leidenbase` package instead of `leiden`; deprecated the `method` parameter for `RunLeiden` and `FindClusters`; updated `RunLeiden` to reset `random.seed` to 1 if the value is 0 or less ([#6792](https://github.com/satijalab/seurat/pull/6792))
56
- Updated `RunUMAP` to support `umap-learn` version >= 0.5.0 ([#9559](https://github.com/satijalab/seurat/pull/9559))
67
- Surfaced more fine-grained control over what parts of a Xenium experiment are loaded in `LoadXenium`

R/preprocessing.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ LoadCurioSeeker <- function(data.dir, assay = "Spatial") {
852852
#' @export
853853
#' @concept preprocessing
854854
#'
855-
#' @references \url{https://www.biorxiv.org/content/10.1101/387241v1}
855+
#' @references \url{https://doi.org/10.1038/s41592-019-0433-8}
856856
#'
857857
#' @examples
858858
#' \dontrun{

R/visualization.R

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ ColorDimSplit <- function(
815815
#' geom_label)
816816
#' @param alpha Alpha value for plotting (default is 1)
817817
#' @param repel Repel labels
818+
#' @param stroke.size Adjust stroke (outline) size of points
818819
#' @param cells.highlight A list of character or numeric vectors of cells to
819820
#' highlight. If only one group of cells desired, can simply
820821
#' pass a vector instead of a list. If set, colors selected cells to the color(s)
@@ -875,6 +876,7 @@ DimPlot <- function(
875876
label.box = FALSE,
876877
repel = FALSE,
877878
alpha = 1,
879+
stroke.size = NULL,
878880
cells.highlight = NULL,
879881
cols.highlight = '#DE2D26',
880882
sizes.highlight = 1,
@@ -941,6 +943,7 @@ DimPlot <- function(
941943
shape.by = shape.by,
942944
order = order,
943945
alpha = alpha,
946+
stroke.size = stroke.size,
944947
label = FALSE,
945948
cells.highlight = cells.highlight,
946949
cols.highlight = cols.highlight,
@@ -8182,6 +8185,7 @@ SingleCorPlot <- function(
81828185
#' allowing for both different colors and different shapes on cells.
81838186
#' @param alpha Alpha value for plotting (default is 1)
81848187
#' @param alpha.by Mapping variable for the point alpha value
8188+
#' @param stroke.size Adjust stroke (outline) size of points
81858189
#' @param order Specify the order of plotting for the idents. This can be
81868190
#' useful for crowded plots if points of interest are being buried. Provide
81878191
#' either a full list of valid idents or a subset to be plotted last (on top).
@@ -8224,6 +8228,7 @@ SingleDimPlot <- function(
82248228
shape.by = NULL,
82258229
alpha = 1,
82268230
alpha.by = NULL,
8231+
stroke.size = NULL,
82278232
order = NULL,
82288233
label = FALSE,
82298234
repel = FALSE,
@@ -8242,6 +8247,10 @@ SingleDimPlot <- function(
82428247
raster <- raster %||% (nrow(x = data) > 1e5)
82438248
pt.size <- pt.size %||% AutoPointSize(data = data, raster = raster)
82448249

8250+
if (is.null(x = stroke.size)) {
8251+
stroke.size <- 0.600075815011372
8252+
}
8253+
82458254
if (!is.null(x = cells.highlight) && pt.size != AutoPointSize(data = data, raster = raster) && sizes.highlight != pt.size && isTRUE(x = raster)) {
82468255
warning("When `raster = TRUE` highlighted and non-highlighted cells must be the same size. Plot will use the value provided to 'sizes.highlight'.")
82478256
}
@@ -8352,7 +8361,8 @@ SingleDimPlot <- function(
83528361
alpha = alpha.by
83538362
),
83548363
size = pt.size,
8355-
alpha = alpha
8364+
alpha = alpha,
8365+
stroke = stroke.size
83568366
)
83578367
}
83588368
plot <- plot +

man/ColorDimSplit.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/DimPlot.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/MULTIseqDemux.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/SingleDimPlot.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)