Gives access to an interactive user interface where data points can be interactively annotated.

createSpatialSegmentation(
  object,
  height = 500,
  break_add = NULL,
  box_widths = c(4, 4, 4)
)

Arguments

object

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

Details

Segmentation variables are grouping variables that are stored in the meta data.frame of the SPATA2 object (such as clustering variables). They differ from clustering variables in so far as that they are not the result of unsupervised cluster algorithms but from group assignment the researcher conducts him/herself (e.g. histological classification).

Therefore, all segmentation variables can be extracted via getFeatureNames() as they are part of those. To specifically extract variables that were created with createSpatialSegmentation() use getSegmentationNames(). To remove annotations you no longer need use removeFeatures().

Note

The interface allows to zoom in on the sample. This is useful if your SPATA2 object contains an HE-image as background and you want to classify barcode spots based on the histology. As these images are displayed by pixels the resolution decreases the more you zoom in. Many experiments (such as the Visium output) contain high resolution images. You can use the function registerImage() to register images of higher resolution for a better histological classification.

Examples


library(SPATA2)
library(tidyverse)

data("example_data")

object <- example_data$object_UKF275T_diet

if(FALSE){

 object <- createSpatialSegmentation(object)

 }