|
a |
|
b/tests/testthat/test-featuredata.R |
|
|
1 |
# Testing functions of assay data #### |
|
|
2 |
test_that("featuredata", { |
|
|
3 |
|
|
|
4 |
# get data |
|
|
5 |
data("visium_data") |
|
|
6 |
|
|
|
7 |
# get and set feature types |
|
|
8 |
vrMainFeatureType(visium_data) |
|
|
9 |
vrMainFeatureType(visium_data, assay = "Assay1") <- "RNA" |
|
|
10 |
expect_warning(vrMainFeatureType(visium_data) <- "main") |
|
|
11 |
|
|
|
12 |
# get feature data |
|
|
13 |
expect_equal(vrFeatureTypeNames(visium_data), "RNA") |
|
|
14 |
vrFeatureData(visium_data, feat_type = "RNA") |
|
|
15 |
expect_equal(vrFeatureData(visium_data, feat_type = "Prot"), NULL) |
|
|
16 |
|
|
|
17 |
# return |
|
|
18 |
expect_equal(1,1L) |
|
|
19 |
}) |