A simulated tissue section: 3,449 cells of the analyzed type ("Tumor")
and 4,000 cells of other types ("Other") in an irregular, lobed tissue.
The Tumor cells carry three genes whose density-expression correlations
are known: geneA (rho = 0.6), geneB (rho = 0) and geneC (rho = -0.6).
The other cells only help delineate the tissue: compute the boundary with
denmark_alpha_shape() from all cells, then analyze the Tumor cells. The
examples, the tests and the vignette use these data, so every result can
be checked against the truth.
Value
Data frame with one row per cell and the columns x and y (cell
locations in the window [0, 6] x [0, 4]), celltype ("Tumor" or
"Other") and geneA, geneB and geneC (counts).
Details
The file inst/extdata/denmark_toy.csv.gz was generated by
data-raw/make_toy_data.R with denmark_simulate(), using
rho = c(geneA = 0.6, geneB = 0, geneC = -0.6), width = 6, height = 4,
n_cells = 5000, seed = 1, tissue = "irregular", n_other = 4000,
celltype = "Tumor" and the defaults for the other arguments
(ell1 = 1, ell2 = 1, a11 = 1, sigma2 = 0.8, beta1 = 0.5); the
coordinates were rounded to six decimals. The Python package reads a byte
copy of the same file with denmark.datasets.load_toy().
Examples
toy <- denmark_toy_data()
head(toy)
#> x y celltype geneA geneB geneC
#> 1 4.958866 2.517796 Tumor 3 1 1
#> 2 3.398667 1.109772 Tumor 2 1 4
#> 3 2.060565 2.566543 Tumor 1 3 3
#> 4 1.463342 2.365366 Tumor 3 0 4
#> 5 5.085220 2.566559 Tumor 10 1 1
#> 6 2.149059 1.976934 Tumor 0 8 1
table(toy$celltype)
#>
#> Other Tumor
#> 4000 3449
tumor <- subset(toy, celltype == "Tumor", select = -celltype)