tests/testthat/test-simpleEstimate.R

context("simpleEstimate")

library(scater)
set.seed(1)
counts <- counts(mockSCE())

test_that("simpleEstimate works", {
    params <- simpleEstimate(counts)
    expect_true(validObject(params))
})

test_that("simpleEstimate works with SingleCellExperiment", {
    sce <- SingleCellExperiment::SingleCellExperiment(
        assays = list(counts = counts)
    )
    params <- simpleEstimate(sce)
    expect_true(validObject(params))
})

test_that("simpleEstimate works with SingleCellExperiment without counts", {
    sce <- SingleCellExperiment::SingleCellExperiment(
        assays = list(TEST = counts)
    )
    expect_warning(simpleEstimate(sce), "counts assay is missing")
})

Try the splatter package in your browser

Any scripts or data that you put into this service are public.

splatter documentation built on Dec. 3, 2020, 2:01 a.m.