View source: R/calculate_silhouette_width.R
calculate_silhouette_width | R Documentation |
This function performs replicated calculations on downsampled data.
calculate_silhouette_width(
merged_sce,
pc_names,
batch_column = "library_id",
frac_cells = 0.8,
nreps = 20,
seed = NULL
)
merged_sce |
The merged SCE object containing data from multiple batches |
pc_names |
A list of names that allow access to the PCs in the merged SCE object. Example: c("PCA", "fastMNN_PCA"). |
batch_column |
The variable in 'merged_sce' indicating the grouping of interest. Generally this is either batches or cell types. Default is "library_id". |
frac_cells |
The fraction of cells to downsample to. Default: 0.8 |
nreps |
The number of times to repeat sub-sampling procedure. Default: 20 |
seed |
Seed for initializing random sampling |
Tibble with five columns: 'rep', representing the given downsampling replicate; 'silhouette_width', the calculated silhouette width for the given 'rep'; 'silhouette_cluster', the assigned cluster for the cell during silhouette calculation, i.e. the true identity; 'other_cluster', the other assigned for the cell during silhouette calculation; 'pc_name', the name associated with the pc results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.