Maps observations in a data frame to their respective tissue sections based on the results of identifyTissueOutline().

map_to_tissue_section(object, coords_df, cvars = c("x", "y"))

Arguments

object

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

coords_df

A data frame containing coordinates to be mapped. Must contain columns specified in cvars and a column named variables.

cvars

A character vector of length 2 specifying the column names for x and y coordinates in coords_df. Default is c("x", "y").

Value

A data frame with the input coordinates and an additional column tissue_section indicating the mapped tissue section.