include_tissue_outline: Include spatial extent of tissue sections in analysis

View source: R/i.R

include_tissue_outlineR Documentation

Include spatial extent of tissue sections in analysis

Description

Ensures section specific processing of observations in relation by identifying the outline of the tissue section (or -sections in case of multiple tissue sections per sample). Additionally, allows to relate observations to the spatial position and extent of image annotations.

Usage

include_tissue_outline(
  input_df,
  outline_df = NULL,
  coords_df = NULL,
  spat_ann_center = NULL,
  sas_circles = FALSE,
  ccd = NULL,
  outside_rm = TRUE,
  inside_if = c(1, 2),
  opt = "concaveman",
  buffer = 0,
  ...
)

Arguments

input_df

A data.frame that contains at least numeric x and y variables.

outline_df

A data.frame that contains the ouline/hull of all tissue sections. Must contain variables x, y and section.

sas_circles

Logical value. If TRUE, input data.frame is assumed to contain polygon coordinates of the expanded spatial annotation encircling and sorts them after filtering for those that lie inside the tissue section in order to plot them via ggplot2::geom_path().

opt

Either 'concaveman'' or 'chull'. Defines with which function the tissue outline is computed.

buffer

Distance measure with which to buffer the tissue outline data.frame.

...

Used to absorb deprecated arguments or functions.

Value

Filtered input data.frame.


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