Aggregate Deconvolution Results
aggregate_results.Rd
Aggregates deconvolution results by merging result columns in the spatial object. This function now supports aggregating multiple cell types by passing a list of cell types. The older method of specifying two separate cell types is deprecated but still supported for backward compatibility.
Usage
aggregate_results(
spatial_obj = NULL,
cell_types = NULL,
cell_type_1 = NULL,
cell_type_2 = NULL,
name = NULL,
remove = FALSE
)
Arguments
- spatial_obj
SpatialExperiment containing deconvolution results.
- cell_types
A list of cell types to aggregate. This is the preferred method for specifying cell types to aggregate. If this parameter is used, 'cell_type_1' and 'cell_type_2' are ignored.
- cell_type_1
(Deprecated) The first cell type to aggregate, included for backward compatibility. Use 'cell_types' for new code.
- cell_type_2
(Deprecated) The second cell type to aggregate, included for backward compatibility. Use 'cell_types' for new code.
- name
Optional new name for the aggregated result. If not provided, a name is generated automatically by concatenating the cell type names.
- remove
Logical, specifies whether to remove the provided cell types from the spatial object after aggregation.