Skip to content

Commit

Permalink
Merge pull request satijalab#568 from satijalab/fix/UpdateSymbolList
Browse files Browse the repository at this point in the history
UpdateSymbolList no longer searches aliases
  • Loading branch information
andrewwbutler authored Jun 2, 2021
2 parents a5cb5ed + 5991ca0 commit 8616d90
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 16 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Seurat
Version: 4.0.2.9003
Date: 2021-06-01
Version: 4.0.2.9004
Date: 2021-06-02
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 NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## Changes
- Fix issues with `as.SingleCellExperiment.Seurat` for the latest verion of SingleCellExperiment ([#4532](https://github.com/satijalab/seurat/pull/4532))
- Ensure proper reference.reduction is used in `MapQuery()`
- Fix to `UpdateSymbolList()`, no longer searches aliases and exposes the `search.types` parameter in `GeneSymbolThesarus()` ([#4545](https://github.com/satijalab/seurat/issues/4545))

# Seurat 4.0.2 (2020-03-20)
## Added
Expand Down
28 changes: 21 additions & 7 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -796,14 +796,25 @@ FastRowScale <- function(
#' @note This function requires internet access
#'
#' @param symbols A vector of gene symbols
#' @param timeout Time to wait before cancelling query in seconds
#' @param several.ok Allow several current gene sybmols for each provided symbol
#' @param timeout Time to wait before canceling query in seconds
#' @param several.ok Allow several current gene symbols for each
#' provided symbol
#' @param search.types Type of query to perform:
#' \describe{
#' \itemize{\dQuote{\code{alias_symbol}}}{Find alternate symbols for the genes
#' described by \code{symbols}}
#' \itemize{\dQuote{\code{prev_symbol}}}{Find new new symbols for the genes
#' described by \code{symbols}}
#' }
#' This parameter accepts multiple options and short-hand options
#' (eg. \dQuote{\code{prev}} for \dQuote{\code{prev_symbol}})
#' @param verbose Show a progress bar depicting search progress
#' @param ... Extra parameters passed to \code{\link[httr]{GET}}
#'
#' @return For \code{GeneSymbolThesarus}, if \code{several.ok}, a named list
#' where each entry is the current symbol found for each symbol provided and the
#' names are the provided symbols. Otherwise, a named vector with the same information.
#' @return \code{GeneSymbolThesarus}:, if \code{several.ok}, a named list
#' where each entry is the current symbol found for each symbol provided and
#' the names are the provided symbols. Otherwise, a named vector with the
#' same information.
#'
#' @source \url{https://www.genenames.org/} \url{https://www.genenames.org/help/rest/}
#'
Expand All @@ -827,11 +838,13 @@ GeneSymbolThesarus <- function(
symbols,
timeout = 10,
several.ok = FALSE,
search.types = c('alias_symbol', 'prev_symbol'),
verbose = TRUE,
...
) {
db.url <- 'http://rest.genenames.org/fetch'
search.types <- c('alias_symbol', 'prev_symbol')
# search.types <- c('alias_symbol', 'prev_symbol')
search.types <- match.arg(arg = search.types, several.ok = TRUE)
synonyms <- vector(mode = 'list', length = length(x = symbols))
not.found <- vector(mode = 'logical', length = length(x = symbols))
multiple.found <- vector(mode = 'logical', length = length(x = symbols))
Expand Down Expand Up @@ -1472,7 +1485,7 @@ RegroupIdents <- function(object, metadata) {

#' @rdname UpdateSymbolList
#'
#' @return For \code{UpdateSymbolList}, \code{symbols} with updated symbols from
#' @return \code{UpdateSymbolList}: \code{symbols} with updated symbols from
#' HGNC's gene names database
#'
#' @export
Expand All @@ -1494,6 +1507,7 @@ UpdateSymbolList <- function(
symbols = symbols,
timeout = timeout,
several.ok = several.ok,
search.types = 'prev_symbol',
verbose = verbose,
...
))
Expand Down
2 changes: 1 addition & 1 deletion man/Seurat-package.Rd

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

25 changes: 19 additions & 6 deletions man/UpdateSymbolList.Rd

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

0 comments on commit 8616d90

Please sign in to comment.