Skip to content
Snippets Groups Projects
Commit 5e63dfce authored by Luke Zappia's avatar Luke Zappia
Browse files

Run checks

parent cfbad4d5
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#' @param BPPARAM A \code{\link[BiocParallel]{BiocParallelParam}} instance #' @param BPPARAM A \code{\link[BiocParallel]{BiocParallelParam}} instance
#' giving the parallel back-end to be used. Default is #' giving the parallel back-end to be used. Default is
#' \code{\link[BiocParallel]{SerialParam}} which uses a single core. #' \code{\link[BiocParallel]{SerialParam}} which uses a single core.
#' @param ... further arguments passed to or from other methods.
#' #'
#' @details #' @details
#' This function applies \code{\link[scDD]{preprocess}} to the counts then uses #' This function applies \code{\link[scDD]{preprocess}} to the counts then uses
...@@ -31,8 +32,9 @@ ...@@ -31,8 +32,9 @@
#' } #' }
#' @importFrom BiocParallel SerialParam #' @importFrom BiocParallel SerialParam
#' @export #' @export
scDDEstimate <- function(counts, params = newSCDDParams(), scDDEstimate <- function(counts, #conditions, condition,
verbose = TRUE, BPPARAM = SerialParam(), ...) { params = newSCDDParams(), verbose = TRUE,
BPPARAM = SerialParam(), ...) {
if (!requireNamespace("scDD", quietly = TRUE)) { if (!requireNamespace("scDD", quietly = TRUE)) {
stop("The scDD simulation requires the 'scDD' package.") stop("The scDD simulation requires the 'scDD' package.")
...@@ -44,8 +46,9 @@ scDDEstimate <- function(counts, params = newSCDDParams(), ...@@ -44,8 +46,9 @@ scDDEstimate <- function(counts, params = newSCDDParams(),
#' @rdname scDDEstimate #' @rdname scDDEstimate
#' @importFrom SingleCellExperiment SingleCellExperiment #' @importFrom SingleCellExperiment SingleCellExperiment
#' @export #' @export
scDDEstimate.matrix <- function(counts, conditions, params = newSCDDParams(), scDDEstimate.matrix <- function(counts, params = newSCDDParams(),
verbose = TRUE, BPPARAM = SerialParam(), ...) { verbose = TRUE, BPPARAM = SerialParam(),
conditions, ...) {
checkmate::assertMatrix(counts, mode = "numeric", any.missing = FALSE, checkmate::assertMatrix(counts, mode = "numeric", any.missing = FALSE,
min.rows = 1, min.cols = 1, row.names = "unique", min.rows = 1, min.cols = 1, row.names = "unique",
...@@ -60,17 +63,20 @@ scDDEstimate.matrix <- function(counts, conditions, params = newSCDDParams(), ...@@ -60,17 +63,20 @@ scDDEstimate.matrix <- function(counts, conditions, params = newSCDDParams(),
#' @rdname scDDEstimate #' @rdname scDDEstimate
#' @export #' @export
scDDEstimate.SingleCellExperiment <- function(counts, condition = "condition", scDDEstimate.SingleCellExperiment <- function(counts,
params = newSCDDParams(), params = newSCDDParams(),
verbose = TRUE, verbose = TRUE,
BPPARAM = SerialParam(), ...) { BPPARAM = SerialParam(),
condition = "condition", ...) {
scDDEstimate.default(counts, condition, params, verbose, BPPARAM) scDDEstimate.default(counts, condition, params, verbose, BPPARAM)
} }
#' @rdname scDDEstimate #' @rdname scDDEstimate
#' @importFrom methods as #' @importFrom methods as
#' @export #' @export
scDDEstimate.default <- function(counts, condition, params, verbose, BPPARAM) { scDDEstimate.default <- function(counts,
params = newSCDDParams(), verbose = TRUE,
BPPARAM = SerialParam(), condition, ...) {
checkmate::assertClass(params, "SCDDParams") checkmate::assertClass(params, "SCDDParams")
checkmate::assertClass(counts, "SingleCellExperiment") checkmate::assertClass(counts, "SingleCellExperiment")
......
...@@ -10,13 +10,14 @@ ...@@ -10,13 +10,14 @@
scDDEstimate(counts, params = newSCDDParams(), verbose = TRUE, scDDEstimate(counts, params = newSCDDParams(), verbose = TRUE,
BPPARAM = SerialParam(), ...) BPPARAM = SerialParam(), ...)
\method{scDDEstimate}{matrix}(counts, conditions, params = newSCDDParams(), \method{scDDEstimate}{matrix}(counts, params = newSCDDParams(),
verbose = TRUE, BPPARAM = SerialParam(), ...) verbose = TRUE, BPPARAM = SerialParam(), conditions, ...)
\method{scDDEstimate}{SingleCellExperiment}(counts, condition = "condition", \method{scDDEstimate}{SingleCellExperiment}(counts, params = newSCDDParams(),
params = newSCDDParams(), verbose = TRUE, BPPARAM = SerialParam(), ...) verbose = TRUE, BPPARAM = SerialParam(), condition = "condition", ...)
\method{scDDEstimate}{default}(counts, condition, params, verbose, BPPARAM) \method{scDDEstimate}{default}(counts, params = newSCDDParams(),
verbose = TRUE, BPPARAM = SerialParam(), condition, ...)
} }
\arguments{ \arguments{
\item{counts}{either a counts matrix or a SingleCellExperiment object \item{counts}{either a counts matrix or a SingleCellExperiment object
...@@ -30,6 +31,8 @@ containing count data to estimate parameters from.} ...@@ -30,6 +31,8 @@ containing count data to estimate parameters from.}
giving the parallel back-end to be used. Default is giving the parallel back-end to be used. Default is
\code{\link[BiocParallel]{SerialParam}} which uses a single core.} \code{\link[BiocParallel]{SerialParam}} which uses a single core.}
\item{...}{further arguments passed to or from other methods.}
\item{conditions}{Vector giving the condition that each cell belongs to. \item{conditions}{Vector giving the condition that each cell belongs to.
Conditions can be 1 or 2.} Conditions can be 1 or 2.}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment