removeSpatialAnnotations: Remove spatial annotations

removeSpatialAnnotationsR Documentation

Remove spatial annotations

Description

Removes spatial annotations from the SPATA2 object.

Usage

removeSpatialAnnotations(object, ids)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

ids

Character vector. The IDs of the spatial annotations to remove.

Value

The updated input object, containing the added, removed or computed results.

Examples

library(SPATA2)

data("example_data")

object <- example_data$object_UKF313T_diet

getSpatAnnIds(object)
plotSpatialAnnotations(object)

# get IDs tagged with both 'necrotic' and 'compr'
ids_rm <- getSpatAnnIds(object, tags = c("necrotic", "compr"), test = "all")

print(ids_rm)

object <- removeSpatialAnnotations(object, ids = ids_rm)

plotSpatialAnnotations(object)


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.