tests/testthat/test_spatialPlot.R

# Test Spatial plot
# ------------------------------------------------------------------------------

object = readRDS(file.path(system.file(package = "Spaniel"),
                           "extdata/SeuratData.rds"))
grob = readRDS(file.path(system.file(package = "Spaniel"),
                         "extdata/image.rds"))
plotType = "Cluster"
clusterRes = "cluster_RNA_snn_res.0.6"

test.p <- spanielPlot(object, 
                    grob, 
                    plotType,
                    gene =NULL,
                    clusterRes)

test_that("spanielPlot creates a plot", {
    expect_is(test.p, "ggplot")
})

Try the Spaniel package in your browser

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

Spaniel documentation built on Nov. 8, 2020, 5:54 p.m.