Description Usage Arguments Value Author(s) Examples
The SpatialExperiment class is designed to represent 10x Visium spatial Gene Expression data. It inherits from the SingleCellExperiment class and is used in the same manner. In addition, the class supports the integration with 10x Visium spatial coordinates and its scale factors.
1 |
... |
arguments to be passed to the |
spatialCoords |
the spatial coordinates |
none
Dario Righelli
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## building random seqFISH data coordinates
fishCoordinates <- data.frame(Cell_ID=paste0("cell",c(1:30)),
Irrelevant=100,
x=sample(c(-4000:4000), size=30, replace=TRUE),
y=sample(c(-4000:4000), size=30, replace=TRUE))
## building random seqFISH cell labels
fishCellLabels <- data.frame(Cell_ID=paste0("cell",c(1:30)),
class="neuron",
classID=sample(c(0:5), size=30, replace=TRUE))
## building random seqFISH count matrix
fishCounts <- matrix(sample(0:100, size=(30*30), replace=TRUE),
nrow=30, ncol=30,
dimnames=list(paste0("gene",c(1:30)),
paste0("cell",c(1:30))))
## creating SpatialExperiment object
se <- SpatialExperiment(rowData=rownames(fishCounts),
colData=fishCellLabels,
assays=SimpleList(counts=as.matrix(fishCounts)),
spatialCoords=fishCoordinates)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.