Run downsampling or geometric sketching to reduce number of cells for interaction calculation. See Hie et al. 2019 Cell Systems for details.

Sketching(
  object,
  cell_id = NULL,
  downsampling = TRUE,
  size = 2000,
  geom_pca_dims = 10,
  scale = TRUE,
  seed = 1,
  which_python = Sys.which(names = "python3")
)

Arguments

object

Matchmaker object.

cell_id

Cell IDs used to subset the data. Default is NULL. If provided the downsampling will be skipped.

downsampling

Perform downsampling based on the idents probability rather than geometric sketching. Default is TRUE.

size

Number of cells to return. Default is 2000. Please note that if downsampling is performed the actual size may vary due to rounding effect.

geom_pca_dims

Number of PCA dimensions to use. Default is 10.

scale

Whether to scale the data. Default is TRUE.

seed

Random seed number for sampling. Default is 1.

which_python

Path to python3 used.

Value

Returns a Matchmaker object.

Examples

if (FALSE) {
object <- Sketching(object, size = 2000)
}