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 [2013/10/09 13:30] – mkatari | mkatari-bioinformatics-august-2013-clustering [2014/12/11 14:16] – mkatari | ||
---|---|---|---|
Line 2: | Line 2: | ||
- | Clustering rna-seq data, continuation from [[mkatari-bioinformatics-august-2013-deseq|DESeq]] | + | ====== |
+ | continuation from [[mkatari-bioinformatics-august-2013-deseq|DESeq]] | ||
Get the significant genes | Get the significant genes | ||
Line 35: | Line 36: | ||
< | < | ||
sigGenes.hclust.k2< | sigGenes.hclust.k2< | ||
+ | </ | ||
+ | |||
+ | Now to get all the genes that are in cluster 2 simply type. | ||
+ | |||
+ | < | ||
+ | hclust.k2.cluster2=names(which(sigGenes.hclust.k2==2)) | ||
+ | </ | ||
+ | |||
+ | Now we can create a new matrix/data frame with just these genes. This new matrix can be used to plot a heatmap to make it easier to see a expression profile of the cluster (see below). | ||
+ | |||
+ | < | ||
+ | hclust.k2.cluster2.normalized = sigGenes.normalized[hclust.k2.cluster2, | ||
</ | </ | ||
Line 53: | Line 66: | ||
</ | </ | ||
- | Heatmap | + | ====== K-means ====== |
+ | |||
+ | |||
+ | ====== | ||
< | < | ||
Line 71: | Line 88: | ||
</ | </ | ||
- | Create heatmap. We can save it to a pdf file | + | Create heatmap. We can save it to a pdf file. Note that sigGenes.normalized is just a matrix. Here we can provide any matrix of values, for example hclust.k2.cluster2.normalized which is the expression values of genes in cluster 2 (see above) |
< | < | ||
Line 91: | Line 108: | ||
dev.off() | dev.off() | ||
</ | </ | ||
- |
mkatari-bioinformatics-august-2013-clustering.txt · Last modified: 2015/06/17 13:26 by mkatari