Skip to contents

Loads one stored corruption scenario from the human dorsolateral prefrontal cortex (DLPFC) Visium benchmark or generates one colorectal cancer (CRC) Visium HD corruption from its stored recipe. The package contains coordinates and labels, not expression counts or histology images.

Usage

load_spatial_benchmark(
  name = c("dlpfc", "merfish", "crc", "colorectal"),
  scenario = 1L,
  seed = NULL
)

Arguments

name

Dataset name. `"dlpfc"` and `"crc"` are bundled. The legacy `"colorectal"` alias is accepted for compatibility.

scenario

Scenario number or scenario identifier. Inspect the `design` element of the corresponding data object for the complete design.

seed

Optional integer seed used when generating a CRC corruption. The default `NULL` uses the current R random-number stream without setting a seed. Supplying a value makes the generated CRC labels reproducible. DLPFC scenarios already contain their corrupted labels and ignore `seed`.

Value

A `spatial_refinement_benchmark` ready for [benchmark_spatial_refiners()].

Examples

dlpfc <- load_spatial_benchmark("dlpfc", scenario = 1)
dim(dlpfc$xy)
#> [1] 47329     2
# \donttest{
crc <- load_spatial_benchmark("crc", "CRC_random_25_r1", seed = 1040001L)
mean(crc$labels != crc$truth)
#> [1] 0.2499987
# }