Skip to content

Commit

Permalink
Merge pull request #309 from zhewa/master
Browse files Browse the repository at this point in the history
Fix bioc doc warning
  • Loading branch information
zhewa authored Oct 16, 2020
2 parents 100a7a5 + 82cc7a6 commit f748bec
Show file tree
Hide file tree
Showing 70 changed files with 255 additions and 247 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: celda
Title: CEllular Latent Dirichlet Allocation
Version: 1.5.10
Version: 1.5.11
Authors@R: c(person("Joshua", "Campbell", email = "camp@bu.edu",
role = c("aut", "cre")),
person("Sean", "Corbett", email = "scorbett@bu.edu", role = c("aut")),
Expand Down
14 changes: 7 additions & 7 deletions R/accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#' \item A \linkS4class{SingleCellExperiment} object returned by
#' \link{celda_C}, or \link{celda_CG}, with the matrix
#' located in the \code{useAssay} assay slot. The
#' a \link[SingleCellExperiment]{altExp} slot with name \code{altExpName} will
#' a \link{altExp} slot with name \code{altExpName} will
#' be used. Rows represent features and columns represent cells.
#' \item Celda model object.}
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param value Character vector of cell cluster labels for replacements. Works
#' only if \code{x} is a \linkS4class{SingleCellExperiment} object.
Expand Down Expand Up @@ -85,7 +85,7 @@ setReplaceMethod("celdaClusters", signature(x = "SingleCellExperiment"),
#' \link{celda_G}, or \link{celda_CG}, with the matrix
#' located in the \code{useAssay} assay slot.
#' Rows represent features and columns represent cells.
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param value Character vector of feature module labels for replacements.
#' Works only if \code{x} is a \linkS4class{SingleCellExperiment} object.
Expand Down Expand Up @@ -141,7 +141,7 @@ setReplaceMethod("celdaModules", signature(sce = "SingleCellExperiment"),
#' located in the \code{useAssay} assay slot.
#' Rows represent features and columns represent cells.
#' \item A celda model object.}
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param value Character vector of sample labels for replacements. Works
#' only is \code{x} is a \linkS4class{SingleCellExperiment} object.
Expand Down Expand Up @@ -263,7 +263,7 @@ setMethod("matrixNames",
#' priors from the celdaList object when it was created.
#' @param x An object of class \linkS4class{SingleCellExperiment} or class
#' \code{celdaList}.
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param ... Ignored. Placeholder to prevent check warning.
#' @return Data Frame. Contains details on the various K/L parameters, chain
Expand Down Expand Up @@ -310,7 +310,7 @@ setMethod("runParams",
#' \link{celdaGridSearch} run.
#' @param x An object of class \linkS4class{SingleCellExperiment} or
#' \code{celdaList}.
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param ... Ignored. Placeholder to prevent check warning.
#' @return List. Contains one celdaModel object for each of the parameters
Expand Down Expand Up @@ -357,7 +357,7 @@ setMethod("resList",
#' \link{celda_C}, \link{celda_G} or \link{celda_CG}.
#' @param sce A \link[SingleCellExperiment]{SingleCellExperiment} object
#' returned by \link{celda_C}, \link{celda_G}, or \link{celda_CG}.
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param ... Ignored. Placeholder to prevent check warning.
#' @return Character. The celda model. Can be one of "celda_C", "celda_G", or
Expand Down
18 changes: 9 additions & 9 deletions R/celdaGridSearch.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#' with the matrix located in the assay slot under \code{useAssay}.
#' Rows represent features and columns represent cells.
#' @param useAssay A string specifying the name of the
#' \link[SummarizedExperiment]{assay} slot to use. Default "counts".
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' \link{assay} slot to use. Default "counts".
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param model Celda model. Options available in \link{availableModels}.
#' @param paramsTest List. A list denoting the combinations of parameters to
Expand Down Expand Up @@ -45,7 +45,7 @@
#' and main process. Default "Celda".
#' @return A \linkS4class{SingleCellExperiment} object. Function
#' parameter settings and celda model results are stored in the
#' \link[S4Vectors]{metadata} \code{"celda_grid_search"} slot.
#' \link{metadata} \code{"celda_grid_search"} slot.
#' @param ... Ignored. Placeholder to prevent check warning.
#' @seealso \link{celda_G} for feature clustering, \link{celda_C} for
#' clustering of cells, and \link{celda_CG} for simultaneous clustering of
Expand Down Expand Up @@ -440,7 +440,7 @@ setMethod("celdaGridSearch",
#' \item celdaList object.}
#' @param params List. List of parameters used to subset the matching celda
#' models in list \code{"celda_grid_search"} in \code{metadata(x)}.
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param ... Ignored. Placeholder to prevent check warning.
#' @return One of
Expand All @@ -451,10 +451,10 @@ setMethod("celdaGridSearch",
#' \code{"celda_grid_search"} slot in \code{metadata(x)} matches
#' the given criteria, a new \linkS4class{SingleCellExperiment} object
#' with the matching model stored in the
#' \link[S4Vectors]{metadata}
#' \link{metadata}
#' \code{"celda_parameters"} slot will be returned. Otherwise, a new
#' \linkS4class{SingleCellExperiment} object with the subset models stored
#' in the \link[S4Vectors]{metadata}
#' in the \link{metadata}
#' \code{"celda_grid_search"} slot will be returned.
#' \item A new \code{celdaList} object containing all models matching the
#' provided criteria in \code{params}. If only one item in the
Expand Down Expand Up @@ -581,7 +581,7 @@ setMethod("subsetCeldaList",
#' best model as a
#' \code{celdaList} object or not. If \code{FALSE}, return the best model as a
#' corresponding celda model object.
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param ... Ignored. Placeholder to prevent check warning.
#' @return One of
Expand All @@ -591,10 +591,10 @@ setMethod("subsetCeldaList",
#' \code{metadata(x)}. If there is only one set of parameters,
#' a new \linkS4class{SingleCellExperiment} object
#' with the matching model stored in the
#' \link[S4Vectors]{metadata}
#' \link{metadata}
#' \code{"celda_parameters"} slot will be returned. Otherwise, a new
#' \linkS4class{SingleCellExperiment} object with the subset models stored
#' in the \link[S4Vectors]{metadata}
#' in the \link{metadata}
#' \code{"celda_grid_search"} slot will be returned.
#' \item A new \code{celdaList} object containing one model with the best
#' log-likelihood for each set of parameters. If only one set of parameters
Expand Down
4 changes: 2 additions & 2 deletions R/celdaProbabilityMap.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#' populations and samples).
#' @param sce A \link[SingleCellExperiment]{SingleCellExperiment} object
#' returned by \link{celda_C}, \link{celda_G}, or \link{celda_CG}.
#' @param useAssay A string specifying which \link[SummarizedExperiment]{assay}
#' @param useAssay A string specifying which \link{assay}
#' slot to use. Default "counts".
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param level Character. One of "cellPopulation" or "Sample".
#' "cellPopulation" will display the absolute probabilities and relative
Expand Down
6 changes: 3 additions & 3 deletions R/celdaUMAP.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#' transformed before applying UMAP.
#' @param sce A \link[SingleCellExperiment]{SingleCellExperiment} object
#' returned by \link{celda_C}, \link{celda_G}, or \link{celda_CG}.
#' @param useAssay A string specifying which \link[SummarizedExperiment]{assay}
#' @param useAssay A string specifying which \link{assay}
#' slot to use. Default "counts".
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param maxCells Integer. Maximum number of cells to plot. Cells will be
#' randomly subsampled if \code{ncol(sce) > maxCells}. Larger numbers of cells
Expand Down Expand Up @@ -62,7 +62,7 @@
#' @param ... Additional parameters to pass to \link[uwot]{umap}.
#' @return \code{sce} with UMAP coordinates
#' (columns "celda_UMAP1" & "celda_UMAP2") added to
#' \code{\link[SingleCellExperiment]{reducedDim}(sce, "celda_UMAP")}.
#' \code{\link{reducedDim}(sce, "celda_UMAP")}.
#' @export
setGeneric("celdaUmap",
function(sce, ...) {
Expand Down
14 changes: 7 additions & 7 deletions R/celda_C.R
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#' @title Cell clustering with Celda
#' @description Clusters the columns of a count matrix containing single-cell
#' data into K subpopulations. The
#' \code{useAssay} \link[SummarizedExperiment]{assay} slot in
#' \code{altExpName} \link[SingleCellExperiment]{altExp} slot will be used if
#' \code{useAssay} \link{assay} slot in
#' \code{altExpName} \link{altExp} slot will be used if
#' it exists. Otherwise, the \code{useAssay}
#' \link[SummarizedExperiment]{assay} slot in \code{x} will be used if
#' \link{assay} slot in \code{x} will be used if
#' \code{x} is a \linkS4class{SingleCellExperiment} object.
#' @param x A numeric \link{matrix} of counts or a
#' \linkS4class{SingleCellExperiment}
#' with the matrix located in the assay slot under \code{useAssay} in
#' \code{altExp(x, altExpName)}.
#' Rows represent features and columns represent cells.
#' @param useAssay A string specifying the name of the
#' \link[SummarizedExperiment]{assay} slot to use. Default "counts".
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' \link{assay} slot to use. Default "counts".
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param sampleLabel Vector or factor. Denotes the sample label for each cell
#' (column) in the count matrix.
Expand Down Expand Up @@ -59,10 +59,10 @@
#' @param verbose Logical. Whether to print log messages. Default TRUE.
#' @param ... Ignored. Placeholder to prevent check warning.
#' @return A \link[SingleCellExperiment]{SingleCellExperiment} object. Function
#' parameter settings are stored in the \link[S4Vectors]{metadata}
#' parameter settings are stored in the \link{metadata}
#' \code{"celda_parameters"} slot.
#' Columns \code{celda_sample_label} and \code{celda_cell_cluster} in
#' \link[SummarizedExperiment]{colData} contain sample labels and celda cell
#' \link{colData} contain sample labels and celda cell
#' population clusters.
#' @seealso \link{celda_G} for feature clustering and \link{celda_CG} for
#' simultaneous clustering of features and cells. \link{celdaGridSearch} can
Expand Down
37 changes: 19 additions & 18 deletions R/celda_CG.R
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#' @title Cell and feature clustering with Celda
#' @description Clusters the rows and columns of a count matrix containing
#' single-cell data into L modules and K subpopulations, respectively. The
#' \code{useAssay} \link[SummarizedExperiment]{assay} slot in
#' \code{altExpName} \link[SingleCellExperiment]{altExp} slot will be used if
#' \code{useAssay} \link{assay} slot in
#' \code{altExpName} \link{altExp} slot will be used if
#' it exists. Otherwise, the \code{useAssay}
#' \link[SummarizedExperiment]{assay} slot in \code{x} will be used if
#' \link{assay} slot in \code{x} will be used if
#' \code{x} is a \linkS4class{SingleCellExperiment} object.
#' @param x A numeric \link{matrix} of counts or a
#' \linkS4class{SingleCellExperiment}
#' with the matrix located in the \link[SummarizedExperiment]{assay}
#' with the matrix located in the \link{assay}
#' slot under \code{useAssay} in \code{altExp(x, altExpName)}.
#' Rows represent features and columns represent cells.
#' @param useAssay A string specifying the name of the
#' \link[SummarizedExperiment]{assay} slot to use. Default "counts".
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' \link{assay} slot to use. Default "counts".
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param sampleLabel Vector or factor. Denotes the sample label for each cell
#' (column) in the count matrix.
Expand All @@ -35,11 +35,12 @@
#' likelihood to stop inference. Default 10.
#' @param maxIter Integer. Maximum number of iterations of Gibbs sampling to
#' perform. Default 200.
#' @param splitOnIter Integer. On every `splitOnIter` iteration, a heuristic
#' @param splitOnIter Integer. On every \code{splitOnIter} iteration,
#' a heuristic
#' will be applied to determine if a cell population or feature module should
#' be reassigned and another cell population or feature module should be split
#' into two clusters. To disable splitting, set to -1. Default 10.
#' @param splitOnLast Integer. After `stopIter` iterations have been
#' @param splitOnLast Integer. After \code{stopIter} iterations have been
#' performed without improvement, a heuristic will be applied to determine if
#' a cell population or feature module should be reassigned and another cell
#' population or feature module should be split into two clusters. If a split
Expand All @@ -52,32 +53,32 @@
#' With 'random', cells are randomly assigned to a populations. With 'split',
#' cells will be split into sqrt(K) populations and then each popluation will
#' be subsequently split into another sqrt(K) populations. With 'predefined',
#' values in `zInit` will be used to initialize `z`. Default 'split'.
#' values in \code{zInit} will be used to initialize \code{z}. Default 'split'.
#' @param yInitialize Chararacter. One of 'random', 'split', or 'predefined'.
#' With 'random', features are randomly assigned to a modules. With 'split',
#' features will be split into sqrt(L) modules and then each module will be
#' subsequently split into another sqrt(L) modules. With 'predefined', values
#' in `yInit` will be used to initialize `y`. Default 'split'.
#' in \code{yInit} will be used to initialize \code{y}. Default 'split'.
#' @param zInit Integer vector. Sets initial starting values of z. If NULL,
#' starting values for each cell will be randomly sampled from 1:K. 'zInit'
#' can only be used when `initialize' = 'random'`. Default NULL.
#' can only be used when \code{initialize = "random"}. Default NULL.
#' @param yInit Integer vector. Sets initial starting values of y. If NULL,
#' starting values for each feature will be randomly sampled from 1:L.
#' 'yInit' can only be used when `initialize = 'random'`. Default NULL.
#' @param countChecksum Character. An MD5 checksum for the `counts` matrix.
#' 'yInit' can only be used when \code{initialize = "random"}. Default NULL.
#' @param countChecksum Character. An MD5 checksum for the counts matrix.
#' Default NULL.
#' @param logfile Character. Messages will be redirected to a file named
#' `logfile`. If NULL, messages will be printed to stdout. Default NULL.
#' @param verbose Logical. Whether to print log messages. Default TRUE.
#' @param ... Ignored. Placeholder to prevent check warning.
#' @return A \linkS4class{SingleCellExperiment} object. Function
#' parameter settings are stored in \link[S4Vectors]{metadata}
#' \code{"celda_parameters"} in \link[SingleCellExperiment]{altExp} slot.
#' In \link[SingleCellExperiment]{altExp} slot,
#' parameter settings are stored in \link{metadata}
#' \code{"celda_parameters"} in \link{altExp} slot.
#' In \link{altExp} slot,
#' columns \code{celda_sample_label} and \code{celda_cell_cluster} in
#' \link[SummarizedExperiment]{colData} contain sample labels and celda cell
#' \link{colData} contain sample labels and celda cell
#' population clusters. Column \code{celda_feature_module} in
#' \link[SummarizedExperiment]{rowData} contains feature modules.
#' \link{rowData} contains feature modules.
#' @seealso \link{celda_G} for feature clustering and \link{celda_C} for
#' clustering cells. \link{celdaGridSearch} can be used to run multiple
#' values of K/L and multiple chains in parallel.
Expand Down
14 changes: 7 additions & 7 deletions R/celda_G.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#' @title Feature clustering with Celda
#' @description Clusters the rows of a count matrix containing single-cell data
#' into L modules. The
#' \code{useAssay} \link[SummarizedExperiment]{assay} slot in
#' \code{altExpName} \link[SingleCellExperiment]{altExp} slot will be used if
#' \code{useAssay} \link{assay} slot in
#' \code{altExpName} \link{altExp} slot will be used if
#' it exists. Otherwise, the \code{useAssay}
#' \link[SummarizedExperiment]{assay} slot in \code{x} will be used if
#' \link{assay} slot in \code{x} will be used if
#' \code{x} is a \linkS4class{SingleCellExperiment} object.
#' @param x A numeric \link{matrix} of counts or a
#' \linkS4class{SingleCellExperiment}
#' with the matrix located in the assay slot under \code{useAssay}.
#' Rows represent features and columns represent cells.
#' @param useAssay A string specifying the name of the
#' \link[SummarizedExperiment]{assay} slot to use. Default "counts".
#' @param altExpName The name for the \link[SingleCellExperiment]{altExp} slot
#' \link{assay} slot to use. Default "counts".
#' @param altExpName The name for the \link{altExp} slot
#' to use. Default "featureSubset".
#' @param L Integer. Number of feature modules.
#' @param beta Numeric. Concentration parameter for Phi. Adds a pseudocount to
Expand Down Expand Up @@ -53,9 +53,9 @@
#' @param verbose Logical. Whether to print log messages. Default TRUE.
#' @param ... Ignored. Placeholder to prevent check warning.
#' @return A \linkS4class{SingleCellExperiment} object. Function
#' parameter settings are stored in the \link[S4Vectors]{metadata}
#' parameter settings are stored in the \link{metadata}
#' \code{"celda_parameters"} slot. Column \code{celda_feature_module} in
#' \link[SummarizedExperiment]{rowData} contains feature modules.
#' \link{rowData} contains feature modules.
#' @seealso \link{celda_C} for cell clustering and \link{celda_CG} for
#' simultaneous clustering of features and cells. \link{celdaGridSearch} can
#' be used to run multiple values of L and multiple chains in parallel.
Expand Down
Loading

0 comments on commit f748bec

Please sign in to comment.