diff --git a/DESCRIPTION b/DESCRIPTION index 4ebad49..b756763 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -75,7 +75,6 @@ Imports: limma (>= 3.54.0), magrittr (>= 2.0.3), MAST (>= 1.24.0), - lme4, methods, monocle3 (>= 1.3.1), paletteer (>= 1.5.0), diff --git a/R/cluster_sce.R b/R/cluster_sce.R index 12f1488..5b97e01 100644 --- a/R/cluster_sce.R +++ b/R/cluster_sce.R @@ -7,10 +7,17 @@ #' UMAP_Liger, tSNE_Liger. #' @param resolution Clustering resolution. If NULL, clustering method will be #' set to louvain. -#' @param K Integer number of nearest neighbors to use when creating the k +#' @param k Integer number of nearest neighbors to use when creating the k #' nearest neighbor graph for Louvain/Leiden clustering. #' k is related to the resolution of the clustering result, a bigger k will #' result in lower resolution and vice versa. Default is 50. +#' @param louvain_iter Integer number of iterations used for Louvain clustering. +#' The clustering result giving the largest modularity score will be used +#' as the final clustering result. Default is 1. Note that if num_iter +#' is greater than 1, the random_seed argument will be ignored +#' for the louvain method. +#' @param verbose A logic flag to determine whether or not we should print +#' the run details. #' @param ... see monocle3::cluster_cells for more clustering options. #' #' @return sce a SingleCellExperiment object annotated with reducedDims @@ -23,9 +30,9 @@ #' @export cluster_sce <- function(sce, - cluster_method = "leiden", + cluster_method = "louvain", reduction_method = "UMAP_Liger", - resolution = 1e-5, + resolution = NULL, k = 50, louvain_iter = 1, verbose = T, diff --git a/R/map_with_ewce.R b/R/map_with_ewce.R index 133db3f..6a546c5 100644 --- a/R/map_with_ewce.R +++ b/R/map_with_ewce.R @@ -263,9 +263,9 @@ map_celltypes_sce <- function(sce, ### Allow variation in annotation level .map_celltypes <- function(ctdToMap, - ctdToMapAgainst = MAGMA.Celltyping::ctd_Tasic, + ctdToMapAgainst, inputSpecies = "human", - mapAgainstSpecies = "mouse", + mapAgainstSpecies = "human", annotLevel = 1, numTopMarkers = 50, mappingLevel = 2, diff --git a/man/cluster_sce.Rd b/man/cluster_sce.Rd index 89d5db5..d93fa80 100644 --- a/man/cluster_sce.Rd +++ b/man/cluster_sce.Rd @@ -6,9 +6,9 @@ \usage{ cluster_sce( sce, - cluster_method = "leiden", + cluster_method = "louvain", reduction_method = "UMAP_Liger", - resolution = 1e-05, + resolution = NULL, k = 50, louvain_iter = 1, verbose = T, @@ -26,12 +26,21 @@ UMAP_Liger, tSNE_Liger.} \item{resolution}{Clustering resolution. If NULL, clustering method will be set to louvain.} -\item{...}{see monocle3::cluster_cells for more clustering options.} - -\item{K}{Integer number of nearest neighbors to use when creating the k +\item{k}{Integer number of nearest neighbors to use when creating the k nearest neighbor graph for Louvain/Leiden clustering. k is related to the resolution of the clustering result, a bigger k will result in lower resolution and vice versa. Default is 50.} + +\item{louvain_iter}{Integer number of iterations used for Louvain clustering. +The clustering result giving the largest modularity score will be used +as the final clustering result. Default is 1. Note that if num_iter +is greater than 1, the random_seed argument will be ignored +for the louvain method.} + +\item{verbose}{A logic flag to determine whether or not we should print +the run details.} + +\item{...}{see monocle3::cluster_cells for more clustering options.} } \value{ sce a SingleCellExperiment object annotated with reducedDims diff --git a/man/dot-map_celltypes.Rd b/man/dot-map_celltypes.Rd index a226341..f4e713c 100644 --- a/man/dot-map_celltypes.Rd +++ b/man/dot-map_celltypes.Rd @@ -6,9 +6,9 @@ \usage{ .map_celltypes( ctdToMap, - ctdToMapAgainst = MAGMA.Celltyping::ctd_Tasic, + ctdToMapAgainst, inputSpecies = "human", - mapAgainstSpecies = "mouse", + mapAgainstSpecies = "human", annotLevel = 1, numTopMarkers = 50, mappingLevel = 2,