Skip to content

Commit

Permalink
Merge pull request #3548 from satijalab/develop
Browse files Browse the repository at this point in the history
Seurat v3.2.2
  • Loading branch information
mojaveazure committed Sep 28, 2020
2 parents c23845d + 7c7423d commit fe93b05
Show file tree
Hide file tree
Showing 29 changed files with 485 additions and 395 deletions.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/analysis-question.md
@@ -0,0 +1,12 @@
---
name: "❓Analysis question"
about: Ask a question about the analysis of single-cell data
title: ''
labels: question
assignees: ''

---

<!-- Please search the previous issues for similar questions before opening a new issue. If there are similar previous issues, please reference them in your issue (https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) -->

<!-- Please clearly explain your question and include all relevant code. Please ensure that code is formatted correctly: https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,20 @@
---
name: "\U0001F41BBug report"
about: Describe a bug you've seen with a reproducible example
title: ''
labels: bug
assignees: ''

---

<!-- Briefly describe your problem and what output you expect. If you have a question, please use the analysis question template instead. -->

<!-- Before posting an issue, ensure that the bug is reproducible by re-running the code that produced the issue in a new R session.-->

<!-- Please include a minimal reproducible code example. You can use the small test data included in Seurat (`pbmc_small`) to demonstrate the issue, or a public dataset (for example, a dataset available through SeuratData https://github.com/satijalab/seurat-data). If you cannot reproduce the issue using a public dataset, please still provide code that reproduces the issue on your data and we will try to address it. -->

<!-- Please include the output of `sessionInfo()` and your operating system in your issue. -->

```r
# insert reproducible example here
```
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
@@ -0,0 +1,10 @@
---
name: "\U0001F4DADocumentation"
about: An issue related to documentation at https://satijalab.org/seurat/
title: ''
labels: documentation
assignees: ''

---

<!-- A clear description of what content at https://satijalab.org/seurat or in the Seurat function man pages is an issue. -->
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
@@ -0,0 +1,10 @@
---
name: "\U0001F680Feature request"
about: Request a new feature
title: ''
labels: enhancement
assignees: ''

---

<!-- Kindly explain the new feature you would like and why this would be useful. -->
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -7,4 +7,3 @@ src/*.so
src/*.dll
.DS_Store
*.pdf
*.Rproj
6 changes: 3 additions & 3 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: Seurat
Version: 3.2.1
Date: 2020-09-04
Version: 3.2.2
Date: 2020-09-25
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 Stuart T, Butler A, et al (2019) <doi:10.1016/j.cell.2019.05.031> for more details.
Authors@R: c(
Expand Down Expand Up @@ -58,7 +58,7 @@ Imports:
rsvd,
Rtsne,
scales,
sctransform (>= 0.2.0),
sctransform (>= 0.3.0),
shiny,
spatstat,
stats,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -468,6 +468,7 @@ importFrom(cowplot,plot_grid)
importFrom(cowplot,theme_cowplot)
importFrom(fitdistrplus,fitdist)
importFrom(future,nbrOfWorkers)
importFrom(future,plan)
importFrom(future.apply,future_lapply)
importFrom(future.apply,future_sapply)
importFrom(ggplot2,Geom)
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Expand Up @@ -2,6 +2,14 @@
All notable changes to Seurat will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [3.2.2] - 2020-09-25
### Changes
- Set the seed in `WhichCells` regardless of whether or not `idents` is passed
- Retain Graph and Neighbor objects when subsetting only on features
- Fix data.frame input to `CreateAssayObject()` when data.frame has no rownames.
- Default annoy search to sequential if not using multicore future plans.
- Require sctransform >= 0.3.0

## [3.2.1] - 2020-09-04
### Added
- Added support for nearest neighbor input and `return.model` parameter in `RunUMAP()`
Expand Down
6 changes: 6 additions & 0 deletions R/clustering.R
Expand Up @@ -553,12 +553,18 @@ AnnoyBuildIndex <- function(data, metric = "euclidean", n.trees = 50) {
# @param search.k During the query it will inspect up to search_k nodes which
# gives you a run-time tradeoff between better accuracy and speed.
# @ param include.distance Include the corresponding distances
#' @importFrom future plan
#' @importFrom future.apply future_lapply
#
AnnoySearch <- function(index, query, k, search.k = -1, include.distance = TRUE) {
n <- nrow(x = query)
idx <- matrix(nrow = n, ncol = k)
dist <- matrix(nrow = n, ncol = k)
convert <- methods::is(index, "Rcpp_AnnoyAngular")
if (!inherits(x = plan(), what = "multicore")) {
oplan <- plan(strategy = "sequential")
on.exit(plan(oplan), add = TRUE)
}
res <- future_lapply(X = 1:n, FUN = function(x) {
res <- index$getNNsByVectorList(query[x, ], k, search.k, include.distance)
# Convert from Angular to Cosine distance
Expand Down
18 changes: 9 additions & 9 deletions R/dimensional_reduction.R
Expand Up @@ -1133,7 +1133,7 @@ RunUMAP.default <- function(
reduction.key = 'UMAP_',
assay = NULL,
reduction.model = NULL,
return.model = FALSE,
return.model = FALSE,
umap.method = 'uwot',
n.neighbors = 30L,
n.components = 2L,
Expand Down Expand Up @@ -1270,7 +1270,7 @@ RunUMAP.default <- function(
a = a,
b = b,
fast_sgd = uwot.sgd,
verbose = verbose,
verbose = verbose,
ret_model = return.model
)
}
Expand Down Expand Up @@ -1303,16 +1303,16 @@ RunUMAP.default <- function(
if (is.list(x = object)) {
if (packageVersion(pkg = "uwot") <= '0.1.8.9000') {
stop("This uwot functionality requires uwot version >= 0.1.8.9000",
"Installing the latest version from github can be done with",
"Installing the latest version from github can be done with",
"remotes::install_github('jlmelville/uwot')")
}
uwot::umap_transform(
X = NULL,
nn_method = object,
model = model,
nn_method = object,
model = model,
n_threads = nbrOfWorkers(),
n_epochs = n.epochs,
verbose = verbose
verbose = verbose
)
} else {
umap_transform(
Expand Down Expand Up @@ -1450,7 +1450,7 @@ RunUMAP.Graph <- function(
#' @param assay Assay to pull data for when using \code{features}, or assay used to construct Graph
#' if running UMAP on a Graph
#' @param nn.name Name of knn output on which to run UMAP
#' @param slot The slot used to pull data for when using \code{features}. data slot is by default.
#' @param slot The slot used to pull data for when using \code{features}. data slot is by default.
#' @param umap.method UMAP implementation to run. Can be
#' \describe{
#' \item{\code{uwot}:}{Runs umap via the uwot R package}
Expand Down Expand Up @@ -1521,11 +1521,11 @@ RunUMAP.Seurat <- function(
features = NULL,
graph = NULL,
assay = DefaultAssay(object = object),
nn.name = NULL,
nn.name = NULL,
slot = 'data',
umap.method = 'uwot',
reduction.model = NULL,
return.model = FALSE,
return.model = FALSE,
n.neighbors = 30L,
n.components = 2L,
metric = 'cosine',
Expand Down
14 changes: 7 additions & 7 deletions R/generics.R
Expand Up @@ -72,13 +72,13 @@ as.loom <- function(x, ...) {
}

#' Convert objects to Neighbor ojbects
#'
#'
#' @param x An object to convert to \code{Neighbor}
#' @param ... Arguments passed to other methods
#'
#'
#' @rdname as.Neighbor
#' @export as.Neighbor
#'
#'
as.Neighbor <- function(x, ...) {
UseMethod(generic = 'as.Neighbor', object = x)
}
Expand Down Expand Up @@ -550,8 +550,8 @@ Idents <- function(object, ... ) {
UseMethod(generic = 'Idents<-', object = object)
}

#' Get Neighbor algorithm index
#'
#' Get Neighbor algorithm index
#'
#' @param object An object
#' @param ... Arguments passed to other methods;
#'
Expand All @@ -577,7 +577,7 @@ Index <- function(object, ...) {
}

#' Get Neighbor nearest neighbor index matrices
#'
#'
#' @param object An object
#' @param ... Arguments passed to other methods;
#'
Expand Down Expand Up @@ -1180,7 +1180,7 @@ SetIdent <- function(object, ...) {
}

#' Get spatially variable feature information
#'
#'
#' @rdname SpatiallyVariableFeatures
#' @export SpatiallyVariableFeatures
#'
Expand Down

0 comments on commit fe93b05

Please sign in to comment.