getPairwise: Get statistic from pairwise L curve of a single image.

View source: R/spicy.R

getPairwiseR Documentation

Get statistic from pairwise L curve of a single image.

Description

Get statistic from pairwise L curve of a single image.

Usage

getPairwise(
  cells,
  from = NULL,
  to = NULL,
  dist = NULL,
  window = "convex",
  window.length = NULL,
  Rs = c(20, 50, 100),
  sigma = NULL,
  minLambda = 0.05,
  fast = TRUE,
  edgeCorrect = TRUE,
  includeZeroCells = TRUE,
  BPPARAM = BiocParallel::SerialParam(),
  imageID = "imageID",
  cellType = "cellType",
  spatialCoords = c("x", "y")
)

Arguments

cells

A SegmentedCells or data frame that contains at least the variables x and y, giving the location coordinates of each cell, and cellType.

from

The 'from' cellType for generating the L curve.

to

The 'to' cellType for generating the L curve.

dist

The distance at which the statistic is obtained.

window

Should the window around the regions be 'square', 'convex' or 'concave'.

window.length

A tuning parameter for controlling the level of concavity when estimating concave windows.

Rs

A vector of the radii that the measures of association should be calculated.

sigma

A numeric variable used for scaling when fitting inhomogeneous L-curves.

minLambda

Minimum value for density for scaling when fitting inhomogeneous L-curves.

fast

A logical describing whether to use a fast approximation of the inhomogeneous L-curves.

edgeCorrect

A logical indicating whether to perform edge correction.

includeZeroCells

A logical indicating whether to include cells with zero counts in the pairwise association calculation.

BPPARAM

A BiocParallelParam object.

imageID

The imageID if using a SingleCellExperiment or SpatialExperiment.

cellType

The cellType if using a SingleCellExperiment or SpatialExperiment.

spatialCoords

The spatialCoords if using a SingleCellExperiment or SpatialExperiment.

Value

Statistic from pairwise L curve of a single image.

Examples

data("diabetesData")
pairAssoc <- getPairwise(diabetesData[1,])

ellispatrick/spicyR documentation built on Nov. 22, 2022, 10:45 p.m.