View source: R/SilhouetteClustGroups.R
SilhouetteClustGroups | R Documentation |
MCbiclust is a stochastic method and needs to be run multiple times to
identify different biclusters. SilhouetteClustGroups()
examines
the correlation vectors calculated from different runs and uses the
technique of examining silhouette widths to identify the number of distinct
clusters (and hence biclusters) found.
SilhouetteClustGroups(cor.vec.mat, max.clusters, plots = FALSE, seed1 = 100,
rand.vec = TRUE)
cor.vec.mat |
Correlation matrix of the correlation vectors (CVs) |
max.clusters |
Maximum number of clusters to divide CVs into |
plots |
True or False for whether to show silhouette plots |
seed1 |
Value used to set random seed |
rand.vec |
True or False for whether to add random correlation vector used for comparison |
The distinct clusters of correlation vectors
data(CCLE_small)
data(Mitochondrial_genes)
mito.loc <- (row.names(CCLE_small) %in% Mitochondrial_genes)
CCLE.mito <- CCLE_small[mito.loc,]
CCLE.seed <- list()
CCLE.cor.vec <- list()
for(i in 1:5){
set.seed(i)
CCLE.seed[[i]] <- FindSeed(gem = CCLE.mito,
seed.size = 10,
iterations = 100,
messages = 100)}
for(i in 1:5){
CCLE.cor.vec[[i]] <- CVEval(gem.part = CCLE.mito,
gem.all = CCLE_small,
seed = CCLE.seed[[i]],
splits = 10)}
CCLE.cor.mat <- as.matrix(as.data.frame(CCLE.cor.vec))
CCLE.clust.groups <- SilhouetteClustGroups(cor.vec.mat = CCLE.cor.mat,
plots = TRUE,
max.clusters = 10)
av.corvec.fun <- function(x) rowMeans(CCLE.cor.mat[,x])
CCLE.average.corvec <- lapply(X = CCLE.clust.groups,
FUN = av.corvec.fun)
multi.sort.prep <- MultiSampleSortPrep(gem = CCLE_small,
av.corvec = CCLE.average.corvec,
top.genes.num = 750,
groups =CCLE.clust.groups,
initial.seeds = CCLE.seed)
multi.sort <- list()
for(i in seq_len(length(CCLE.clust.groups))){
multi.sort[[i]] <- SampleSort(multi.sort.prep[[1]][[i]],
seed = multi.sort.prep[[2]][[i]],
sort.length = 11)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.