Generic function that runs the Tessera algorithm on single-cell spatial data
Source:R/utils_ui.R
GetTiles.RdGetTiles is a generic function that runs the main Tessera algorithm.
If working with a Seurat object, please refer to the documentation of
the appropriate generic API: GetTiles.Seurat(). If users work with other
forms of the input, they can pass them directly to Tessera using the
GetTiles.default() API. The function arguments listed here are common in all
GetTiles interfaces.
Arguments
- ...
Arguments passed on to
GetTiles.defaultmeta_vars_includeNames of columns in meta_data to include in
dmt$pts.group.byName of column in
meta_datathat provides the group IDs. Tessera tiles are constructed separately for each group (which could be separate experimental samples or FOVs).npcsNumber of PCs to compute for input to segmentation. Ignored if
embeddingsare provided directly.smooth_embNumber of smoothing iterations to perform on the cell embeddings prior to gradient computation. If a vector, then embeddings after each specified iteration are concatenated. If
0is included, then the original embeddings are also included.prune_thresh_quantileFloating point value between 0 and 1, inclusive. Quantile of edge length above which edges are pruned. Defaults to 0.95.
prune_min_cellsMinimum number of cells required for a connected component of triangles to be kept. Defaults to 10.
prune_threshEdge length above which edges are pruned. If equal to NA, then this value is ignored and
thresh_quantileis used to compute the threshold. Otherwise, ifthreshis set, thenthresh_quantileis ignored. Defaults to NA.smooth_distanceOne of
c('none', 'euclidean', 'projected', 'constant'). If eithersmooth_distanceorsmooth_similarityis'none', then no smoothing of the gradient field is conducted. Defaults to'projected'.smooth_similarityOne of
c('none', 'euclidean', 'projected', 'constant'). If eithersmooth_distanceorsmooth_similarityis'none', then no smoothing of the gradient field is conducted. Defaults to'projected'.smooth_iterNumber of rounds of gradient smoothing.
max_nptsMaximum number of cells allowed in each tile during the agglomerative clustering phase.
min_nptsMinimum number of cells allowed in each tile during the agglomerative clustering phase.
alphaParameter for scoring transcriptional similarity between adjacent tiles during the agglomerative clustering phase. For
alpha, 0.2 = conservative merging, 2 = liberal merging.future.globals.maxSizeMaximum allowed size (in bytes) of global variables that are exported to each parallel worker. Increase this value if you get an error about global object size. Default is 8*1024^3 (8 GB).
consolidateWhether to consolidate results from multiple groups into a single collection of points and tiles (TRUE) or to return a list of separate results for each group (FALSE).
verboseWhether to print progress messages for each stage of the segmentation pipeline.
Value
If used with a Seurat object, it will return a pair of Seurat objects:
the input single-cell object updated with tile assignments for each cell, and
a Seurat object where each item represents an individual Tessera tile.
For standalone operation, it returns Lists with the output of Tessera segmentation
(see GetTiles.default()).
See also
Other GetTiles:
GetTiles.Seurat(),
GetTiles.default()