Entering edit mode
6.0 years ago
Nick
•
0
Hello everyone,
During RNA-seq analysis I faced a problem, need to perform hierarchical clustering heatmap and got the following result by using following code
var_genes <- apply(logCounts , 1, var)
select_var <- names(sort(var_genes, decreasing = TRUE))[1:i]
highly_variable_lcpm <<- logCounts[select_var,]
par(mfrow=c(1,2), mar=c(5,4,10,2))
mypalette <- brewer.pal(11,"RdYlBu")
morecols <- colorRampPalette(mypalette)
heatmap.2(highly_variable_lcpm, col=rev(morecols(50)) ,offsetRow=0, offsetCol = -0.2, cexCol = 0.6, trace="none", main=stri,ColSideColors=colors,scale="row")
So the question is, how can I change my plot to cluster my genes( should be three green and three purple in a row together)?
P.S I tried to use fewer samples but it didn't help Thanks.
Your genes are already clustered, as indicated by the dendrogram, at left. However, there does not appear to be any discernible pattern of expression. To reveal more patterns of expression, I would actually include more genes in the heatmap.
Other things that you can try:
I go over some of these, here: A: How to cluster the upregulated and downregulated genes in heatmap?
Also, what is the source of your data? - just genes that have high variance among your 6 samples? Is there are a particular reason for showing these genes and not those that are statistically significantly differentially expressed?