Skip to content

Commit

Permalink
Merge pull request #9625 from joesphbeller/master
Browse files Browse the repository at this point in the history
Fix GroupCorrelation and GroupCorrelationPlot for Seurat V5 compatibility
  • Loading branch information
dcollins15 authored Feb 7, 2025
2 parents 1549c8d + e99bf99 commit 9755c16
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: Seurat
Version: 5.2.99.9000
Version: 5.2.99.9001
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
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Unreleased

## Changes
- Fixed `GroupCorrelation` and `GroupCorrelationPlot` to be compatible with `SeuratObject` >= 5.0.0 ([#9625](https://github.com/satijalab/seurat/pull/9625))

# Seurat 5.2.1 (2025-01-23)

## Changes
Expand Down
2 changes: 1 addition & 1 deletion R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ GroupCorrelation <- function(
grp.cors <- as.data.frame(x = grp.cors[which(x = !is.na(x = grp.cors))])
grp.cors$gene_grp <- gene.grp[rownames(x = grp.cors)]
colnames(x = grp.cors) <- c(paste0(var, "_cor"), "feature.grp")
object[[assay]][] <- grp.cors
object[[assay]] <- AddMetaData(object[[assay]], grp.cors)
if (isTRUE(x = do.plot)) {
print(GroupCorrelationPlot(
object = object,
Expand Down
2 changes: 1 addition & 1 deletion R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -4700,7 +4700,7 @@ GroupCorrelationPlot <- function(
cor = "nCount_RNA_cor"
) {
assay <- assay %||% DefaultAssay(object = object)
data <- object[[assay]][c(feature.group, cor)]
data <- object[[assay]][[c(feature.group, cor)]]
data <- data[complete.cases(data), ]
colnames(x = data) <- c('grp', 'cor')
data$grp <- as.character(data$grp)
Expand Down

0 comments on commit 9755c16

Please sign in to comment.