
Add a Representation to a SpatialMap or Region object
addRepresentation.Rd
A user interface to create and add a Representation to a SpatialMap or Region object.
If passing a SpatialMap object, expects named lists for feature.loadings
, model
, and misc
(names should correspond to either the region names or a formal Analysis id).
Usage
addRepresentation(
object,
name,
embeddings,
col.names = NULL,
feature.loadings = NULL,
model = NULL,
misc = NULL,
...,
analyze = NULL
)
Arguments
- object
A SpatialMap or Region object
- name
The name of the representation. Must be unique in the SM
- embeddings
The cell embeddings for the representation. Rownames should match the cells in
analysis
- col.names
The names of the embedding vectors. Will be automatically generated from the name if
NULL
.- feature.loadings
If features are involved, what are the feature loadings? For example, in PCA. If passing a matrix, expects the number of rows (and their names) to match those for features.
- model
The model associated with the representation
- misc
Miscellaneous information
- ...
Parameters passed to
lapply
, namely toFUN
- analyze
What to analyze (and how). The options are "regions", NULL (activeAnalysis), the name of a currently existing formal analysis, or the name of a column in
object
'sprojectMetadata
(an "informal" analysis).