R/AllClasses.R, R/SpatialCellExperiment.R
SpatialCellExperiment.RdThe SingleCellExperiment class
SpatialCellExperiment(..., spatialDim = NULL)
| ... | Arguments passed to the SingleCellExperiment::SingleCellExperiment constructor to fill the slots of the base class. |
|---|---|
| spatialDim | A matrix of spatial coordinates. |
ncells <- 100 u <- matrix(rpois(20000, 5), ncol=ncells) v <- log2(u + 1) coordinates <- matrix(runif(ncells*3), ncells) colnames(coordinates) <- c("x", "y", "z") sce <- SpatialCellExperiment(assays=list(counts=u, logcounts=v), spatialDim=coordinates) sce#> class: SpatialCellExperiment #> dim: 200 100 #> metadata(0): #> assays(2): counts logcounts #> rownames: NULL #> rowData names(0): #> colnames: NULL #> colData names(0): #> reducedDimNames(0): #> spikeNames(0): #> altExpNames(0): #> spatialDim(3): x y z