bin_by_angle: Bin barcode-spots by angle

View source: R/b.R

bin_by_angleR Documentation

Bin barcode-spots by angle

Description

Bins barcode-spots according to their angle towards the position specified with argument center.

Usage

bin_by_angle(
  coords_df,
  center,
  n_bins_angle = 1,
  angle_span = c(0, 360),
  min_bins_circle = NULL,
  rename = FALSE,
  remove = FALSE,
  drop = TRUE,
  var_to_bin = "barcodes",
  verbose = verbose
)

Arguments

coords_df

The coordinates data.frame whose barcode-spots are supposed to be binned.

center

Numeric vector of length two that is named. Value named x provides position on the x-axis. Value named y provides position on the y-axis.

min_bins_circle

Numeric value or NULL. Indiates the minimum number of circle bins the angle bin groups must have in order not to be renamed or removed. Ignored if NULL.

rename

Logical value. If TRUE, barcode-spots that fall into angle bins that feature less circle bins than input for argument min_bins_circle are renamed to 'Outside'. Ignored if min_bins_circle is NULL. Set remove to FALSE in order not to remove the renamed barcode-spots.

remove

Logical value. If TRUE, barcode-spots that fall into angle bins that do feature less circle bins than input for argument min_bins_circle are removed. Ignored if min_bins_circle is NULL.

drop

Logical value. If TRUE, unused levels of the bins_circle variables are dropped.


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