Creates a data.frame that maps the tags of image annotations to the barcodes that were covered by the spatial extent of the respective image annotation.

mapImageAnnotationTags(
  object,
  ids = NULL,
  tags = NULL,
  merge = TRUE,
  merge_name = "img_annotations",
  merge_missing = "none",
  merge_sep = "_",
  merge_drop = FALSE
)

Arguments

object

An object of class spata2.

ids

Character vector or NULL. If character, specifies the IDs of the image annotations of interest. If numeric, the image annotations are picked by number. If NULL, all image annotations are included - subsequent selection with tags and test is possible.

tags

Character vector or NULL. If character, the tags for the image annotation selection. See section Selection of image annotation with tags for more information.

merge

Logical value. If TRUE, the results are merged in a single variable.

merge_name

Character value. The name of the merged variable.

merge_missing

Character value. The value that is assigned to barcodes that do not fall in the extent of any image annotation.

merge_sep

Character value. The string with which the image annotation tags are separated with while being merged.

merge_drop

Logical value. If TRUE and merge is TRUE, all image-annotation- tag-variables are dropped.

Value

A data.frame.