readGeoMxFromDGE: Import GeoMX DSP data into a spatial experiment object from...

View source: R/geomx_import_data.R

readGeoMxFromDGER Documentation

Import GeoMX DSP data into a spatial experiment object from DGEList object

Description

Import GeoMX DSP data into a spatial experiment object from DGEList object

Usage

readGeoMxFromDGE(dge_object, spatialCoord = NULL)

Arguments

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.

Value

A SpatialExperiment object.

Examples

# 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


DavisLaboratory/standR documentation built on Sept. 8, 2024, 9:57 p.m.