Unsupervised analysis problems
2
0
Entering edit mode
@jarod_v6liberoit-6654
Last seen 5.1 years ago
Italy

I want to do unsupervised analysis on rnaseq data. I use this code:

topVarGenes <- order(-rowVars(assay(rld)))[0:1000]

mat <- assay(rld)[ topVarGenes, ]
mat<- mat - rowMeans(mat)
colnames(mat) <- paste0(metadata$CONDITION,"-",metadata$ID)

#draw heatmap


pheatmap(mat,method="complete", main = "Unsupervise 1000 genes ", show_rownames = F, color=rev(color2),annotation_legend = TRUE, legend=T, cluster_cols=TRUE,scale="row")

pheatmap(mat,method="complete", main = "Unsupervise 1000 genes ", show_rownames = F, color=rev(color2),annotation_legend = TRUE, legend=T, cluster_cols=TRUE)

Here You have the images of the same pheatmap but with scale=row or scale="none"  http://imgur.com/a/N7FAn

I have two different clusters.  Which is the way to do unsupervided analysis in right way?

I mean if I use scale=none I don't see some groups. Why?

 

pheatmap unsupervised • 1.6k views
ADD COMMENT
0
Entering edit mode
chris86 ▴ 420
@chris86-8408
Last seen 4.3 years ago
UCL, United Kingdom

Hi

I normally use the aheatmap function for drawing heatmaps. I always include scale = 'row' because I think that normalises the genes data (on the rows) before it is correlated by pearsons. So I think it is a good idea. Aheatmap does z score normalisation.

aheatmap(rows.to.keep, distfun = 'pearson', scale = 'row',
         annCol = annotation)

Best,

Chris

ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 18 minutes ago
United States

The important thing is that you select the top variance genes on the un-scaled data (row scaling), which you have done.

After this, you can choose what settings you like, there is not always a "true" clustering of genes or samples, as there are different weightings of the rows possible.

ADD COMMENT

Login before adding your answer.

Traffic: 954 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6