Skip to content

Commit

Permalink
Merge branch 'satijalab:master' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
rharao authored Jan 23, 2025
2 parents aa49249 + e4cc892 commit b6d660d
Show file tree
Hide file tree
Showing 23 changed files with 101 additions and 104 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: Seurat
Version: 5.1.0.9019
Version: 5.2.0
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 Expand Up @@ -31,7 +31,7 @@ Authors@R: c(
License: MIT + file LICENSE
URL: https://satijalab.org/seurat, https://github.com/satijalab/seurat
BugReports: https://github.com/satijalab/seurat/issues
Additional_repositories: https://satijalab.r-universe.dev, https://bnprks.r-universe.dev, https://cran.r-universe.dev
Additional_repositories: https://satijalab.r-universe.dev, https://bnprks.r-universe.dev
Depends:
R (>= 4.0.0),
methods,
Expand Down
22 changes: 8 additions & 14 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
# Unreleased
# Seurat 5.2.0 (2024-12-20)

## Changes
- Added `group.by` parameter to `FindAllMarkers`, allowing users to regroup their data using a non-default identity class prior to performing differential expression ([#9550](https://github.com/satijalab/seurat/pull/9550))
#' performing differential expression (see example); \code{"ident"} to use Idents
- Added `image.type` parameter to `Read10X_Image` enabling `VisiumV1` instances to be populated instead of instances of the default `VisiumV2` class ([#9556](https://github.com/satijalab/seurat/pull/9556))
- Fixed `IntegrateLayers` to respect the `dims.to.integrate` parameter.
- Fixed `IntegrateLayers` to respect the `dims.to.integrate` parameter
- Added `stroke.size` parameter to `DimPlot` ([#8180](https://github.com/satijalab/seurat/pull/8180))
- 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))
- Updated `RunUMAP` to support `umap-learn` version >= 0.5.0 ([#9559](https://github.com/satijalab/seurat/pull/9559))
- Surfaced more fine-grained control over what parts of a Xenium experiment are loaded in `LoadXenium`
- Added ability to load Xenium nucleus segmentation masks
- Updated `LoadXenium` to also read some run metadata (run start time, preservation method, panel used, organism, tissue type, instrument software version and stain kit used) into `misc` slot
- Updated `ReadXenium` to load cell_feature_matrix.h5 when present in favor of the MEX format files
- Added ability to read Xenium `segmentation_method` directly into `meta.data`
- Updated `ReadXenium` to load .parquet files using `arrow` instead of .csv.gz files to support XOA 3.0
- Updated `RunPCA` to use the `BPCells`-provided SVD solver on `BPCells` matrices; updated `JackStraw` to support `BPCells` matrices ([#8271](https://github.com/satijalab/seurat/pull/8271))
- Fixed `RunPCA` to avoid converting `BPCells` matrices into dense matrices - significantly reduces the function's memory usage when running on `BPCells` matrices ([#8966](https://github.com/satijalab/seurat/pull/8966))
- Updated `RunSLSI` to support `BPCells` matrices
- Fixed `LoadXenium` to accommodate datasets without "Blank Codeword" or "Unassigned Codeword" matrices
- Updated `RunUMAP` to support `umap-learn` version >= 0.5.0 ([#9559](https://github.com/satijalab/seurat/pull/9559))
- Updated `LoadXenium` and `ReadXenium` to accommodate the output from `XOA` v3.0; updated `LoadXenium` to provide more fine-grained control over the datatypes parsed in, including nucleus segmentation masks, segmentation methods, and other experimental metadata; updated `ReadXenium` to load cell_feature_matrix.h5 when present in favor of the MEX format files; updated `ReadXenium` to load .parquet files using `arrow` instead of .csv.gz files to support XOA 3.0 ([#8604](https://github.com/satijalab/seurat/pull/8605))
- Fixed `LoadXenium` to accommodate datasets without "Blank Codeword" or "Unassigned Codeword" matrices([#9135](https://github.com/satijalab/seurat/pull/9135))
- Fixed `ReadXenium` to properly parse multiple molecular outputs at once ([#8265](https://github.com/satijalab/seurat/issues/8265))
- Fixed `RunPCA` to avoid converting `BPCells` matrices into dense matrices - significantly reduces the function's memory usage when running on `BPCells` matrices
- Added `features` parameter to `LeverageScore` and `SketchData`
- Updated `SketchData`'s `ncells` parameter to accept integer vector
- Updated `JackStraw` to support `BPCells` matrices
- Updated `RunPCA` to use the `BPCells`-provided SVD solver on `BPCells` matrices


# Seurat 5.1.0 (2024-05-08)

Expand Down
2 changes: 1 addition & 1 deletion R/clustering.R
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ FindClusters.Seurat <- function(
#' distance matrix; note, for objects of class \code{dist}, this parameter will
#' be set automatically
#' @param k.param Defines k for the k-nearest neighbor algorithm
#' @param return.neighbor Return result as \code{\link{Neighbor}} object. Not
#' @param return.neighbor Return result as \code{\link[SeuratObject]{Neighbor}} object. Not
#' used with distance matrix input.
#' @param compute.SNN also compute the shared nearest neighbor graph
#' @param prune.SNN Sets the cutoff for acceptable Jaccard index when
Expand Down
18 changes: 9 additions & 9 deletions R/generics.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ FindMarkers <- function(object, ...) {
#' @param object An object
#' @param ... Arguments passed to other methods
#'
#' @return This function can either return a \code{\link{Neighbor}} object
#' with the KNN information or a list of \code{\link{Graph}} objects with
#' @return This function can either return a \code{\link[SeuratObject]{Neighbor}} object
#' with the KNN information or a list of \code{\link[SeuratObject]{Graph}} objects with
#' the KNN and SNN depending on the settings of \code{return.neighbor} and
#' \code{compute.SNN}. When running on a \code{\link{Seurat}} object, this
#' returns the \code{\link{Seurat}} object with the Graphs or Neighbor objects
#' \code{compute.SNN}. When running on a \code{\link[SeuratObject]{Seurat}} object, this
#' returns the \code{\link[SeuratObject]{Seurat}} object with the Graphs or Neighbor objects
#' stored in their respective slots. Names of the Graph or Neighbor object can
#' be found with \code{\link{Graphs}} or \code{\link{Neighbors}}.
#' be found with \code{\link[SeuratObject]{Graphs}} or \code{\link[SeuratObject]{Neighbors}}.
#'
#' @examples
#' data("pbmc_small")
Expand Down Expand Up @@ -277,7 +277,7 @@ GetAssay <- function(object, ...) {
#' @param reductions Name of reductions to be integrated. For a
#' TransferAnchorSet, this should be the name of a reduction present in the
#' anchorset object (for example, "pcaproject"). For an IntegrationAnchorSet,
#' this should be a \code{\link{DimReduc}} object containing all cells present
#' this should be a \code{\link[SeuratObject]{DimReduc}} object containing all cells present
#' in the anchorset object.
#' @param dims.to.integrate Number of dimensions to return integrated values for
#' @param weight.reduction Dimension reduction to use when calculating anchor
Expand All @@ -287,7 +287,7 @@ GetAssay <- function(object, ...) {
#' all objects to be integrated}
#' \item{A vector of strings, specifying the name of a dimension reduction to
#' use for each object to be integrated}
#' \item{A vector of \code{\link{DimReduc}} objects, specifying the object to
#' \item{A vector of \code{\link[SeuratObject]{DimReduc}} objects, specifying the object to
#' use for each object in the integration}
#' \item{NULL, in which case the full corrected space is used for computing
#' anchor weights.}
Expand Down Expand Up @@ -470,7 +470,7 @@ PseudobulkExpression <- function(object, ...) {
#'
#' @return Returns a combined Seurat object with the CCA results stored.
#'
#' @seealso \code{\link{merge.Seurat}}
#' @seealso \code{\link[SeuratObject]{merge.Seurat}}
#'
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -600,7 +600,7 @@ RunSLSI <- function(object, ...) {
#' @references Barshan E, Ghodsi A, Azimifar Z, Jahromi MZ.
#' Supervised principal component analysis: Visualization, classification and
#' regression on subspaces and submanifolds.
#' Pattern Recognition. 2011 Jul 1;44(7):1357-71. \url{https://www.sciencedirect.com/science/article/pii/S0031320310005819?casa_token=AZMFg5OtPnAAAAAA:_Udu7GJ7G2ed1-XSmr-3IGSISUwcHfMpNtCj-qacXH5SBC4nwzVid36GXI3r8XG8dK5WOQui};
#' Pattern Recognition. 2011 Jul 1;44(7):1357-71. \url{doi:10.1016/j.patcog.2010.12.015};
#' @export
#'
#' @rdname RunSPCA
Expand Down
34 changes: 17 additions & 17 deletions R/integration.R
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ ReciprocalProject <- function(
#' these scores to dampen outlier effects and rescale to range between 0-1.}
#' }
#'
#' @param reference \code{\link{Seurat}} object to use as the reference
#' @param query \code{\link{Seurat}} object to use as the query
#' @param reference \code{\link[SeuratObject]{Seurat}} object to use as the reference
#' @param query \code{\link[SeuratObject]{Seurat}} object to use as the query
#' @param reference.assay Name of the Assay to use from reference
#' @param reference.neighbors Name of the Neighbor to use from the reference.
#' Optionally enables reuse of precomputed neighbors.
Expand Down Expand Up @@ -689,7 +689,7 @@ ReciprocalProject <- function(
#' @param n.trees More trees gives higher precision when using annoy approximate
#' nearest neighbor search
#' @param eps Error bound on the neighbor finding algorithm (from
#' \code{\link{RANN}} or \code{\link{RcppAnnoy}})
#' \code{\link[RANN]{RANN}} or \code{\link[RcppAnnoy]{RcppAnnoy}})
#' @param approx.pca Use truncated singular value decomposition to approximate
#' PCA
#' @param mapping.score.k Compute and store nearest k query neighbors in the
Expand Down Expand Up @@ -1334,8 +1334,8 @@ GetTransferPredictions <- function(object, assay = "predictions", slot = "data",
#' all objects to be integrated}
#' \item{A vector of strings, specifying the name of a dimension reduction to
#' use for each object to be integrated}
#' \item{A vector of \code{\link{DimReduc}} objects, specifying the object to
#' use for each object in the integration}
#' \item{A vector of \code{\link[SeuratObject]{DimReduc}} objects,
#' specifying the object to use for each object in the integration}
#' \item{NULL, in which case a new PCA will be calculated and used to
#' calculate anchor weights}
#' }
Expand Down Expand Up @@ -1364,11 +1364,11 @@ GetTransferPredictions <- function(object, assay = "predictions", slot = "data",
#' @param preserve.order Do not reorder objects based on size for each pairwise
#' integration.
#' @param eps Error bound on the neighbor finding algorithm (from
#' \code{\link{RANN}})
#' \code{\link[RANN]{RANN}})
#' @param verbose Print progress bars and output
#'
#' @return Returns a \code{\link{Seurat}} object with a new integrated
#' \code{\link{Assay}}. If \code{normalization.method = "LogNormalize"}, the
#' @return Returns a \code{\link[SeuratObject]{Seurat}} object with a new integrated
#' \code{\link[SeuratObject]{Assay}}. If \code{normalization.method = "LogNormalize"}, the
#' integrated data is returned to the \code{data} slot and can be treated as
#' log-normalized, corrected data. If \code{normalization.method = "SCT"}, the
#' integrated data is returned to the \code{scale.data} slot and can be treated
Expand Down Expand Up @@ -2756,10 +2756,10 @@ MixingMetric <- function(
#' anchor.features for efficiency in downstream processing. }
#' }
#'
#' @param object.list A list of \code{\link{Seurat}} objects to prepare for integration
#' @param assay The name of the \code{\link{Assay}} to use for integration. This can be a
#' @param object.list A list of \code{\link[SeuratObject]{Seurat}} objects to prepare for integration
#' @param assay The name of the \code{\link[SeuratObject]{Assay}} to use for integration. This can be a
#' single name if all the assays to be integrated have the same name, or a character vector
#' containing the name of each \code{\link{Assay}} in each object to be integrated. The
#' containing the name of each \code{\link[SeuratObject]{Assay}} in each object to be integrated. The
#' specified assays must have been normalized using \code{\link{SCTransform}}.
#' If NULL (default), the current default assay for each object is used.
#' @param anchor.features Can be either:
Expand All @@ -2773,7 +2773,7 @@ MixingMetric <- function(
#' the Pearson residual will be clipped to
#' @param verbose Display output/messages
#'
#' @return A list of \code{\link{Seurat}} objects with the appropriate \code{scale.data} slots
#' @return A list of \code{\link[SeuratObject]{Seurat}} objects with the appropriate \code{scale.data} slots
#' containing only the required \code{anchor.features}.
#'
#' @importFrom pbapply pblapply
Expand Down Expand Up @@ -3219,7 +3219,7 @@ SelectSCTIntegrationFeatures <- function(
#' \item{lsiproject: Use the projected LSI used for anchor building}
#' \item{pca: Use an internal PCA on the query only}
#' \item{cca: Use the CCA used for anchor building}
#' \item{custom DimReduc: User provided \code{\link{DimReduc}} object
#' \item{custom DimReduc: User provided \code{\[SeuratObject]{DimReduc}} object
#' computed on the query cells}
#' }
#' @param l2.norm Perform L2 normalization on the cell embeddings after
Expand All @@ -3230,7 +3230,7 @@ SelectSCTIntegrationFeatures <- function(
#' @param k.weight Number of neighbors to consider when weighting anchors
#' @param sd.weight Controls the bandwidth of the Gaussian kernel for weighting
#' @param eps Error bound on the neighbor finding algorithm (from
#' \code{\link{RANN}})
#' \code{\link[RANN]{RANN}})
#' @param n.trees More trees gives higher precision when using annoy approximate
#' nearest neighbor search
#' @param verbose Print progress bars and output
Expand Down Expand Up @@ -4599,7 +4599,7 @@ GetCellOffsets <- function(anchors, dataset, cell, cellnames.list, cellnames) {
# query, and weights will need to be calculated for all cells in the object.
# @param sd.weight Controls the bandwidth of the Gaussian kernel for weighting
# @param preserve.order Do not reorder objects based on size for each pairwise integration.
# @param eps Error bound on the neighbor finding algorithm (from \code{\link{RANN}})
# @param eps Error bound on the neighbor finding algorithm (from \code{\link[RANN]{RANN}})
# @param verbose Print progress bars and output
#
# @return Returns an integrated matrix
Expand Down Expand Up @@ -4742,7 +4742,7 @@ NNtoMatrix <- function(idx, distance, k) {
# @param preserve.order Do not reorder objects based on size for each pairwise
# integration.
# @param eps Error bound on the neighbor finding algorithm (from
# \code{\link{RANN}})
# \code{\link[RANN]{RANN}})
# @param verbose Print progress bars and output
#
# @return Returns a Seurat object with a new integrated Assay
Expand Down Expand Up @@ -5497,7 +5497,7 @@ ReferenceRange <- function(x, lower = 0.025, upper = 0.975) {
# query, and weights will need to be calculated for all cells in the object.
# @param sd.weight Controls the bandwidth of the Gaussian kernel for weighting
# @param sample.tree Specify the order of integration. If NULL, will compute automatically.
# @param eps Error bound on the neighbor finding algorithm (from \code{\link{RANN}})
# @param eps Error bound on the neighbor finding algorithm (from \code{\link[RANN]{RANN}})
# @param verbose Print progress bars and output
#
RunIntegration <- function(
Expand Down
2 changes: 1 addition & 1 deletion R/integration5.R
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ attr(x = CCAIntegration, which = 'Seurat.method') <- 'integration'
#' @param object A \code{Seurat} object
#' @param assay Name of \code{Assay} in the \code{Seurat} object
#' @param layers Names of layers in \code{assay}
#' @param orig A \link[SeuratObject:DimReduc]{dimensional reduction} to correct
#' @param orig A \link[SeuratObject]{DimReduc} to correct
#' @param new.reduction Name of new integrated dimensional reduction
#' @param reference A reference \code{Seurat} object
#' @param features A vector of features to use for integration
Expand Down
8 changes: 4 additions & 4 deletions R/objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ IntegrationData <- setClass(
#' @slot arguments other information used in SCTransform
#' @slot median_umi Median UMI (or scale factor) used to calculate corrected counts
#'
#' @seealso \code{\link{Assay}}
#' @seealso \code{\link[SeuratObject]{Assay}}
#'
#' @name SCTAssay-class
#' @rdname SCTAssay-class
Expand All @@ -215,12 +215,12 @@ SCTModel <- setClass(

#' The SCTAssay Class
#'
#' The SCTAssay object contains all the information found in an \code{\link{Assay}}
#' The SCTAssay object contains all the information found in an \code{\link[SeuratObject]{Assay}}
#' object, with extra information from the results of \code{\link{SCTransform}}
#'
#' @slot SCTModel.list A list containing SCT models
#'
#' @seealso \code{\link{Assay}}
#' @seealso \code{\link[SeuratObject]{Assay}}
#'
#' @name SCTAssay-class
#' @rdname SCTAssay-class
Expand Down Expand Up @@ -904,7 +904,7 @@ TopCells <- function(object, dim = 1, ncells = 20, balanced = FALSE, ...) {
#'
#' Return a vector of cell names of the nearest n cells.
#'
#' @param object \code{\link{Neighbor}} object
#' @param object \code{\link[SeuratObject]{Neighbor}} object
#' @param cell Cell of interest
#' @param n Number of neighbors to return
#'
Expand Down
6 changes: 3 additions & 3 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -6320,9 +6320,9 @@ WhiteBackground <- function(...) {
#' Prepare Coordinates for Spatial Plots
#'
#' @inheritParams SeuratObject::GetTissueCoordinates
#' @param model A \code{\linkS4class{Segmentation}},
#' \code{\linkS4class{Centroids}},
#' or \code{\linkS4class{Molecules}} object
#' @param model A \code{\link[SeuratObject:Segmentation-class]{Segmentation}},
#' \code{\link[SeuratObject:Centroids-class]{Centroids}},
#' or \code{\link[SeuratObject:Molecules-class]{Molecules}} object
#' @param data Extra data to be used for annotating the cell segmentations; the
#' easiest way to pass data is a one-column
#' \code{\link[base:data.frame]{data frame}} with the values to color by and
Expand Down
Loading

0 comments on commit b6d660d

Please sign in to comment.