Estimate cell-type proportions from a bulk-like expression matrix stored in a
SummarizedExperiment object, using a Seurat reference.
Usage
RunDeconvolution(object, ...)
# S3 method for class 'SummarizedExperiment'
RunDeconvolution(
object,
reference,
method = c("MuSiC", "BisqueRNA", "BayesPrism"),
group.by,
sample.by = NULL,
cellstate.by = NULL,
bulk_assay = "counts",
ref_assay = NULL,
ref_layer = "counts",
backend = c("cpp", "r"),
verbose = TRUE,
...
)Arguments
- object
A
SummarizedExperimentobject containing bulk-like counts.- ...
Additional parameters forwarded to the internal deconvolution backend.
- reference
A
Seuratreference object used to build cell-type profiles.- method
Deconvolution method. One of
"MuSiC","BisqueRNA", or"BayesPrism".- group.by
Metadata column in
referencedefining reference cell types.- sample.by
Metadata column in
referencedefining biological sample / donor IDs. Used by therbackends ofMuSiCandBisqueRNA. IfNULL, SCOP will try to infer a suitable column automatically.- cellstate.by
Metadata column in
referencedefining cell states for therbackend ofBayesPrism. IfNULL,group.byis reused.- bulk_assay
Assay name in
objectused as the bulk counts matrix.- ref_assay
Assay name in
referenceused for the reference profiles.- ref_layer
Layer name in
referenceused for reference counts.- backend
Deconvolution engine backend.
"r"uses the original method package implementation."cpp"is reserved for native SCOP implementations when available.- verbose
Whether to print the message. Default is
TRUE.
Value
A SummarizedExperiment object with results stored in
S4Vectors::metadata(object)[["Deconvolution"]].
Examples
data(islet_bulk)
data(panc8_sub)
islet_bulk <- RunDeconvolution(
islet_bulk,
reference = panc8_sub,
method = "MuSiC",
group.by = "celltype"
)
DeconvolutionPlot(islet_bulk, plot_type = "bar")
#> Error in DeconvolutionPlot(islet_bulk, plot_type = "bar"): No deconvolution result is available for plotting.
ht <- DeconvolutionPlot(
islet_bulk,
plot_type = "heatmap",
sample_annotation = "condition",
sample_split = "condition"
)
#> Error in DeconvolutionPlot(islet_bulk, plot_type = "heatmap", sample_annotation = "condition", sample_split = "condition"): No deconvolution result is available for plotting.
ComplexHeatmap::draw(ht)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'draw': object 'ht' not found
DeconvolutionPlot(islet_bulk, plot_type = "box")
#> Error in DeconvolutionPlot(islet_bulk, plot_type = "box"): No deconvolution result is available for plotting.