get_silhouette: Returns an object 'sil' of class 'silhouette' (from package...

View source: R/summary.R

get_silhouetteR Documentation

Returns an object 'sil' of class 'silhouette' (from package cluster), which is an n x 3 matrix. For each obs i, the first col is its cluster identity, second col is closest neighbor, and third col is silhouette score (-1,1) where -1: clusters assigned wrong way, 0: clusters indifferent, 1: clusters well apart Requires PCA matrix embedding to have been calculated on the input object

Description

Returns an object 'sil' of class 'silhouette' (from package cluster), which is an n x 3 matrix. For each obs i, the first col is its cluster identity, second col is closest neighbor, and third col is silhouette score (-1,1) where -1: clusters assigned wrong way, 0: clusters indifferent, 1: clusters well apart Requires PCA matrix embedding to have been calculated on the input object

Usage

get_silhouette(
  input,
  pcs = 10,
  distmetric = "euclidean",
  anno = "seurat_clusters"
)

Arguments

input

Seurat Object or ExpressionSet, where PCA matrix has been calculated and assigned to PCA slot

pcs

Number of principal components to use

distmetric

Distance metric "euclidean", "manhattan"

anno

column name in meta.data or pData column name that refers to the cluster annotations

Examples

get_silhouette(pfizer, anno = 'cluster_ID')


Artur-man/VDJChef documentation built on Oct. 2, 2022, 9 p.m.