batch_sil | R Documentation |
Determine batch/bio effect using the silhouette coefficient (adopted from scone):
batch_sil(pca.data, batch, nPCs = 3)
pca.data |
a list as created by |
batch |
vector with the batch covariate (for each cell) |
nPCs |
the number of principal components to use (default: 3) |
The average silhouette width for all clusters. For batch effect, the smaller the better. For biological effect, the larger the better.
testdata <- create_testset_multibatch(n.genes=1000,
n.batch=3, plattform='any')
pca.data <- prcomp(testdata$data, center=TRUE)
batch.silhouette <- batch_sil(pca.data, testdata$batch)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.