Skip to content

Commit

Permalink
Merge pull request #8878 from satijalab/develop
Browse files Browse the repository at this point in the history
Release/5.1.0
  • Loading branch information
dcollins15 committed May 10, 2024
2 parents c54e57d + 95583fd commit 1549dcb
Show file tree
Hide file tree
Showing 91 changed files with 2,245 additions and 325 deletions.
8 changes: 5 additions & 3 deletions DESCRIPTION
@@ -1,11 +1,12 @@
Package: Seurat
Version: 5.0.3
Date: 2024-03-18
Version: 5.1.0
Date: 2024-05-08
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(
person(given = "Andrew", family = "Butler", email = "abutler@nygenome.org", role = "ctb", comment = c(ORCID = "0000-0003-3608-0463")),
person(given = "Saket", family = "Choudhary", email = "schoudhary@nygenome.org", role = "ctb", comment = c(ORCID = "0000-0001-5202-7633")),
person(given = 'David', family = 'Collins', email = 'dcollins@nygenome.org', role = 'ctb', comment = c(ORCID = '0000-0001-9243-7821')),
person(given = "Charlotte", family = "Darby", email = "cdarby@nygenome.org", role = "ctb", comment = c(ORCID = "0000-0003-2195-5300")),
person(given = "Jeff", family = "Farrell", email = "jfarrell@g.harvard.edu", role = "ctb"),
person(given = "Isabella", family = "Grabski", email = "igrabski@nygenome.org", role = "ctb", comment = c(ORCID = "0000-0002-0616-5469")),
Expand Down Expand Up @@ -34,7 +35,7 @@ Additional_repositories: https://satijalab.r-universe.dev, https://bnprks.r-univ
Depends:
R (>= 4.0.0),
methods,
SeuratObject (>= 5.0.0)
SeuratObject (>= 5.0.2)
Imports:
cluster,
cowplot,
Expand Down Expand Up @@ -117,6 +118,7 @@ RoxygenNote: 7.3.1
Encoding: UTF-8
Suggests:
ape,
arrow,
BPCells,
rsvd,
testthat,
Expand Down
7 changes: 7 additions & 0 deletions NAMESPACE
Expand Up @@ -52,6 +52,7 @@ S3method(GetImage,VisiumV1)
S3method(GetTissueCoordinates,STARmap)
S3method(GetTissueCoordinates,SlideSeq)
S3method(GetTissueCoordinates,VisiumV1)
S3method(GetTissueCoordinates,VisiumV2)
S3method(HVFInfo,SCTAssay)
S3method(IntegrateEmbeddings,IntegrationAnchorSet)
S3method(IntegrateEmbeddings,TransferAnchorSet)
Expand Down Expand Up @@ -133,6 +134,7 @@ S3method(ScaleData,Seurat)
S3method(ScaleData,StdAssay)
S3method(ScaleData,default)
S3method(ScaleFactors,VisiumV1)
S3method(ScaleFactors,VisiumV2)
S3method(ScoreJackStraw,DimReduc)
S3method(ScoreJackStraw,JackStrawData)
S3method(ScoreJackStraw,Seurat)
Expand All @@ -153,6 +155,7 @@ S3method(components,SCTAssay)
S3method(dim,STARmap)
S3method(dim,SlideSeq)
S3method(dim,VisiumV1)
S3method(dim,VisiumV2)
S3method(fortify,Centroids)
S3method(fortify,Molecules)
S3method(fortify,Segmentation)
Expand Down Expand Up @@ -353,7 +356,9 @@ export(PurpleAndYellow)
export(RPCAIntegration)
export(Radius)
export(Read10X)
export(Read10X_Coordinates)
export(Read10X_Image)
export(Read10X_ScaleFactors)
export(Read10X_h5)
export(Read10X_probe_metadata)
export(ReadAkoya)
Expand Down Expand Up @@ -463,9 +468,11 @@ exportClasses(SeuratCommand)
exportClasses(SpatialImage)
exportClasses(TransferAnchorSet)
exportClasses(VisiumV1)
exportClasses(VisiumV2)
importClassesFrom(Matrix,dgCMatrix)
importClassesFrom(SeuratObject,Assay)
importClassesFrom(SeuratObject,DimReduc)
importClassesFrom(SeuratObject,FOV)
importClassesFrom(SeuratObject,Graph)
importClassesFrom(SeuratObject,JackStrawData)
importClassesFrom(SeuratObject,Neighbor)
Expand Down
18 changes: 18 additions & 0 deletions NEWS.md
@@ -1,3 +1,21 @@
# Seurat 5.1.0 (2024-05-08)

## Changes
- Updated interactive `SpatialDimPlot`s to display spatial coordinates
- Updated `BuildClusterTree` to `PseudobulkExpression(..., method = "aggregate")` instead of `AverageExpression`
- Fixed `SpatialPlot` to properly handle images with shared cells
- Added `cluster.name` parameter to `BuildNicheAssay`
- Added `VisiumV2` class, inherits `SeuratObject::FOV`, returned by `Load10X_Spatial`
- Updated `Load10X_Spatial` to support loading Visium HD datasets - added `bin.size` parameter
- Updated `Read10X_Coordinates` to handle new `tissue_coordinates.parquet` files
- Added `shape` parameter to `SpatialPlot` and wrappers: `SpatialFeaturePlot` and `SpatialDimPlot`
- Added `image.scale` parameter to `SpatialPlot` and related functions: `SpatialFeaturePlot`/`ISpatialFeaturePlot` and `SpatialDimPlot`/`ISpatialDimPlot`
- Restored `image.name` parameter to `Read10X_Image`
- Added `scale` parameter to `Radius.VisiumV1`
- Fixed calculation of `spot.radius` attribute for `VisiumV1` instance returned by `Read10X_Image` — replace `scale.factors$fiducial` with `scale.factors$spot`
- Added `Read10X_Coordinates` and `Read10X_ScaleFactors`
- Fixed `SpatialPlot` to properly handle mutli-assay `Seurat` instances

# Seurat 5.0.3 (2024-03-18)

## Changes
Expand Down
12 changes: 10 additions & 2 deletions R/convenience.R
Expand Up @@ -258,7 +258,9 @@ SpatialDimPlot <- function(
pt.size.factor = 1.6,
alpha = c(1, 1),
image.alpha = 1,
stroke = 0.25,
image.scale = "lowres",
shape = 21,
stroke = NA,
label.box = TRUE,
interactive = FALSE,
information = NULL
Expand All @@ -281,6 +283,8 @@ SpatialDimPlot <- function(
pt.size.factor = pt.size.factor,
alpha = alpha,
image.alpha = image.alpha,
image.scale = image.scale,
shape = shape,
stroke = stroke,
label.box = label.box,
interactive = interactive,
Expand All @@ -307,7 +311,9 @@ SpatialFeaturePlot <- function(
pt.size.factor = 1.6,
alpha = c(1, 1),
image.alpha = 1,
stroke = 0.25,
image.scale = "lowres",
shape = 21,
stroke = NA,
interactive = FALSE,
information = NULL
) {
Expand All @@ -325,6 +331,8 @@ SpatialFeaturePlot <- function(
pt.size.factor = pt.size.factor,
alpha = alpha,
image.alpha = image.alpha,
image.scale = image.scale,
shape = shape,
stroke = stroke,
interactive = interactive,
information = information
Expand Down
2 changes: 1 addition & 1 deletion R/differential_expression.R
Expand Up @@ -910,9 +910,9 @@ FindMarkers.DimReduc <- function(
#'
FindMarkers.Seurat <- function(
object,
latent.vars = NULL,
ident.1 = NULL,
ident.2 = NULL,
latent.vars = NULL,
group.by = NULL,
subset.ident = NULL,
assay = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/generics.R
Expand Up @@ -321,7 +321,6 @@ IntegrateEmbeddings <- function(anchorset, ...) {
#'
#' @export
#'
#'
LeverageScore <- function(object, ...) {
UseMethod(generic = 'LeverageScore', object = object)
}
Expand Down Expand Up @@ -454,6 +453,7 @@ ProjectUMAP <- function(query, ...) {
#'
#' @rdname PseudobulkExpression
#' @export PseudobulkExpression
#' @concept utilities
#'
PseudobulkExpression <- function(object, ...) {
UseMethod(generic = "PseudobulkExpression", object = object)
Expand Down
28 changes: 23 additions & 5 deletions R/integration.R
Expand Up @@ -981,7 +981,7 @@ FindTransferAnchors <- function(
LayerData(object = combined.ob, layer = data.layer.name) <- layer.data # set layer data
}
colnames(x = orig.loadings) <- paste0("ProjectPC_", 1:ncol(x = orig.loadings))

combined.ob[["pcaproject"]] <- combined.pca
Loadings(object = combined.ob[["pcaproject"]], projected = FALSE) <- orig.loadings[, dims]
Loadings(object = combined.ob[["pcaproject"]]) <- orig.loadings[, dims]
Expand Down Expand Up @@ -1901,6 +1901,7 @@ IntegrateEmbeddings.TransferAnchorSet <- function(
#' @importFrom Matrix t
#'
#' @export
#' @concept integration
#'
ProjectIntegration <- function(
object,
Expand Down Expand Up @@ -3056,6 +3057,7 @@ SelectIntegrationFeatures <- function(
#' @param ... Arguments passed on to \code{method}
#'
#' @export
#' @concept integration
#'
SelectIntegrationFeatures5 <- function(
object,
Expand Down Expand Up @@ -3088,6 +3090,7 @@ SelectIntegrationFeatures5 <- function(
#' @param ... Arguments passed on to \code{method}
#'
#' @export
#' @concept integration
#'
SelectSCTIntegrationFeatures <- function(
object,
Expand Down Expand Up @@ -6506,6 +6509,7 @@ ValidateParams_IntegrateEmbeddings_TransferAnchors <- function(
#' @importFrom Matrix sparseMatrix
#'
#' @export
#' @concept integration
#'
NNtoGraph <- function(
nn.object,
Expand Down Expand Up @@ -6670,7 +6674,9 @@ FindAssayAnchor <- function(
#'
#' @importFrom MASS ginv
#' @return Returns a object list in which each object has a bridge cell derived assay
#'
#' @export
#' @concept integration
#'
BridgeCellsRepresentation <- function(object.list,
bridge.object,
Expand Down Expand Up @@ -6822,7 +6828,8 @@ BridgeCellsRepresentation <- function(object.list,
#' @return Returns an \code{\link{AnchorSet}} object that can be used as input to
#' \code{\link{IntegrateEmbeddings}}.or \code{\link{MapQuery}}
#'

#' @keywords internal
#'
FindBridgeAnchor <- function(object.list,
bridge.object,
object.reduction,
Expand Down Expand Up @@ -7346,7 +7353,10 @@ SmoothLabels <- function(labels, clusters) {
#' @param verbose Print progress and message
#'
#' @return Returns a query-only or query-reference combined seurat object
#'
#' @export
#' @concept integration
#'
ProjectDimReduc <- function(query,
reference,
mode = c('pcaproject', 'lsiproject'),
Expand Down Expand Up @@ -7492,11 +7502,13 @@ ProjectDimReduc <- function(query,
#' @param laplacian.reduction.dims Number of dimensions used for graph laplacian eigenspace (default is 50)
#' @param verbose Print progress and message (default is TRUE)
#'
#' @export
#' @return Returns a \code{BridgeReferenceSet} that can be used as input to
#' \code{\link{FindBridgeTransferAnchors}}.
#' The parameters used are stored in the \code{BridgeReferenceSet} as well
#'
#' @export
#' @concept integration
#'
PrepareBridgeReference <- function (
reference,
bridge,
Expand Down Expand Up @@ -7642,11 +7654,13 @@ PrepareBridgeReference <- function (
#' }
#' @param verbose Print messages and progress
#'
#' @export
#' @return Returns an \code{AnchorSet} object that can be used as input to
#' \code{\link{TransferData}}, \code{\link{IntegrateEmbeddings}} and
#' \code{\link{MapQuery}}.
#'
#' @export
#' @concept integration
#'
FindBridgeTransferAnchors <- function(
extended.reference,
query,
Expand Down Expand Up @@ -7725,10 +7739,12 @@ FindBridgeTransferAnchors <- function(
#' }
#' }
#'
#' @export
#' @return Returns an \code{AnchorSet} object that can be used as input to
#' \code{\link{IntegrateEmbeddings}}.
#'
#' @export
#' @concept integration
#'
FindBridgeIntegrationAnchors <- function(
extended.reference,
query,
Expand Down Expand Up @@ -7807,6 +7823,7 @@ FindBridgeIntegrationAnchors <- function(
#' @importFrom rlang exec
#' @return Returns a Seurat object with integrated dimensional reduction
#' @export
#' @concept integration
#'
FastRPCAIntegration <- function(
object.list,
Expand Down Expand Up @@ -7912,6 +7929,7 @@ FastRPCAIntegration <- function(
#' @importFrom Matrix t
#'
#' @export
#' @concept integration
#'
UnSketchEmbeddings <- function(
atom.data,
Expand Down
4 changes: 4 additions & 0 deletions R/integration5.R
Expand Up @@ -158,6 +158,7 @@ attr(x = HarmonyIntegration, which = 'Seurat.method') <- 'integration'
#'
#' @inheritParams RPCAIntegration
#' @export
#' @concept integration
#'
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -342,6 +343,8 @@ attr(x = CCAIntegration, which = 'Seurat.method') <- 'integration'
#' @param ... Arguments passed on to \code{FindIntegrationAnchors}
#' @export
#'
#' @concept utilities
#'
RPCAIntegration <- function(
object = NULL,
assay = NULL,
Expand Down Expand Up @@ -444,6 +447,7 @@ attr(x = RPCAIntegration, which = 'Seurat.method') <- 'integration'
#' @inheritParams IntegrateEmbeddings
#' @param ... Arguments passed on to \code{FindIntegrationAnchors}
#' @export
#' @concept integration
#'
JointPCAIntegration <- function(
object = NULL,
Expand Down

0 comments on commit 1549dcb

Please sign in to comment.