View source: R/format_codex_to_spe.R
format_codex_to_spe | R Documentation |
Reads in spatial data in the form of cell coordinates, cell phenotypes (if available), and marker intensities and transforms to a 'SpatialExperiment' object. The assay stores the intensity level of every marker (rows) for every cell (columns). Cell phenotype is stored under colData. Cell x and y coordinates are stored under 'spatialCoords()' field.
format_codex_to_spe(path = NULL, markers, path_to_codex_cell_phenotypes = NULL)
path |
String of the path location of CODEX csv file. |
markers |
String Vector containing the markers used for staining. |
path_to_codex_cell_phenotypes |
String of the path to the Cluster ID/Cell type file. |
A SpatialExperiment object is returned
path <- system.file("extdata", "tiny_codex.csv.gz", package = "SPIAT")
path_to_codex_cell_phenotypes <- system.file("extdata",
"tiny_codex_phenotypes.txt.gz", package = "SPIAT")
markers <- c("CD45", "Ly6C", "CD27", "CD5", "CD79b")
formatted_codex <- format_codex_to_spe(path = path, markers = markers,
path_to_codex_cell_phenotypes = path_to_codex_cell_phenotypes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.