Skip to content

Commit

Permalink
Merge pull request #2648 from satijalab/develop
Browse files Browse the repository at this point in the history
Seurat v3.1.4
  • Loading branch information
satijalab committed Mar 2, 2020
2 parents 87e2454 + dc0bd16 commit 94343c4
Show file tree
Hide file tree
Showing 22 changed files with 245 additions and 202 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: Seurat
Version: 3.1.3
Date: 2020-02-07
Version: 3.1.4
Date: 2020-02-26
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>, and Butler A and Satija R (2017) <doi:10.1101/164889> for more details.
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>, and Butler A and Satija R (2017) <doi:10.1101/164889> for more details. Please note: SDMTools is available is available from the CRAN archives with install.packages("https://cran.rstudio.com//src/contrib/Archive/SDMTools/SDMTools_1.1-221.2.tar.gz", repos = NULL); it is not in the standard repositories.
Authors@R: c(
person(given = 'Rahul', family = 'Satija', email = 'rsatija@nygenome.org', role = 'aut', comment = c(ORCID = '0000-0001-9448-8833')),
person(given = 'Andrew', family = 'Butler', email = 'abutler@nygenome.org', role = 'aut', comment = c(ORCID = '0000-0003-3608-0463')),
Expand Down Expand Up @@ -43,6 +43,7 @@ Imports:
MASS,
Matrix (>= 1.2-14),
metap,
patchwork,
pbapply,
plotly,
png,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -482,6 +482,7 @@ importFrom(methods,setOldClass)
importFrom(methods,signature)
importFrom(methods,slot)
importFrom(methods,slotNames)
importFrom(patchwork,wrap_plots)
importFrom(pbapply,pbapply)
importFrom(pbapply,pblapply)
importFrom(pbapply,pbsapply)
Expand Down
7 changes: 6 additions & 1 deletion NEWS.md
Expand Up @@ -2,7 +2,12 @@
All notable changes to Seurat will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)

## [3.1.3] = 2020-02-07
## [3.1.4] - 2020-02-20
### Changes
- Fixes to `DoHeatmap` to remain compatible with ggplot2 v3.3
- Adoption of `patchwork` framework to replace `CombinePlots`

## [3.1.3] - 2020-02-07
### Added
- New system agnostic `Which` function to address problems with FItSNE on Windows

Expand Down
2 changes: 2 additions & 0 deletions R/convenience.R
Expand Up @@ -19,6 +19,8 @@ PCHeatmap <- function(object, ...) {
return(do.call(what = 'DimHeatmap', args = args))
}

#' @param ... Extra parameters passed to \code{DimPlot}
#'
#' @rdname DimPlot
#' @export
#'
Expand Down
5 changes: 5 additions & 0 deletions R/objects.R
Expand Up @@ -5667,19 +5667,24 @@ merge.Assay <- function(
if (all(IsSCT(assay = assays))) {
vst.set.new <- list()
idx <- 1
umi.assay.new <- list()
for (i in 1:length(x = assays)) {
vst.set.old <- Misc(object = assays[[i]], slot = "vst.set")
umi.assay.old <- Misc(object = assays[[i]], slot = "umi.assay")
if (!is.null(x = vst.set.old)) {
for (j in 1:length(x = vst.set.old)) {
vst.set.new[[idx]] <- vst.set.old[[j]]
umi.assay.new[[idx]] <- umi.assay.old[[j]]
idx <- idx + 1
}
} else if (!is.null(x = Misc(object = assays[[i]], slot = "vst.out"))) {
vst.set.new[[idx]] <- Misc(object = assays[[i]], slot = "vst.out")
umi.assay.new[[idx]] <- Misc(object = assays[[i]], slot = "umi.assay")
idx <- idx + 1
}
}
Misc(object = combined.assay, slot = "vst.set") <- vst.set.new
Misc(object = combined.assay, slot = "umi.assay") <- umi.assay.new
scale.data <- do.call(
what = cbind,
args = lapply(X = assays, FUN = function(x) GetAssayData(object = x, slot = "scale.data"))
Expand Down
7 changes: 5 additions & 2 deletions R/preprocessing.R
Expand Up @@ -453,14 +453,16 @@ GetResidual <- function(
object,
features,
assay = "SCT",
umi.assay = "RNA",
umi.assay = NULL,
clip.range = NULL,
replace.value = FALSE,
verbose = TRUE
) {
if (!IsSCT(assay = object[[assay]])) {
stop(assay, " assay was not generated by SCTransform")
}
umi.assay <- umi.assay %||% Misc(object = object[[assay]], slot = "umi.assay")
umi.assay <- umi.assay %||% "RNA" # for object created in 3.1.1 or earlier, default to RNA
if (replace.value) {
new_features <- features
} else {
Expand Down Expand Up @@ -534,7 +536,7 @@ GetResidual <- function(
object.v <- GetResidualVstOut(
object = object.v,
assay = assay,
umi.assay = umi.assay,
umi.assay = umi.assay[[v]],
new_features = new_features,
vst_out = vst_out,
clip.range = clip.range,
Expand Down Expand Up @@ -1353,6 +1355,7 @@ SCTransform <- function(
# save clip.range into vst model
vst.out$arguments$sct.clip.range <- clip.range
Misc(object = assay.out, slot = 'vst.out') <- vst.out
Misc(object = assay.out, slot = 'umi.assay') <- assay
# also put gene attributes in meta.features
assay.out[[paste0('sct.', names(x = vst.out$gene_attr))]] <- vst.out$gene_attr
assay.out[['sct.variable']] <- rownames(x = assay.out[[]]) %in% top.features
Expand Down

0 comments on commit 94343c4

Please sign in to comment.