Generate meta cells based on SEACells and return a MetaCells object
generate_seacells_sc.RdThis function implements the meta cell aggregation from Persad et al., and returns the resulting SEACells. Compared to other algorithms, a kernel archetype analysis is used to identify the metacells. For details, please refer to the publication.
Usage
generate_seacells_sc(
object,
seacell_params = params_sc_seacells(),
embd_to_use = "pca",
no_embd_to_use = NULL,
cells_to_use = NULL,
target_size = 1e+05,
seed = 42L,
.verbose = TRUE
)Arguments
- object
SingleCellsclass.- seacell_params
List. Output of
params_sc_seacells(). A list with the following items:n_sea_cells - Number of SEA cells to detect.
max_fw_iters - Maximum iterations for the Franke-Wolfe algorithm per matrix update.
convergence_epsilon - Convergence threshold. Algorithm stops when RSS change < epsilon * RSS(0).
max_iter - Maximum iterations to run SEACells for.
min_iter - Minimum iterations to run SEACells for.
greedy_threshold - Maximum number of cells before defaulting to rapid random selection of archetypes.
graph_building - Graph building method.
pruning - Boolean. Shall small values be pruned during the Franke- Wolfe iterations.
pruning_threshold - The threshold below which pruning shall be applied during Franke-Wolfe iterations.
knn - List of kNN parameters. See
params_knn_defaults()for available parameters and their defaults.
- embd_to_use
String. The embedding to use. Atm, the only option is
"pca". Only relevant if you set regenerate_knn toTRUE.- no_embd_to_use
Optional integer. Number of embedding dimensions to use. If
NULLall will be used. Only relevant if you set regenerate_knn toTRUE.- cells_to_use
Optional string. Names of the cells to use for the generation of the SEACells.
- target_size
Numeric. The library target size to normalise the meta cells to.
- seed
Integer. Seed for reproducibility.
- .verbose
Boolean. Controls verbosity of the function.
Value
A MetaCells() with the data generated by this meta cell
aggregation method.