View source: R/calculate_silhouette_width.R
silhouette_width_from_pcs | R Documentation |
Calculate silhouette width scores using PCs from a merged SCE object for use in integration metric calculations
silhouette_width_from_pcs(
merged_sce,
pc_name,
batch_column = "library_id",
frac_cells = 0.8,
nreps = 20,
seed = NULL
)
merged_sce |
The merged SCE object containing data from multiple batches |
pc_name |
The name used to access the PCA results stored in the SingleCellExperiment object |
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. Default is NULL. |
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.