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 11:58] – mkatari | mkatari-bioinformatics-august-2013-clustering [2015/06/17 12:32] – mkatari | ||
---|---|---|---|
Line 4: | Line 4: | ||
====== Clustering rna-seq data ====== | ====== Clustering rna-seq data ====== | ||
continuation from [[mkatari-bioinformatics-august-2013-deseq|DESeq]] | continuation from [[mkatari-bioinformatics-august-2013-deseq|DESeq]] | ||
+ | |||
+ | [[https:// | ||
+ | [[https:// | ||
Get the significant genes | Get the significant genes | ||
Line 90: | Line 93: | ||
< | < | ||
- | SigGenes.kmeans.2 = kmeans(t(scaledSigGenes), 2) | + | SigGenes.kmeans.2 = kmeans(scaledSigGenes, |
</ | </ | ||
Line 107: | Line 110: | ||
| | ||
for (i in 2:20) { | for (i in 2:20) { | ||
- | | + | |
- | | + | #alternate way of looking at proportion of ss that is provided by between groups. |
- | + | #kmeans_ss[i] = kmeans_tmp$betweenss/ | |
+ | |||
+ | # | ||
+ | | ||
+ | | ||
+ | |||
} | } | ||
return(kmeans_ss) | return(kmeans_ss) | ||
Line 125: | Line 134: | ||
+ | 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