From 5e63dfce9f7d924eb021883bb20cb56e7dbf568d Mon Sep 17 00:00:00 2001 From: Luke Zappia <lazappi@users.noreply.github.com> Date: Sun, 1 Oct 2017 17:33:44 +1100 Subject: [PATCH] Run checks --- R/scDD-estimate.R | 20 +++++++++++++------- man/scDDEstimate.Rd | 13 ++++++++----- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/R/scDD-estimate.R b/R/scDD-estimate.R index 1ae1521..9c21367 100644 --- a/R/scDD-estimate.R +++ b/R/scDD-estimate.R @@ -13,6 +13,7 @@ #' @param BPPARAM A \code{\link[BiocParallel]{BiocParallelParam}} instance #' giving the parallel back-end to be used. Default is #' \code{\link[BiocParallel]{SerialParam}} which uses a single core. +#' @param ... further arguments passed to or from other methods. #' #' @details #' This function applies \code{\link[scDD]{preprocess}} to the counts then uses @@ -31,8 +32,9 @@ #' } #' @importFrom BiocParallel SerialParam #' @export -scDDEstimate <- function(counts, params = newSCDDParams(), - verbose = TRUE, BPPARAM = SerialParam(), ...) { +scDDEstimate <- function(counts, #conditions, condition, + params = newSCDDParams(), verbose = TRUE, + BPPARAM = SerialParam(), ...) { if (!requireNamespace("scDD", quietly = TRUE)) { stop("The scDD simulation requires the 'scDD' package.") @@ -44,8 +46,9 @@ scDDEstimate <- function(counts, params = newSCDDParams(), #' @rdname scDDEstimate #' @importFrom SingleCellExperiment SingleCellExperiment #' @export -scDDEstimate.matrix <- function(counts, conditions, params = newSCDDParams(), - verbose = TRUE, BPPARAM = SerialParam(), ...) { +scDDEstimate.matrix <- function(counts, params = newSCDDParams(), + verbose = TRUE, BPPARAM = SerialParam(), + conditions, ...) { checkmate::assertMatrix(counts, mode = "numeric", any.missing = FALSE, min.rows = 1, min.cols = 1, row.names = "unique", @@ -60,17 +63,20 @@ scDDEstimate.matrix <- function(counts, conditions, params = newSCDDParams(), #' @rdname scDDEstimate #' @export -scDDEstimate.SingleCellExperiment <- function(counts, condition = "condition", +scDDEstimate.SingleCellExperiment <- function(counts, params = newSCDDParams(), verbose = TRUE, - BPPARAM = SerialParam(), ...) { + BPPARAM = SerialParam(), + condition = "condition", ...) { scDDEstimate.default(counts, condition, params, verbose, BPPARAM) } #' @rdname scDDEstimate #' @importFrom methods as #' @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(counts, "SingleCellExperiment") diff --git a/man/scDDEstimate.Rd b/man/scDDEstimate.Rd index ca73df5..2651834 100644 --- a/man/scDDEstimate.Rd +++ b/man/scDDEstimate.Rd @@ -10,13 +10,14 @@ scDDEstimate(counts, params = newSCDDParams(), verbose = TRUE, BPPARAM = SerialParam(), ...) -\method{scDDEstimate}{matrix}(counts, conditions, params = newSCDDParams(), - verbose = TRUE, BPPARAM = SerialParam(), ...) +\method{scDDEstimate}{matrix}(counts, params = newSCDDParams(), + verbose = TRUE, BPPARAM = SerialParam(), conditions, ...) -\method{scDDEstimate}{SingleCellExperiment}(counts, condition = "condition", - params = newSCDDParams(), verbose = TRUE, BPPARAM = SerialParam(), ...) +\method{scDDEstimate}{SingleCellExperiment}(counts, params = newSCDDParams(), + 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{ \item{counts}{either a counts matrix or a SingleCellExperiment object @@ -30,6 +31,8 @@ containing count data to estimate parameters from.} giving the parallel back-end to be used. Default is \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. Conditions can be 1 or 2.} -- GitLab