diff --git a/R/clustSIGNAL.R b/R/clustSIGNAL.R index 2d912ed..db18311 100644 --- a/R/clustSIGNAL.R +++ b/R/clustSIGNAL.R @@ -28,9 +28,9 @@ #' #' names(colData(spe)) #' # identify the column names with cell and sample labels -#' samples = "embryo" +#' samples = "sample_id" #' cells = "uniqueID" -#' res_list <- clustSIGNAL(spe, samples, cells, dimRed = "PCA", outputs = "c") +#' res_list <- clustSIGNAL(spe, samples, cells, outputs = "c") #' #' #' @export diff --git a/R/clustering.R b/R/clustering.R index af5d408..6295ee8 100644 --- a/R/clustering.R +++ b/R/clustering.R @@ -11,15 +11,14 @@ #' @examples #' data(mouseEmbryo2) #' -#' # for non-spatial clustering of normalised counts +#' spe <- scater::runPCA(spe) +#' +#' # reclust = FALSE for non-spatial clustering of normalised counts +#' # reclust = TRUE for non-spatial clustering of adaptively smoothed counts #' spe <- nsClustering(spe, dimRed = "PCA", reclust = FALSE) #' head(spe$nsCluster) #' head(spe$nsSubcluster) #' -#' # for non-spatial clustering of adaptively smoothed counts -#' spe <- nsClustering(spe, dimRed = "PCA", reclust = TRUE) -#' head(spe$reCluster) -#' #' @export #### Non-spatial clustering diff --git a/R/entropyMeasure.R b/R/entropyMeasure.R index 4546e2f..f44ec8d 100644 --- a/R/entropyMeasure.R +++ b/R/entropyMeasure.R @@ -13,7 +13,7 @@ #' @examples #' data(mouseEmbryo2) #' -#' # requires list of containing cluster proportions of each region (regXclust), +#' # requires list containing cluster proportions of each region (regXclust), #' # generated using the neighbourDetect() function #' spe <- entropyMeasure(spe, cells = "uniqueID", regXclust, threads = 1) #' head(spe$entropy) diff --git a/R/neighborDetect.R b/R/neighborDetect.R index 4b353dc..cd53e5e 100644 --- a/R/neighborDetect.R +++ b/R/neighborDetect.R @@ -18,7 +18,7 @@ #' @examples #' data(mouseEmbryo2) #' -#' out_list <- neighbourDetect(spe, samples = "embryo", NN = 30, cells = "uniqueID", sort = TRUE) +#' out_list <- neighbourDetect(spe, samples = "sample_id", NN = 30, cells = "uniqueID", sort = TRUE) #' names(out_list) #' #' @export diff --git a/data/mouseEmbryo2.rda b/data/mouseEmbryo2.rda index 46bf7ce..26dd553 100644 Binary files a/data/mouseEmbryo2.rda and b/data/mouseEmbryo2.rda differ diff --git a/man/clustSIGNAL.Rd b/man/clustSIGNAL.Rd index 3f2299c..afe1ad3 100644 --- a/man/clustSIGNAL.Rd +++ b/man/clustSIGNAL.Rd @@ -58,9 +58,9 @@ data(mouseEmbryo2) names(colData(spe)) # identify the column names with cell and sample labels -samples = "embryo" +samples = "sample_id" cells = "uniqueID" -res_list <- clustSIGNAL(spe, samples, cells, dimRed = "PCA", outputs = "c") +res_list <- clustSIGNAL(spe, samples, cells, outputs = "c") } diff --git a/man/entropyMeasure.Rd b/man/entropyMeasure.Rd index 86ceee9..3331ce5 100644 --- a/man/entropyMeasure.Rd +++ b/man/entropyMeasure.Rd @@ -24,7 +24,7 @@ A function to measure the heterogeneity of a cell's neighbourhood in terms of en \examples{ data(mouseEmbryo2) -# requires list of containing cluster proportions of each region (regXclust), +# requires list containing cluster proportions of each region (regXclust), # generated using the neighbourDetect() function spe <- entropyMeasure(spe, cells = "uniqueID", regXclust, threads = 1) head(spe$entropy) diff --git a/man/neighbourDetect.Rd b/man/neighbourDetect.Rd index 31f50a6..a458a39 100644 --- a/man/neighbourDetect.Rd +++ b/man/neighbourDetect.Rd @@ -30,7 +30,7 @@ A function to identify the neighbourhood of each cell. If sort = TRUE, the neigh \examples{ data(mouseEmbryo2) -out_list <- neighbourDetect(spe, samples = "embryo", NN = 30, cells = "uniqueID", sort = TRUE) +out_list <- neighbourDetect(spe, samples = "sample_id", NN = 30, cells = "uniqueID", sort = TRUE) names(out_list) } diff --git a/man/nsClustering.Rd b/man/nsClustering.Rd index b9bb0fc..f171feb 100644 --- a/man/nsClustering.Rd +++ b/man/nsClustering.Rd @@ -20,13 +20,12 @@ A function containing two steps used at different times in the clustSIGNAL workf \examples{ data(mouseEmbryo2) -# for non-spatial clustering of normalised counts +spe <- scater::runPCA(spe) + +# reclust = FALSE for non-spatial clustering of normalised counts +# reclust = TRUE for non-spatial clustering of adaptively smoothed counts spe <- nsClustering(spe, dimRed = "PCA", reclust = FALSE) head(spe$nsCluster) head(spe$nsSubcluster) -# for non-spatial clustering of adaptively smoothed counts -spe <- nsClustering(spe, dimRed = "PCA", reclust = TRUE) -head(spe$reCluster) - } diff --git a/vignettes/1_seqFISH_mouseEmbryo.Rmd b/vignettes/1_seqFISH_mouseEmbryo.Rmd index 2a611be..860885e 100644 --- a/vignettes/1_seqFISH_mouseEmbryo.Rmd +++ b/vignettes/1_seqFISH_mouseEmbryo.Rmd @@ -51,7 +51,7 @@ To run clustSIGNAL, we need the column names of sample and cell labels in the co ```{r} set.seed(100) -samples = "embryo" +samples = "sample_id" cells = "uniqueID" res_emb = clustSIGNAL(spe, samples, cells, outputs = "a") ```