Skip to content

Commit

Permalink
Merge pull request satijalab#411 from satijalab/feat/Rproj
Browse files Browse the repository at this point in the history
Utilize RStudio Projects for consistent auto-formatting of source code
  • Loading branch information
mojaveazure authored Sep 16, 2020
2 parents 3d29380 + 8501c6c commit afa9c2e
Show file tree
Hide file tree
Showing 13 changed files with 380 additions and 360 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ src/*.so
src/*.dll
.DS_Store
*.pdf
*.Rproj
18 changes: 9 additions & 9 deletions R/dimensional_reduction.R
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit afa9c2e

Please sign in to comment.