Skip to content

Commit

Permalink
Merge branch 'develop' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
timoast authored Feb 25, 2020
2 parents 94f8200 + 9648dd0 commit 841013d
Show file tree
Hide file tree
Showing 22 changed files with 244 additions and 201 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Seurat
Version: 3.1.3
Date: 2020-02-07
Version: 3.1.4
Date: 2020-02-21
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.
Authors@R: c(
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit 841013d

Please sign in to comment.