tests/testthat/test_SpatialExperiment-assays.R

example(read10xVisium, echo = FALSE)

test_that("molecules()/<- gets/sets assay(., 'molecules')", {
    tmp <- spe
    expect_identical(
        molecules(tmp) <- assay(spe),
        assay(tmp, "molecules") <- assay(spe))
    expect_identical(
        assayNames(tmp), 
        c(assayNames(spe), "molecules"))
})
drighelli/VisiumExperiment documentation built on April 10, 2024, 8:01 a.m.