diff --git a/R/classifySingleR.R b/R/classifySingleR.R index f27e70a..3a3b747 100644 --- a/R/classifySingleR.R +++ b/R/classifySingleR.R @@ -12,7 +12,8 @@ #' @param tune.thresh A numeric scalar specifying the maximum difference from the maximum correlation to use in fine-tuning. #' @param sd.thresh Deprecated and ignored. #' @param assay.type Integer scalar or string specifying the matrix of expression values to use if \code{test} is a \linkS4class{SummarizedExperiment}. -#' @param check.missing Logical scalar indicating whether rows should be checked for missing values (and if found, removed). +#' @param check.missing Logical scalar indicating whether rows should be checked for missing values. +#' If true and any missing values are found, the rows containing these values are silently removed. #' @param prune A logical scalar indicating whether label pruning should be performed. #' @param num.threads Integer scalar specifying the number of threads to use for classification. #' @param BPPARAM A \linkS4class{BiocParallelParam} object specifying the parallelization scheme to use for \code{NA} scanning, when \code{check.missing=TRUE}. diff --git a/R/trainSingleR.R b/R/trainSingleR.R index 49bafff..fe56ec5 100644 --- a/R/trainSingleR.R +++ b/R/trainSingleR.R @@ -43,7 +43,8 @@ #' @param recompute Deprecated and ignored. #' @param assay.type An integer scalar or string specifying the assay of \code{ref} containing the relevant expression matrix, #' if \code{ref} is a \linkS4class{SummarizedExperiment} object (or is a list that contains one or more such objects). -#' @param check.missing Logical scalar indicating whether rows should be checked for missing values (and if found, removed). +#' @param check.missing Logical scalar indicating whether rows should be checked for missing values. +#' If true and any missing values are found, the rows containing these values are silently removed. #' @param BNPARAM Deprecated and ignored. #' @param approximate Logical scalar indicating whether a faster approximate method should be used to compute the quantile. #' @param num.threads Integer scalar specifying the number of threads to use for index building. diff --git a/man/classifySingleR.Rd b/man/classifySingleR.Rd index 218193c..51a71f8 100644 --- a/man/classifySingleR.Rd +++ b/man/classifySingleR.Rd @@ -38,7 +38,8 @@ Alternatively, a List of Lists produced by \code{\link{trainSingleR}} for multip \item{assay.type}{Integer scalar or string specifying the matrix of expression values to use if \code{test} is a \linkS4class{SummarizedExperiment}.} -\item{check.missing}{Logical scalar indicating whether rows should be checked for missing values (and if found, removed).} +\item{check.missing}{Logical scalar indicating whether rows should be checked for missing values. +If true and any missing values are found, the rows containing these values are silently removed.} \item{num.threads}{Integer scalar specifying the number of threads to use for classification.} diff --git a/man/getClassicMarkers.Rd b/man/getClassicMarkers.Rd index d623471..a04662a 100644 --- a/man/getClassicMarkers.Rd +++ b/man/getClassicMarkers.Rd @@ -32,7 +32,8 @@ Each element should contain a character vector or factor specifying the label fo \item{assay.type}{An integer scalar or string specifying the assay of \code{ref} containing the relevant expression matrix, if \code{ref} is a \linkS4class{SummarizedExperiment} object (or is a list that contains one or more such objects).} -\item{check.missing}{Logical scalar indicating whether rows should be checked for missing values (and if found, removed).} +\item{check.missing}{Logical scalar indicating whether rows should be checked for missing values. +If true and any missing values are found, the rows containing these values are silently removed.} \item{de.n}{An integer scalar specifying the number of DE genes to use. Defaults to \code{500 * (2/3) ^ log2(N)} where \code{N} is the number of unique labels.} diff --git a/man/trainSingleR.Rd b/man/trainSingleR.Rd index 6701649..af34530 100644 --- a/man/trainSingleR.Rd +++ b/man/trainSingleR.Rd @@ -80,7 +80,8 @@ By default, all genes in \code{ref} are used.} \item{assay.type}{An integer scalar or string specifying the assay of \code{ref} containing the relevant expression matrix, if \code{ref} is a \linkS4class{SummarizedExperiment} object (or is a list that contains one or more such objects).} -\item{check.missing}{Logical scalar indicating whether rows should be checked for missing values (and if found, removed).} +\item{check.missing}{Logical scalar indicating whether rows should be checked for missing values. +If true and any missing values are found, the rows containing these values are silently removed.} \item{approximate}{Logical scalar indicating whether a faster approximate method should be used to compute the quantile.} diff --git a/tests/testthat/test-classify.R b/tests/testthat/test-classify.R index fb596be..4ad16e0 100644 --- a/tests/testthat/test-classify.R +++ b/tests/testthat/test-classify.R @@ -86,7 +86,7 @@ test_that("classifySingleR behaves with missing values", { logcounts(sce)[1,1] <- NA Q <- 0.8 - expect_warning(out <- classifySingleR(sce, trained, fine.tune=FALSE, quantile=Q), 'missing values') + out <- classifySingleR(sce, trained, fine.tune=FALSE, quantile=Q) ref <- classifySingleR(test, trained, fine.tune=FALSE, quantile=Q) expect_identical(out, ref) }) diff --git a/tests/testthat/test-train.R b/tests/testthat/test-train.R index 027bd04..03ead0f 100644 --- a/tests/testthat/test-train.R +++ b/tests/testthat/test-train.R @@ -125,7 +125,7 @@ test_that("trainSingleR strips out NAs", { sce <- training logcounts(sce)[1,1] <- NA - expect_warning(out <- trainSingleR(sce, sce$label), "missing values") + out <- trainSingleR(sce, sce$label) ref <- trainSingleR(sce[-1,], sce$label) expect_identical(out$ref, ref$ref)