View source: R/format_colData_to_spe.R
format_colData_to_spe | R Documentation |
Format a data frame into a SpatialExperiment class where the count assay is empty every cell (columns), cell phenotypes are stored under colData() and cell coordinates are stored under spatialCoords().
format_colData_to_spe(df)
df |
Data frame that contains cell coordinates, phenotypes (if available) and other cell properties. The rownames should be cell ID |
An SpatialExperiment object
df <- data.frame(row.names = c("Cell_1", "Cell_2"), Cell.X.Position = c(2,5),
Cell.Y.Position = c(3.3, 8), Phenotypes = c("CD3", "CD3,CD8"))
spe <- format_colData_to_spe(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.