This is used for quality control (QC), as the small bits are likely to be low quality technical artifacts and are not informative to spatial analyses. Please confirm the quality of those cells by checking the histology image with ImageJ or QuPath.
Usage
# S4 method for class 'matrix'
findDebrisCells(
x,
max_cells = 5,
distance_cutoff = 50,
BNPARAM = NULL,
BPPARAM = SerialParam()
)
# S4 method for class 'sfc'
findDebrisCells(
x,
max_cells = 5,
distance_cutoff = 50,
BNPARAM = NULL,
BPPARAM = SerialParam()
)
# S4 method for class 'sf'
findDebrisCells(
x,
max_cells = 5,
distance_cutoff = 50,
BNPARAM = NULL,
BPPARAM = SerialParam()
)
# S4 method for class 'SpatialExperiment'
findDebrisCells(
x,
max_cells = 5,
distance_cutoff = 50,
BNPARAM = NULL,
BPPARAM = SerialParam()
)Arguments
- x
Object with spatial coordinates of cells. Can be a
SpatialExperimentorSpatialFeatureExperimentobject, a matrix with 2 columns for x and y coordinates of cells, or asforsfcobject with cell geometries.- max_cells
Maximum number of cells for a clump of cells to be considered debris.
- distance_cutoff
Minimum distance of cell to the tissue for it to be considered debris, in the same unit as in
x.- BNPARAM
A
BiocNeighborParamobject specifying the algorithm to find k nearest neighbors and distance based neighbors withnn_method = "bioc". For distance based neighbors, onlyKmknnParamandVptreeParamare applicable.- BPPARAM
A
BiocParallelParamobject for multithreading. Only used for k nearest neighbor and distance based neighbor withnn_method = "bioc".