This function is designed to annotate a SpatialExperiment
object by appending a custom annotation
column to its colData
. This feature allows users to integrate additional metadata or experimental
results that can be useful for subsequent analyses or visualizations.
Usage
addCustomAnnotation(spatialExp, columnName, values)
Arguments
- spatialExp
A SpatialExperiment
object that will be extended with the new annotation.
- columnName
A character
string that names the new annotation column to be added.
- values
A numeric or character vector containing the annotation values to be assigned to each spot
Value
The function returns an updated SpatialExperiment
object that includes the newly added annotation
column within its colData
.