View source: R/collapseCellTypes.R
collapseCellTypes | R Documentation |
Given the input of an SpatialDecon result output and a list of which cell types to combine, returns a reshaped deconvolution result object with the specified cell types merged.
collapseCellTypes(fit, matching)
fit |
The object (a list) returned by the SpatialDecon algorithm |
matching |
A list object holding the mapping from beta's cell names to official cell names. See str(safeTME.matches) for an example. |
A reshaped deconvolution result object
data(mini_geomx_dataset)
data(safeTME)
data(safeTME.matches)
# estimate background:
mini_geomx_dataset$bg <- derive_GeoMx_background(
norm = mini_geomx_dataset$normalized,
probepool = rep(1, nrow(mini_geomx_dataset$normalized)),
negnames = "NegProbe"
)
# run basic decon:
res0 <- spatialdecon(
norm = mini_geomx_dataset$normalized,
bg = mini_geomx_dataset$bg,
X = safeTME
)
res1 <- collapseCellTypes(
fit = res0,
matching = safeTME.matches
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.