setTissueOutline: Set tissue outline

View source: R/setA-Z.R

setTissueOutlineR Documentation

Set tissue outline

Description

Sets tissue outline by calling identifyTissueSections() and identifyTissueOutline().

Usage

setTissueOutline(object, verbose = NULL)

Arguments

object

An object of class spata2.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

Value

spata2 object with additional variables in coordinates data.frame.

  • section : character. The identified tissue section. 0 means probable artefact spot.

  • outline :logical. TRUE if identified as a spot that lies on the edge of the tissue.

Examples


 library(ggplot2)
 library(ggExtra)

 object <- downloadPubExample("MCI_LMU")

 print(getTissueOutlineDf(object))

 to_df <- getTissueOutlineDf(object, remove = FALSE)

 to_df[["outline"]] <- as.character(to_df[["outline"]])

 ggplot(to_df, mapping = aes(x = x, y = y)) +
   geom_point_fixed(mapping = aes(color = section, alpha = outline), size = getDefault(object, "pt_size")) +
   scale_alpha_manual(values = c("TRUE" = 1, "FALSE" = 0.4))




kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.