mkatari-bioinformatics-august-2013-clustering
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
mkatari-bioinformatics-august-2013-clustering [2014/12/15 12:01] – mkatari | mkatari-bioinformatics-august-2013-clustering [2014/12/15 12:45] – mkatari | ||
---|---|---|---|
Line 35: | Line 35: | ||
< | < | ||
- | sigGenes.hclust.k2< | + | sigGenes.hclust.k2< |
</ | </ | ||
Line 90: | Line 90: | ||
< | < | ||
- | SigGenes.kmeans.2 = kmeans(t(scaledSigGenes), | + | SigGenes.kmeans.2 = kmeans(t(scaledSigGenes), |
</ | </ | ||
Line 107: | Line 107: | ||
| | ||
for (i in 2:20) { | for (i in 2:20) { | ||
- | | + | |
| | ||
| | ||
Line 125: | Line 125: | ||
+ | </ | ||
+ | |||
+ | The code below plots k-means clustering results. You simply have to provide the k-means output and the labels. | ||
+ | |||
+ | < | ||
+ | plotClusterCenters< | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | mycolors=c(" | ||
+ | centersdim = dim(kmeansres$centers) | ||
+ | plot(kmeansres$centers[1, | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | axis(1, at=c(1: | ||
+ | | ||
+ | for (i in 2: | ||
+ | lines(kmeansres$centers[i, | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | |||
+ | |||
+ | plotClusterCenters(SigGenes.kmeans.2) | ||
</ | </ | ||
mkatari-bioinformatics-august-2013-clustering.txt · Last modified: 2015/06/17 13:26 by mkatari