runCollapseCellTypes | R Documentation |
Runs collapseCellTypes from an S4 object
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.
runCollapseCellTypes(object, ...)
## S4 method for signature 'NanoStringGeoMxSet'
runCollapseCellTypes(object, matching = NULL)
object |
An S4 object such as a GeoMxSet object |
... |
Arguments passed to collapseCellTypes |
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
library(GeomxTools)
datadir <- system.file("extdata", "DSP_NGS_Example_Data", package = "GeomxTools")
demoData <- readRDS(file.path(datadir, "/demoData.rds"))
demoData <- shiftCountsOne(demoData)
target_demoData <- aggregateCounts(demoData)
target_demoData <- normalize(target_demoData, "quant")
# run basic decon:
res0 <- runspatialdecon(object = target_demoData,
norm_elt = "exprs_norm",
raw_elt = "exprs")
# run reverse decon:
target_demoData <- runReverseDecon(object = target_demoData,
norm_elt = "exprs_norm",
beta = pData(res0)$beta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.