View source: R/geomx_import_data.R
readGeoMxFromDGE | R Documentation |
Import GeoMX DSP data into a spatial experiment object from DGEList object
readGeoMxFromDGE(dge_object, spatialCoord = NULL)
dge_object |
a DGEList object (created using edgeR::DGEList). |
spatialCoord |
a matrix with coordinates of samples, rowname must be cosistent with the colnames of dge_object. |
A SpatialExperiment object.
# making a simple DGEList object
ng <- 1000
ns <- 10
Counts <- matrix(rnbinom(ng * ns, mu = 5, size = 2), ng, ns)
rownames(Counts) <- seq(ng)
y <- edgeR::DGEList(counts = Counts, group = rep(seq(2), each = 5))
# transfer into spatial experiment object
coords <- matrix(rnorm(2 * ns), 10, 2)
spe <- readGeoMxFromDGE(dge_object = y, spatialCoord = coords)
spe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.