nonHierarchicalClustering: Convert a non-hierarchical clustering into hierarchical...

nonHierarchicalClusteringR Documentation

Convert a non-hierarchical clustering into hierarchical tree-structure

Description

coming soon.

Usage

nonHierarchicalClustering(clustering, data = NULL, k = NULL, nRepeats = 1, ...)

Arguments

clustering

A vector assigning genes or samples to clusters, or a function

data

The data to be clustered if clustering is a function.

k

The number of clusters to be generated

nRepeats

The number of runs to be averaged.

...

Additional parameters to be passed to clustering

Details

coming soon.

Value

a dist object.

Note

coming soon.

Author(s)

Johannes Freudenberg

References

coming soon.

See Also

funcClustAnnot

Examples

data(gimmOut)
require(CLEAN.Rn)
d <- nonHierarchicalClustering(function(m, k, ...) kmeans(m, k, ...)$cluster,
    gimmOut$clustData[,-(1:2)], k = 2:4, nstart = 10)
trt <- sapply(colnames(gimmOut$clustData)[-(1:2)], function(str) strsplit(str, split = "_")[[1]][1])
#not run
#generateTreeViewFiles(gimmOut, rclust = d, cclust = NA, verbose = FALSE, functionalCategories=c("geneRIFs",
#	"CpGislands", "GO", "KEGG"), species = "Rn", callTreeView = TRUE, sampleDesc = trt)
generateTreeViewFiles(gimmOut, rclust = d, cclust = NA, verbose = FALSE, functionalCategories=c("geneRIFs",
	"CpGislands", "GO", "KEGG"), species = "Rn", callTreeView = FALSE, sampleDesc = trt, maxNumOfClusters=2)

# all possible cluster numbers (k)
d <- nonHierarchicalClustering(function(m, k, ...) kmeans(m, k, ...)$cluster, 
	gimmOut$clustData[,-(1:2)], nstart = 10)
# k = 4
d <- nonHierarchicalClustering(function(m, k, ...) kmeans(m, k, ...)$cluster, 
	gimmOut$clustData[,-(1:2)], 4, nstart = 10)
#sample clustering
d2 <- nonHierarchicalClustering(function(m, k, ...) kmeans(m, k, ...)$cluster, t(gimmOut$clustData[,-(1:2)]), 9, nstart = 10) #sample clustering

##not run
#generateTreeViewFiles(gimmOut$clustData, d, d2, callTreeView=TRUE, species = "Rn")
generateTreeViewFiles(gimmOut$clustData, d, d2, callTreeView=FALSE, species = "Rn")

uc-bd2k/CLEAN documentation built on Sept. 22, 2022, 4:12 a.m.