Skip to content

Commit

Permalink
Merge branch 'develop' into fix/sce_conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwbutler committed Jun 7, 2021
2 parents 8debeb1 + 60230d6 commit dfa68df
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 15 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Seurat
Version: 4.0.2.9005
Date: 2021-06-02
Version: 4.0.2.9006
Date: 2021-06-07
Title: Tools for Single Cell Genomics
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.
Authors@R: c(
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Ensure proper reference.reduction is used in `MapQuery()`
- Fix to `UpdateSymbolList()`, no longer searches aliases and exposes the `search.types` parameter in `GeneSymbolThesarus()` ([#4545](https://github.com/satijalab/seurat/issues/4545))
- Transfer `scale.data` slot as well when converting with `as.SingleCellExperiment.Seurat()`
- Enable `alpha` parameter for `SpatialDimPlot()`

# Seurat 4.0.2 (2020-03-20)
## Added
Expand Down
39 changes: 30 additions & 9 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -2937,7 +2937,8 @@ ISpatialFeaturePlot <- function(
#' themeing will not work when plotting multiple features/groupings
#' @param pt.size.factor Scale the size of the spots.
#' @param alpha Controls opacity of spots. Provide as a vector specifying the
#' min and max
#' min and max for SpatialFeaturePlot. For SpatialDimPlot, provide a single
#' alpha value for each plot.
#' @param stroke Control the width of the border around the spots
#' @param interactive Launch an interactive SpatialDimPlot or SpatialFeaturePlot
#' session, see \code{\link{ISpatialDimPlot}} or
Expand Down Expand Up @@ -3177,6 +3178,11 @@ SpatialPlot <- function(
} else {
NULL
},
pt.alpha = if (!is.null(x = group.by)) {
alpha[j]
} else {
NULL
},
geom = if (inherits(x = image.use, what = "STARmap")) {
'poly'
} else {
Expand Down Expand Up @@ -7484,6 +7490,7 @@ SingleRasterMap <- function(
# By default, ggplot2 assigns colors
# @param image.alpha Adjust the opacity of the background images. Set to 0 to
# remove.
# @param pt.alpha Adjust the opacity of the points if plotting a SpatialDimPlot
# @param crop Crop the plot in to focus on points plotted. Set to FALSE to show
# entire background image.
# @param pt.size.factor Sets the size of the points relative to spot.radius
Expand All @@ -7510,6 +7517,7 @@ SingleSpatialPlot <- function(
image,
cols = NULL,
image.alpha = 1,
pt.alpha = NULL,
crop = TRUE,
pt.size.factor = NULL,
stroke = 0.25,
Expand Down Expand Up @@ -7550,14 +7558,27 @@ SingleSpatialPlot <- function(
plot <- switch(
EXPR = geom,
'spatial' = {
plot + geom_spatial(
point.size.factor = pt.size.factor,
data = data,
image = image,
image.alpha = image.alpha,
crop = crop,
stroke = stroke
) + coord_fixed() + theme(aspect.ratio = 1)
if (is.null(x = pt.alpha)) {
plot <- plot + geom_spatial(
point.size.factor = pt.size.factor,
data = data,
image = image,
image.alpha = image.alpha,
crop = crop,
stroke = stroke,
)
} else {
plot <- plot + geom_spatial(
point.size.factor = pt.size.factor,
data = data,
image = image,
image.alpha = image.alpha,
crop = crop,
stroke = stroke,
alpha = pt.alpha
)
}
plot + coord_fixed() + theme(aspect.ratio = 1)
},
'interactive' = {
plot + geom_spatial_interactive(
Expand Down
3 changes: 2 additions & 1 deletion man/ISpatialDimPlot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/ISpatialFeaturePlot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/LinkedPlots.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/SpatialPlot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dfa68df

Please sign in to comment.