From 8b8070eddfc974dcd79196661029673925406cda Mon Sep 17 00:00:00 2001 From: David Collins Date: Tue, 12 Mar 2024 16:18:03 -0400 Subject: [PATCH 01/23] Drop duplicate test for SCTransform v2 --- tests/testthat/test_preprocessing.R | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tests/testthat/test_preprocessing.R b/tests/testthat/test_preprocessing.R index 42f229ecf..a32bb4d28 100644 --- a/tests/testthat/test_preprocessing.R +++ b/tests/testthat/test_preprocessing.R @@ -397,28 +397,6 @@ test_that("SCTransform v1 works as expected", { expect_equal(fa["MS4A1", "residual_variance"], 2.875761, tolerance = 1e-6) }) -test_that("SCTransform v2 works as expected", { - skip_on_cran() - skip_if_not_installed("glmGamPoi") - - object <- suppressWarnings(SCTransform(object = object, verbose = FALSE, vst.flavor = "v2", seed.use = 1448145)) - - expect_true("SCT" %in% names(object)) - expect_equal(as.numeric(colSums(GetAssayData(object = object[["SCT"]], layer = "scale.data"))[1]), 24.5183, tolerance = 1e-2) - expect_equal(as.numeric(rowSums(GetAssayData(object = object[["SCT"]], layer = "scale.data"))[5]), 0) - expect_equal(as.numeric(colSums(GetAssayData(object = object[["SCT"]], layer = "data"))[1]), 58.65829, tolerance = 1e-6) - expect_equal(as.numeric(rowSums(GetAssayData(object = object[["SCT"]], layer = "data"))[5]), 13.75449, tolerance = 1e-6) - expect_equal(as.numeric(colSums(GetAssayData(object = object[["SCT"]], layer = "counts"))[1]), 141) - expect_equal(as.numeric(rowSums(GetAssayData(object = object[["SCT"]], layer = "counts"))[5]), 40) - expect_equal(length(VariableFeatures(object[["SCT"]])), 220) - fa <- SCTResults(object = object, assay = "SCT", slot = "feature.attributes") - expect_equal(fa["MS4A1", "detection_rate"], 0.15) - expect_equal(fa["MS4A1", "gmean"], 0.2027364, tolerance = 1e-6) - expect_equal(fa["MS4A1", "variance"], 1.025158, tolerance = 1e-6) - expect_equal(fa["MS4A1", "residual_mean"], 0.2763993, tolerance = 1e-6) - expect_equal(fa["MS4A1", "residual_variance"], 3.023062, tolerance = 1e-6) -}) - suppressWarnings(RNGversion(vstr = "3.5.0")) object <- suppressWarnings(SCTransform(object = object, vst.flavor = "v1", ncells = 80, verbose = FALSE, seed.use = 42)) test_that("SCTransform ncells param works", { From 8ca1dbcc24ea68411cf15e300d5c075516572cbc Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 13 Mar 2024 10:14:12 -0400 Subject: [PATCH 02/23] Add test for SCTransform's `clip.range` param --- tests/testthat/test_preprocessing.R | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/testthat/test_preprocessing.R b/tests/testthat/test_preprocessing.R index a32bb4d28..b2d0aed4c 100644 --- a/tests/testthat/test_preprocessing.R +++ b/tests/testthat/test_preprocessing.R @@ -451,6 +451,37 @@ test_that("SCTransform v2 works as expected", { expect_equal(fa["FCER2", "theta"], Inf) }) +test_that("SCTransform `clip.range` param works as expected", { + # make a copy of the testing data + test.data <- object + # override defaults for ease of testing + clip.min <- -0.1 + clip.max <- 0.1 + + # for some reason, the clipping seems to be a little fuzzy at the upper end, + # since this is expected behaviour we'll need to accomodate the difference + clip.max.tolerance <- 0.1 + + test.result <- SCTransform( + test.data, + clip.range = c(clip.min, clip.max), + ) + scale.data <- LayerData(test.result[["SCT"]], layer = "scale.data") + expect_true(min(scale.data) >= clip.min) + expect_true(max(scale.data) <= (clip.max + clip.max.tolerance)) + + # when `ncells` is less than the size of the dataset the residuals will get + # re-clipped in batches, make sure this clipping is done correctly as well + test.result <- SCTransform( + test.data, + clip.range = c(clip.min, clip.max), + ncells = 40 + ) + scale.data <- LayerData(test.result[["SCT"]], layer = "scale.data") + expect_true(min(scale.data) >= clip.min) + expect_true(max(scale.data) <= (clip.max + clip.max.tolerance)) +}) + test_that("SCTransform `vars.to.regress` param works as expected", { # make a copy of the testing data test.data <- object From 8d7bf3c0ae33ee4d1ce164e29c47fff7d2d3ba0f Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 13 Mar 2024 09:58:39 -0400 Subject: [PATCH 03/23] Fix clip.range handling in SCTransfrom.StdAssay --- R/preprocessing5.R | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/R/preprocessing5.R b/R/preprocessing5.R index 98c4bd78d..f5e56e652 100644 --- a/R/preprocessing5.R +++ b/R/preprocessing5.R @@ -1289,7 +1289,6 @@ SCTransform.StdAssay <- function( counts.x <- as.sparse(x = layer.data[, sample.int(n = ncol(x = layer.data), size = min(ncells, ncol(x = layer.data)) )]) min_var <- (median(counts.x@x)/5)^2 } - res_clip_range <- vst_out.reference$arguments$res_clip_range # Step 2: Use learned model to calculate residuals in chunks cells.vector <- 1:ncol(x = layer.data) @@ -1324,7 +1323,7 @@ SCTransform.StdAssay <- function( umi = counts.vp[variable.features,,drop=FALSE], residual_type = "pearson", min_variance = min_var, - res_clip_range = res_clip_range, + res_clip_range = clip.range, verbosity = FALSE ) } else { @@ -1333,7 +1332,7 @@ SCTransform.StdAssay <- function( umi = counts.vp[all_features,,drop=FALSE], residual_type = "pearson", min_variance = min_var, - res_clip_range = res_clip_range, + res_clip_range = clip.range, verbosity = FALSE ) } @@ -1408,9 +1407,14 @@ SCTransform.StdAssay <- function( layer.counts.tmp <- as.sparse(x = layer.counts.tmp) vst_out$cell_attr <- vst_out$cell_attr[, c("log_umi"), drop=FALSE] vst_out$model_pars_fit <- vst_out$model_pars_fit[variable.features.target,,drop=FALSE] - new_residual <- GetResidualsChunked(vst_out = vst_out, layer.counts = layer.counts.tmp, - residual_type = "pearson", min_variance = min_var, res_clip_range = res_clip_range, - verbose = FALSE) + new_residual <- GetResidualsChunked( + vst_out = vst_out, + layer.counts = layer.counts.tmp, + residual_type = "pearson", + min_variance = min_var, + res_clip_range = clip.range, + verbose = FALSE + ) old_residual <- GetAssayData(object = sct.assay.list[[layer.name]], slot = 'scale.data') merged_residual <- rbind(old_residual, new_residual) merged_residual <- ScaleData( From 709a64abed53d3a4f49ebc94b4bcbf302d7d3dbf Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 13 Mar 2024 11:04:56 -0400 Subject: [PATCH 04/23] Bump version --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e894d75e0..cd2b8d5e0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: Seurat -Version: 5.0.2 -Date: 2024-02-28 +Version: 5.0.3.9001 +Date: 2024-03-13 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) , Macosko E, Basu A, Satija R, et al (2015) , Stuart T, Butler A, et al (2019) , and Hao, Hao, et al (2020) for more details. Authors@R: c( From a0770946d400b78e5f51af5715b8ae630a9a8206 Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 13 Mar 2024 11:05:02 -0400 Subject: [PATCH 05/23] Update NEWS --- NEWS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS.md b/NEWS.md index 61a7701c9..16e12296b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# Unreleased + +## Changes +- Fixed handling of `clip.range` for `SCTransform` when `ncells` is less than the size of the passed dataset + # Seurat 5.0.2 (2024-02-28) ## Changes From 369a46ebc6e215645f682fae54db568567bf90ce Mon Sep 17 00:00:00 2001 From: Izzy Grabski Date: Fri, 8 Mar 2024 16:31:23 -0500 Subject: [PATCH 06/23] Added option to use FeatureScatter on the log scale --- R/visualization.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/visualization.R b/R/visualization.R index 04937db62..a834dc0c7 100644 --- a/R/visualization.R +++ b/R/visualization.R @@ -1983,6 +1983,7 @@ CellScatter <- function( #' @param raster.dpi Pixel resolution for rasterized plots, passed to geom_scattermore(). #' Default is c(512, 512). #' @param jitter Jitter for easier visualization of crowded points (default is FALSE) +#' @param log Plot features on the log scale (default is FALSE) #' #' @return A ggplot object #' @@ -2018,7 +2019,8 @@ FeatureScatter <- function( ncol = NULL, raster = NULL, raster.dpi = c(512, 512), - jitter = FALSE + jitter = FALSE, + log = FALSE ) { cells <- cells %||% colnames(x = object) if (isTRUE(x = shuffle)) { @@ -2078,6 +2080,9 @@ FeatureScatter <- function( } ) } + if (log) { + plot <- plot + scale_x_log10() + scale_y_log10() + } plot } ) From 82873b304b589376c6f062b3df3619ab5eda13a5 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 08:30:10 -0400 Subject: [PATCH 07/23] Update docs --- man/FeatureScatter.Rd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/man/FeatureScatter.Rd b/man/FeatureScatter.Rd index 06e6625d7..5c1c6db47 100644 --- a/man/FeatureScatter.Rd +++ b/man/FeatureScatter.Rd @@ -25,7 +25,8 @@ FeatureScatter( ncol = NULL, raster = NULL, raster.dpi = c(512, 512), - jitter = FALSE + jitter = FALSE, + log = FALSE ) } \arguments{ @@ -75,6 +76,8 @@ which will automatically use raster if the number of points plotted is greater t Default is c(512, 512).} \item{jitter}{Jitter for easier visualization of crowded points (default is FALSE)} + +\item{log}{Plot features on the log scale (default is FALSE)} } \value{ A ggplot object From c3f2a2870aca1898d600b276ca0c4774dfd2374c Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 08:30:37 -0400 Subject: [PATCH 08/23] Bump version --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cd2b8d5e0..2f38b3796 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: Seurat -Version: 5.0.3.9001 -Date: 2024-03-13 +Version: 5.0.3.9002 +Date: 2024-03-14 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) , Macosko E, Basu A, Satija R, et al (2015) , Stuart T, Butler A, et al (2019) , and Hao, Hao, et al (2020) for more details. Authors@R: c( From 104ad9f36e9ae0e8bae1f397fcd80b4e62130cce Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 08:31:18 -0400 Subject: [PATCH 09/23] Update NEWS --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 16e12296b..ba8f98cc2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # Unreleased ## Changes +- Added `log` parameter to `FeatureScatter` - Fixed handling of `clip.range` for `SCTransform` when `ncells` is less than the size of the passed dataset # Seurat 5.0.2 (2024-02-28) From a1be10763eba526563ae233e2ec0212b0b0ef5c5 Mon Sep 17 00:00:00 2001 From: Longda Date: Tue, 12 Mar 2024 14:45:53 -0400 Subject: [PATCH 10/23] fixing NA bug in PercentAbove --- R/utilities.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/utilities.R b/R/utilities.R index 6f0dc09ad..3a82b4871 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -1127,7 +1127,8 @@ MinMax <- function(data, min, max) { #' PercentAbove(sample(1:100, 10), 75) #' PercentAbove <- function(x, threshold) { - return(length(x = x[x > threshold]) / length(x = x)) + # return(length(x = x[x > threshold]) / length(x = x)) + return(sum(x > threshold, na.rm = T) / length(x = x)) } #' Calculate the percentage of all counts that belong to a given set of features From 674cfb91232c6d3f3e2ad2fd66c810ffa3e68cdc Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 13 Mar 2024 16:49:21 -0400 Subject: [PATCH 11/23] Add test for PercentAbove --- tests/testthat/test_utilities.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testthat/test_utilities.R b/tests/testthat/test_utilities.R index 2286a924c..dbc596a35 100644 --- a/tests/testthat/test_utilities.R +++ b/tests/testthat/test_utilities.R @@ -195,3 +195,8 @@ if(class(object[['RNA']]) == "Assay5") { ) }) } + +test_that("PercentAbove works as expected", { + vals <- c(1, 1, 2, 2, NA) + expect_equal(PercentAbove(vals, threshold = 1), 0.4) +}) From 8c1cd2807a2efe87a2eabdf02e7da487ea823189 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 08:34:39 -0400 Subject: [PATCH 12/23] Cleanup PercentAbove --- R/utilities.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/utilities.R b/R/utilities.R index 3a82b4871..239a2e8b2 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -1127,8 +1127,7 @@ MinMax <- function(data, min, max) { #' PercentAbove(sample(1:100, 10), 75) #' PercentAbove <- function(x, threshold) { - # return(length(x = x[x > threshold]) / length(x = x)) - return(sum(x > threshold, na.rm = T) / length(x = x)) + return (sum(x > threshold, na.rm = T) / length(x)) } #' Calculate the percentage of all counts that belong to a given set of features From 092856f699268f98e7c0c537178a896716951fc0 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 08:35:09 -0400 Subject: [PATCH 13/23] Bump version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2f38b3796..b8267a28a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: Seurat -Version: 5.0.3.9002 +Version: 5.0.3.9003 Date: 2024-03-14 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) , Macosko E, Basu A, Satija R, et al (2015) , Stuart T, Butler A, et al (2019) , and Hao, Hao, et al (2020) for more details. From 94e5718ab7d88c1a03eb76bcdaff50179f2c6745 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 08:37:10 -0400 Subject: [PATCH 14/23] Update NEWS --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index ba8f98cc2..24fd17349 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # Unreleased ## Changes +- Fixed `PercentAbove` to discount null values ([#8412](https://github.com/satijalab/seurat/issues/8412)) - Added `log` parameter to `FeatureScatter` - Fixed handling of `clip.range` for `SCTransform` when `ncells` is less than the size of the passed dataset From 69d4659cd14f60038bb780f125d3a2cb2657d9d5 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 14:44:15 -0400 Subject: [PATCH 15/23] Wrap SCTransform tests in suppressWarnings --- tests/testthat/test_preprocessing.R | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/testthat/test_preprocessing.R b/tests/testthat/test_preprocessing.R index b2d0aed4c..a28af6ddd 100644 --- a/tests/testthat/test_preprocessing.R +++ b/tests/testthat/test_preprocessing.R @@ -462,9 +462,11 @@ test_that("SCTransform `clip.range` param works as expected", { # since this is expected behaviour we'll need to accomodate the difference clip.max.tolerance <- 0.1 - test.result <- SCTransform( - test.data, - clip.range = c(clip.min, clip.max), + test.result <- suppressWarnings( + SCTransform( + test.data, + clip.range = c(clip.min, clip.max), + ) ) scale.data <- LayerData(test.result[["SCT"]], layer = "scale.data") expect_true(min(scale.data) >= clip.min) @@ -472,10 +474,12 @@ test_that("SCTransform `clip.range` param works as expected", { # when `ncells` is less than the size of the dataset the residuals will get # re-clipped in batches, make sure this clipping is done correctly as well - test.result <- SCTransform( - test.data, - clip.range = c(clip.min, clip.max), - ncells = 40 + test.result <- suppressWarnings( + SCTransform( + test.data, + clip.range = c(clip.min, clip.max), + ncells = 40 + ) ) scale.data <- LayerData(test.result[["SCT"]], layer = "scale.data") expect_true(min(scale.data) >= clip.min) From 9df0e7bf4164fe772b47a188fb747a9bb6cc5aa7 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 15:49:05 -0400 Subject: [PATCH 16/23] Increase tolerance for all tests in test_integration5.R --- tests/testthat/test_integration5.R | 56 +++++++++++++----------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/tests/testthat/test_integration5.R b/tests/testthat/test_integration5.R index 6a3499c9d..f4f635790 100644 --- a/tests/testthat/test_integration5.R +++ b/tests/testthat/test_integration5.R @@ -3,7 +3,7 @@ set.seed(42) # checks that the absolute value of `x` and `y` are within `tolerance` -expect_abs_equal <- function(x, y, tolerance = 1.0e-06) { +expect_abs_equal <- function(x, y, tolerance = 1.0e-04) { expect_equal(abs(x), abs(y), tolerance = tolerance) } @@ -53,15 +53,15 @@ test_that("IntegrateLayers works with HarmonyIntegration", { # reductions sporadically flip sign only compare absolute values expect_abs_equal( Embeddings(integrated[["integrated"]])[5, 5], - 0.391151 + 0.3912 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[40, 25], - 0.666826 + 0.6668 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[75, 45], - 0.724809 + 0.7248 ) }) @@ -85,17 +85,15 @@ test_that("IntegrateLayers works with CCAIntegration", { # reductions sporadically flip sign only compare absolute values expect_abs_equal( Embeddings(integrated[["integrated"]])[5, 5], - 0.917346 + 0.9174 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[40, 25], - 1.488484 + 1.4885 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[75, 45], - 0.544193, - # added to pass macOS builder checks for v5.0.2 - tolerance = 8.1e-06 + 0.5442 ) }) @@ -119,17 +117,15 @@ test_that("IntegrateLayers works with RPCAIntegration", { # reductions sporadically flip sign only compare absolute values expect_abs_equal( Embeddings(integrated[["integrated"]])[5, 5], - 0.178462 + 0.1785 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[40, 25], - 0.583150 + 0.5832 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[75, 45], - 0.544193, - # added to pass macOS builder checks for v5.0.2 - tolerance = 8.1e-06 + 0.5442 ) }) @@ -153,17 +149,15 @@ test_that("IntegrateLayers works with JointPCAIntegration", { # reductions sporadically flip sign only compare absolute values expect_abs_equal( Embeddings(integrated[["integrated"]])[5, 5], - 0.409180 + 0.4092 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[40, 25], - 0.324614 + 0.3246 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[75, 45], - 0.544193, - # added to pass macOS builder checks for v5.0.2 - tolerance = 8.1e-06 + 0.5442 ) }) @@ -240,15 +234,15 @@ test_that("IntegrateLayers works with HarmonyIntegration & SCTransform", { # reductions sporadically flip sign only compare absolute values expect_abs_equal( Embeddings(integrated[["integrated"]])[5, 5], - 1.1519947 + 1.1520 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[40, 25], - 1.0301467 + 1.0302 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[75, 45], - 0.1885502 + 0.1886 ) }) @@ -274,15 +268,15 @@ test_that("IntegrateLayers works with CCAIntegration & SCTransform", { # reductions sporadically flip sign only compare absolute values expect_abs_equal( Embeddings(integrated[["integrated"]])[5, 5], - 1.611324 + 1.6113 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[40, 25], - 0.692647 + 0.6927 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[75, 45], - 0.085520 + 0.0855 ) }) @@ -308,15 +302,15 @@ test_that("IntegrateLayers works with RPCAIntegration & SCTransform", { # reductions sporadically flip sign only compare absolute values expect_abs_equal( Embeddings(integrated[["integrated"]])[5, 5], - 1.649217 + 1.6492 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[40, 25], - 0.734325 + 0.7343 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[75, 45], - 0.085520 + 0.0855 ) }) @@ -342,14 +336,14 @@ test_that("IntegrateLayers works with JointPCAIntegration & SCTransform", { # reductions sporadically flip sign only compare absolute values expect_abs_equal( Embeddings(integrated[["integrated"]])[5, 5], - 0.342729 + 0.3427 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[40, 25], - 0.101470 + 0.1015 ) expect_abs_equal( Embeddings(integrated[["integrated"]])[75, 45], - 0.085520 + 0.0855 ) }) From 629e110511adb4fd2f1de313a36353c851288070 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 16:05:53 -0400 Subject: [PATCH 17/23] Bump version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index b8267a28a..6772079a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: Seurat -Version: 5.0.3.9003 +Version: 5.0.3.9004 Date: 2024-03-14 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) , Macosko E, Basu A, Satija R, et al (2015) , Stuart T, Butler A, et al (2019) , and Hao, Hao, et al (2020) for more details. From 1b64c51f52a08b9d72c2fdc78baf435def03f97e Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 09:34:58 -0400 Subject: [PATCH 18/23] Update DESCRIPTION --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6772079a5..f228e5812 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: Seurat -Version: 5.0.3.9004 +Version: 5.0.3 Date: 2024-03-14 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) , Macosko E, Basu A, Satija R, et al (2015) , Stuart T, Butler A, et al (2019) , and Hao, Hao, et al (2020) for more details. From bf08c98f1b3192da5ddb75d969e1f81e889e7309 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 09:35:05 -0400 Subject: [PATCH 19/23] Update NEWS --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 24fd17349..93cb84621 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# Unreleased +# Seurat 5.0.3 (2024-03-14) ## Changes - Fixed `PercentAbove` to discount null values ([#8412](https://github.com/satijalab/seurat/issues/8412)) From 9d22f91094fccc93fee647614ed2db2b8e15cbd3 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 14 Mar 2024 09:43:14 -0400 Subject: [PATCH 20/23] Update cran-comments --- cran-comments.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index f97596018..dd96c3121 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,9 +1,9 @@ -# Seurat v5.0.2 +# Seurat v5.0.3 ## Test environments -* local ubuntu 20.04 install, R 4.1.3 +* local ubuntu 20.04 install, R 4.3.2 * win-builder (oldrelease, release, devel) -* mac-builder (release) +* mac-builder (release, devel) ## R CMD check results @@ -24,6 +24,6 @@ BPCells and presto are hosted on R-universe and used conditionally in Seurat. There are two packages that depend on Seurat: CACIMAR and scCustomize; this update does not impact their functionality -There are 28 packages that import Seurat: AnanseSeurat, APackOfTheClones, bbknnR, CAMML, DR.SC, DWLS, ggsector, mixhvg, nebula, Platypus, PRECAST, ProFAST, rPanglaoDB, scaper, scDiffCom, scfetch, scGate, scGOclust, scMappR, scperturbR, scpoisson, SCRIP, scRNAstat, SignacX, SoupX, SPECK, STREAK, and tidyseurat; this update does not impact their functionality +There are 31 packages that import Seurat: AnanseSeurat, APackOfTheClones, bbknnR, CAMML, DR.SC, DWLS, GeneNMF, ggsector, mixhvg, nebula, Platypus, PRECAST, ProFAST, rPanglaoDB, scAnnotate, scaper, sccca, scDiffCom, scfetch, scGate, scGOclust, scMappR, scperturbR, scpoisson, SCRIP, scRNAstat, SignacX, SoupX, SPECK, STREAK, and tidyseurat; this update does not impact their functionality There are 22 packages that suggest Seurat: BisqueRNA, Canek, cellpypes, CIARA, ClustAssess, clustree, combiroc, conos, countland, CRMetrics, CytoSimplex, DIscBIO, dyngen, grandR, harmony, RESET, rliger, SCORPIUS, SCpubr, Signac, treefit, and VAM; this update does not impact their functionality From 72c3cf6700b3d6945fa3d8b24e4caf8590236525 Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 18 Mar 2024 11:44:25 -0400 Subject: [PATCH 21/23] Bump date --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f228e5812..b85c9d4e1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: Seurat Version: 5.0.3 -Date: 2024-03-14 +Date: 2024-03-18 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) , Macosko E, Basu A, Satija R, et al (2015) , Stuart T, Butler A, et al (2019) , and Hao, Hao, et al (2020) for more details. Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 93cb84621..1d0664b6d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# Seurat 5.0.3 (2024-03-14) +# Seurat 5.0.3 (2024-03-18) ## Changes - Fixed `PercentAbove` to discount null values ([#8412](https://github.com/satijalab/seurat/issues/8412)) From 2da392b33c7610c99830352c30afa97288145677 Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 18 Mar 2024 15:27:19 -0400 Subject: [PATCH 22/23] Fixup docs for LoadAkoya --- R/convenience.R | 1 - man/ReadAkoya.Rd | 6 ------ 2 files changed, 7 deletions(-) diff --git a/R/convenience.R b/R/convenience.R index 5c9367eca..f7c412b53 100644 --- a/R/convenience.R +++ b/R/convenience.R @@ -9,7 +9,6 @@ NULL #' @param fov Name to store FOV as #' @param assay Name to store expression matrix as -#' @inheritDotParams ReadAkoya #' #' @return \code{LoadAkoya}: A \code{\link[SeuratObject]{Seurat}} object #' diff --git a/man/ReadAkoya.Rd b/man/ReadAkoya.Rd index adf300e57..84f05a03d 100644 --- a/man/ReadAkoya.Rd +++ b/man/ReadAkoya.Rd @@ -39,12 +39,6 @@ quantification level to read in} \item{fov}{Name to store FOV as} \item{assay}{Name to store expression matrix as} - -\item{...}{ - Arguments passed on to \code{\link[=ReadAkoya]{ReadAkoya}} - \describe{ - \item{\code{}}{} - }} } \value{ \code{ReadAkoya}: A list with some combination of the following values From b1a8c8f54285502ad846981debff8a37da0b092f Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 18 Mar 2024 17:04:55 -0400 Subject: [PATCH 23/23] Fixup docs for LoadAkoya... again --- R/convenience.R | 1 + man/ReadAkoya.Rd | 2 ++ 2 files changed, 3 insertions(+) diff --git a/R/convenience.R b/R/convenience.R index f7c412b53..354faaa2c 100644 --- a/R/convenience.R +++ b/R/convenience.R @@ -9,6 +9,7 @@ NULL #' @param fov Name to store FOV as #' @param assay Name to store expression matrix as +#' @param ... Ignored #' #' @return \code{LoadAkoya}: A \code{\link[SeuratObject]{Seurat}} object #' diff --git a/man/ReadAkoya.Rd b/man/ReadAkoya.Rd index 84f05a03d..9c0041368 100644 --- a/man/ReadAkoya.Rd +++ b/man/ReadAkoya.Rd @@ -39,6 +39,8 @@ quantification level to read in} \item{fov}{Name to store FOV as} \item{assay}{Name to store expression matrix as} + +\item{...}{Ignored} } \value{ \code{ReadAkoya}: A list with some combination of the following values