[413088]: / tests / testthat / test-embeddings.R

Download this file

16 lines (12 with data), 458 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Testing functions of manipulating embeddings ####
test_that("embeddings", {
# get data
data("visium_data")
# write embedding
vrEmbeddings(visium_data, type = "pca") <- vrCoordinates(visium_data)
# check overwrite embeddings
expect_error(vrEmbeddings(visium_data, type = "pca") <- vrCoordinates(visium_data))
vrEmbeddings(visium_data, type = "pca", overwrite = TRUE) <- vrCoordinates(visium_data)
# return
expect_equal(1,1L)
})