extract_proximity {IrisSpatialFeatures} | R Documentation

## Run a proximity analysis on all samples. There are two modes this function can be run. In the first mode it uses the major and minor axes for each cell as provided by inform. It then averages half of those two axes and adds an uncertainty margin, which are used to provide an estimate on whether two cells are touching. This mode can be used to approximate the interaction analysis. The second mode uses a user specified distance to count the cells within the proximity of a given cell-type. With increasing distances usually cells fall into the proximity of multiple cells of a given type so the function allows the restriction of only counting the cell only once.

### Description

Run a proximity analysis on all samples. There are two modes this function can be run. In the first mode it uses the major and minor axes for each cell as provided by inform. It then averages half of those two axes and adds an uncertainty margin, which are used to provide an estimate on whether two cells are touching. This mode can be used to approximate the interaction analysis. The second mode uses a user specified distance to count the cells within the proximity of a given cell-type. With increasing distances usually cells fall into the proximity of multiple cells of a given type so the function allows the restriction of only counting the cell only once.

### Usage

    extract_proximity(x, ...)

    ## S4 method for signature 'ImageSet'
    extract_proximity(x, radii = c("Entire.Cell.Major.Axis",
      "Entire.Cell.Minor.Axis"), uncertainty_margin = 1, only_closest = FALSE)

### Arguments

`x` | IrisSpatialFeatures ImageSet object
`...` | Additional arguments
`radii` | The size of the radius in pixels or the default, which are the inForm output columns that indicated the minor and major axis of each cell.
`uncertainty_margin` | Only for the approximation of the interaction analysis, where it indicates how many pixels further should be search to find a touching cell (deafult: 1).
`only_closest` | For the proximity analysis a target cell can be in the vincinity of multiple source cells, so the counts are articicially inflated. E.g. a CD8 PD1+ T-cell is within <50 pixels of 30 HRS cells, this cell should only be counted for the closes HRS cell. (default: FALSE)

### Value

The proximial events for each cell

### Examples

    #loading pre-read dataset
    dataset <- IrisSpatialFeatures_data
    extract_proximity(dataset)

[Package IrisSpatialFeatures version 1.3.0 Index]