Skip to content

Commit

Permalink
Added examples to exported functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
PratibhaPanwar committed Jul 19, 2024
1 parent 3dd194a commit 8314085
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 12 deletions.
6 changes: 5 additions & 1 deletion R/adaptiveSmoothing.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
#' @return SpatialExperiment object including smoothed gene expression values as another assay.
#'
#' @examples
#' data(mouseEmbryo2)
#'
#' # to do
#' # requires matrix containing NN nearest neighbour cell labels (nnCells),
#' # generated using the neighbourDetect() function
#' spe <- adaptiveSmoothing(spe, nnCells, NN = 30, kernel = "G", spread = 0.05)
#' spe
#'
#' @export

Expand Down
9 changes: 7 additions & 2 deletions R/clustSIGNAL.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@
#' 3. spe_final: a SpatialExperiment object with initial 'putative cell type' groups, entropy values, smoothed gene expression, post-smoothing clusters, and silhouette widths included.
#'
#' @examples
#' spe = load(mouseEmbryo2)
#' clustSIGNAL <- function (spe, spe$embryo, spe$uniqueIDs)
#' data(mouseEmbryo2)
#'
#' names(colData(spe))
#' # identify the column names with cell and sample labels
#' samples = "embryo"
#' cells = "uniqueID"
#' res_list <- clustSIGNAL(spe, samples, cells, dimRed = "PCA", outputs = "c")
#'
#'
#' @export
Expand Down
10 changes: 9 additions & 1 deletion R/clustering.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@
#' @return SpatialExperiment object containing 'putative cell type' group allotted to each cell (reclust = FALSE) or clusters generated from smoothed data (reclust = TRUE).
#'
#' @examples
#' data(mouseEmbryo2)
#'
#' # to do
#' # for non-spatial clustering of normalised 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

Expand Down
7 changes: 6 additions & 1 deletion R/entropyMeasure.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
#' @return SpatialExperiment object including entropy values for each cell neighbourhood.
#'
#' @examples
#' # to do
#' data(mouseEmbryo2)
#'
#' # requires list of containing cluster proportions of each region (regXclust),
#' # generated using the neighbourDetect() function
#' spe <- entropyMeasure(spe, cells = "uniqueID", regXclust, threads = 1)
#' head(spe$entropy)
#'
#' @export

Expand Down
4 changes: 3 additions & 1 deletion R/neighborDetect.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
#' 2. regXclust, a list of vectors for each cell's neighbourhood composition indicated by the proportion of 'putative cell type' groups it contains.
#
#' @examples
#' data(mouseEmbryo2)
#'
#' # to do
#' out_list <- neighbourDetect(spe, samples = "embryo", NN = 30, cells = "uniqueID", sort = TRUE)
#' names(out_list)
#'
#' @export

Expand Down
6 changes: 5 additions & 1 deletion man/adaptiveSmoothing.Rd

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

9 changes: 7 additions & 2 deletions man/clustSIGNAL.Rd

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

7 changes: 6 additions & 1 deletion man/entropyMeasure.Rd

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

4 changes: 3 additions & 1 deletion man/neighbourDetect.Rd

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

10 changes: 9 additions & 1 deletion man/nsClustering.Rd

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

0 comments on commit 8314085

Please sign in to comment.