| resTuner | R Documentation |
Existing functions for graph-based clustering allow users to obtain a larger or smaller number of clusters by varying parameters, in particular the resolution parameter. This function allows users to directly control the number of clusters by iteratively updating the resolution parameter such that a certain number of clusters are generated. The cluster_number parameter can be an exact number of clusters or a range. Clustering can be repeated to obtain variant clusterings with the desired number of clusters.
resTuner( input_data, cluster_number, cluster_repeats = 5, seed_resolution = 0.005, max_iter = 10, cluster_function = Dufy::seurat_cluster_wrapper, label_prefix = "seurat_", ... )
input_data |
A matrix where features correspond to rows and cells correspond to columns. |
cluster_number |
Either a positive integer specifying the exact number of clusters desired or a vector of length two specifying range. |
cluster_repeats |
The number of rounds of clusterings to perform. Default: 5. |
seed_resolution |
The initial value of resolution. |
max_iter |
The maximum number of iterations per clustering. Default: 10. |
cluster_function |
A resTuner-compatible function that performs nearest-neighbor graph generation and graph-based clustering. Must contain these three named arguments: input_data, resolution, and k. Must return a vector of length |
label_prefix |
A character string to be prepended to the colnames of the returned matrix. |
... |
Additional arguments passed to cluster_function |
A ncol(input_data) by cluster_repeats matrix containing cluster assignments.
Kevin Brulois
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.