Integration of single cell deconvolution and SPATA2s image annotations.

inferSingleCellGradient(
  object,
  sc_input,
  id,
  calculate = "density",
  distance = NA_integer_,
  n_bins_circle = NA_integer_,
  binwidth = getCCD(object),
  angle_span = c(0, 360),
  n_bins_angle = 1,
  remove_circle_bins = "Outside",
  normalize = TRUE,
  area_unit = NULL,
  format = "wide",
  as_models = FALSE
)

Arguments

object

An object of class spata2.

sc_input

Data.frame that contains the results from single cell deconvolution. Must have at least three columns:

  • x : numeric. Position of cell on the x axis in pixel.,

  • y : numeric. Position of cell on the y axis in pixel.,

  • cell_type : factor Cell type of the cell.

id

Character value. The ID of the image annotation of interest.

distance

Distance value. Specifies the distance from the border of the image annotation to the horizon in the periphery up to which the screening is conducted. (See details for more.) - See details of ?is_dist for more information about distance values.

n_bins_circle

Numeric value or vector of length 2. Specifies how many times the area is buffered with the value denoted in binwidth. (See details for more.)

binwidth

Distance value. The width of the circular bins to which the barcode-spots are assigned. We recommend to set it equal to the center-center distance: binwidth = getCCD(object). (See details for more.) - See details of ?is_dist for more information about distance values.

angle_span

Numeric vector of length 2. Confines the area screened by an angle span relative to the center of the image annotation. (See details fore more.)

n_bins_angle

Numeric value. Number of bins that are created by angle. (See details for more.)

normalize

Logical. If set to TRUE values will be scaled to 0-1.

Hint: Variables that are uniformly expressed can not be scaled and are discarded.

as_models

Adjusts the output to a list that is a valid input for models_add-argument of imageAnnotationScreening().

Value

Data.frame as is returned by getIasDf() with cell types as variables.