Skip to content

Commit

Permalink
Merge pull request #760 from satijalab/fix/foldchange_counts
Browse files Browse the repository at this point in the history
Fix/foldchange counts
  • Loading branch information
saketkc committed Jul 6, 2023
2 parents ae0dd07 + c5d37be commit 443ab86
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: Seurat
Version: 4.3.0.9007
Date: 2023-06-02
Version: 4.3.0.9008
Date: 2023-07-06
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
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -32,6 +32,7 @@ S3method(FindVariableFeatures,Seurat)
S3method(FindVariableFeatures,default)
S3method(FoldChange,Assay)
S3method(FoldChange,DimReduc)
S3method(FoldChange,SCTAssay)
S3method(FoldChange,Seurat)
S3method(FoldChange,default)
S3method(GetAssay,Seurat)
Expand Down
7 changes: 7 additions & 0 deletions R/differential_expression.R
Expand Up @@ -723,6 +723,13 @@ FindMarkers.SCTAssay <- function(
yes = 'counts',
no = slot
)
if (test.use %in% DEmethods_counts()){
# set slot to counts
if (slot !="counts") {
message(paste0("Setting slot to counts for ", test.use, " (counts based test: "))
slot <- "counts"
}
}
if (recorrect_umi && length(x = levels(x = object)) > 1) {
cell_attributes <- SCTResults(object = object, slot = "cell.attributes")
observed_median_umis <- lapply(
Expand Down
2 changes: 1 addition & 1 deletion R/preprocessing.R
Expand Up @@ -3130,7 +3130,7 @@ SampleUMI <- function(
#' Use regularized negative binomial regression to normalize UMI count data
#'
#' This function calls sctransform::vst. The sctransform package is available at
#' https://github.com/ChristophH/sctransform.
#' https://github.com/satijalab/sctransform.
#' Use this function as an alternative to the NormalizeData,
#' FindVariableFeatures, ScaleData workflow. Results are saved in a new assay
#' (named SCT by default) with counts being (corrected) counts, data being log1p(counts),
Expand Down
14 changes: 14 additions & 0 deletions man/FoldChange.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/SCTransform.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 443ab86

Please sign in to comment.