Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinHartman committed Nov 8, 2022
2 parents 673b122 + 4c7d937 commit d6d085b
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 17 deletions.
13 changes: 9 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Seurat
Version: 4.2.0.9001
Date: 2022-05-01
Version: 4.2.1.9000
Date: 2022-11-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 Expand Up @@ -49,7 +49,7 @@ Imports:
leiden (>= 0.3.1),
lmtest,
MASS,
Matrix (>= 1.5.0),
Matrix (>= 1.5-0),
matrixStats,
miniUI,
patchwork,
Expand All @@ -67,10 +67,15 @@ Imports:
Rtsne,
scales,
scattermore (>= 0.7),
<<<<<<< HEAD
sctransform (>= 0.3.4),
SeuratObject (>= 4.1.2.9003),
=======
sctransform (>= 0.3.5),
SeuratObject (>= 4.1.3),
>>>>>>> develop
shiny,
spatstat.core,
spatstat.explore,
spatstat.geom,
stats,
tibble,
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ importFrom(shiny,sliderInput)
importFrom(shiny,stopApp)
importFrom(shiny,updateSelectInput)
importFrom(shiny,verbatimTextOutput)
importFrom(spatstat.core,markvario)
importFrom(spatstat.explore,markvario)
importFrom(spatstat.geom,ppp)
importFrom(stats,aggregate)
importFrom(stats,anova)
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Seurat 4.2.1 (2022-11-07)

## Changes
- Replaced import from `spatstat.core` with `spatstat.explore`
- Fix bug in `FindMarkers()` when using `SCT` assay ([#6856](https://github.com/satijalab/seurat/issues/6586))

# Seurat 4.2.0 (2022-09-21)

## Changes
Expand Down
8 changes: 7 additions & 1 deletion R/differential_expression.R
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,12 @@ FindMarkers.SCTAssay <- function(
'scale.data' = GetAssayData(object = object, slot = "counts"),
numeric()
)
if (is.null(x = mean.fxn)){
mean.fxn <- function(x) {
return(log(x = rowMeans(x = expm1(x = x)) + pseudocount.use, base = base))

}
}
fc.results <- FoldChange(
object = object,
slot = data.slot,
Expand All @@ -762,7 +768,7 @@ FindMarkers.SCTAssay <- function(
mean.fxn = mean.fxn,
fc.name = fc.name,
base = base
)
)
de.results <- FindMarkers(
object = data.use,
slot = data.slot,
Expand Down
2 changes: 1 addition & 1 deletion R/preprocessing.R
Original file line number Diff line number Diff line change
Expand Up @@ -2673,7 +2673,7 @@ RelativeCounts <- function(data, scale.factor = 1, verbose = TRUE) {
#' @param data Matrix containing the data used as "marks" (e.g. gene expression)
#' @param ... Arguments passed to markvario
#'
#' @importFrom spatstat.core markvario
#' @importFrom spatstat.explore markvario
#' @importFrom spatstat.geom ppp
#'
#' @export
Expand Down
4 changes: 4 additions & 0 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -8060,6 +8060,10 @@ SingleDimPlot <- function(
dims <- colnames(x = data)[dims]
}
if (!is.null(x = cells.highlight)) {
if (inherits(x = cells.highlight, what = "data.frame")) {
stop("cells.highlight cannot be a dataframe. ",
"Please supply a vector or list")
}
highlight.info <- SetHighlight(
cells.highlight = cells.highlight,
cells.all = rownames(x = data),
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![CRAN Version](https://www.r-pkg.org/badges/version/Seurat)](https://cran.r-project.org/package=Seurat)
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/Seurat)](https://cran.r-project.org/package=Seurat)

# Seurat v4.1
# Seurat v4.2.1

Seurat is an R toolkit for single cell genomics, developed and maintained by the Satija Lab at NYGC.

Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Seurat v4.2.0
# Seurat v4.2.1

## Test environments
* local Ubuntu 20.04 install, R 4.1.3
Expand Down
16 changes: 8 additions & 8 deletions tests/testthat/test_differential_expression.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ test_that("Default settings work as expected", {

# SCT normalization
expect_equal(results.sct[1, "p_val"], 6.225491e-11)
expect_equal(results.sct[1, "avg_logFC"], -0.6768721, tolerance = 1e-6)
expect_equal(results.sct[1, "avg_logFC"], -1.081321, tolerance = 1e-6)
expect_equal(results.sct[1, "pct.1"], 0.111)
expect_equal(results.sct[1, "pct.2"], 0.96)
expect_equal(results.sct[1, "p_val_adj"], 1.369608e-08)
expect_equal(nrow(x = results.sct), 92)
expect_equal(nrow(x = results.sct), 158)
expect_equal(rownames(x = results.sct)[1], "TYMP")
})

Expand Down Expand Up @@ -96,8 +96,8 @@ test_that("setting pseudocount.use works", {
expect_equal(results[1, "avg_logFC"], -2.630395, tolerance = 1e-6)
expect_equal(nrow(x = results.clr), 182)
expect_equal(results.clr[1, "avg_logFC"], -2.317338, tolerance = 1e-6)
expect_equal(nrow(results.sct), 185)
expect_equal(results.sct[1, "avg_logFC"], -1.845681, tolerance = 1e-6)
expect_equal(nrow(results.sct), 194)
expect_equal(results.sct[1, "avg_logFC"], -2.253920, tolerance = 1e-6)
})

results <- suppressWarnings(FindMarkers(object = pbmc_small, ident.1 = 0, ident.2 = 1, verbose = FALSE, base = exp(1), mean.fxn = rowMeans))
Expand Down Expand Up @@ -308,12 +308,12 @@ test_that("FindAllMarkers works as expected", {
expect_equal(rownames(x = results.clr)[1], "HLA-DPB1")

# SCT normalization
expect_equal(results.sct[1, "p_val"], 6.225491e-11)
expect_equal(results.sct[1, "avg_log2FC"], -1.265307, tolerance = 1e-6)
expect_equal(results.sct[1, "p_val"], 4.25861e-12)
expect_equal(results.sct[1, "avg_log2FC"], -2.70188, tolerance = 1e-6)
expect_equal(results.sct[1, "pct.1"], 0.167)
expect_equal(results.sct[1, "pct.2"], 0.909)
expect_equal(results.sct[1, "p_val_adj"], 1.369608e-08)
expect_equal(nrow(x = results.sct), 201)
expect_equal(results.sct[1, "p_val_adj"], 9.368941e-10)
expect_equal(nrow(x = results.sct), 210)
expect_equal(rownames(x = results.sct)[1], "HLA-DPB1")

# pseudocount.use = 0.1
Expand Down

0 comments on commit d6d085b

Please sign in to comment.