Description Usage Arguments Value Examples
Determine batch/bio effect using the silhouette coefficient (adopted from scone):
1 | silhouette_width(reduction, meta.data, keys)
|
reduction |
a matrix of reduced dimensions |
meta.data |
dataframe with meta.data associated with reduction |
keys |
columns in meta.data to calculate silhoette for to use (default: all) |
The average silhouette width for all clusters. For batch effect, the smaller the better. For biological effect, the larger the better.
1 2 3 4 5 6 7 8 | ## calculate the the silhoeuette width score on two sets of labels
## NOTE: this requires computation of a distance matrix, so does not
## scale well to large datasets
data(sceiad_subset_data)
features <- sceiad_subset_data[, paste0('scviDim_', 1:8)]
metadata <- sceiad_subset_data[,c('Barcode', 'cluster',
'subcluster', 'CellType', 'CellType_predict')]
silhouette_width(features, metadata, 'CellType_predict')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.