Re: heatmap.2: Colv dendrogram doesn't match size of x

[email protected] Thu, 28 Aug 2014 15:16:58 -0300 (BRT)
Newsgroups gmane.science.biology.informatics.conductor
Message-ID <[email protected]>
Silly me. This is it! 
Thanks for helping 

----- Mensagem original -----


De: "Sean Davis" <sdavis2-2loH/[email protected]> 
Para: [email protected] 
Cc: [email protected] 
Enviadas: Quarta-feira, 27 de Agosto de 2014 20:47:46 
Assunto: Re: [BioC] heatmap.2: Colv dendrogram doesn't match size of x 







On Wed, Aug 27, 2014 at 7:06 PM, < [email protected] > wrote: 

<blockquote>
Hi List, 
I've got some problems doing a heatmap with following peace of code: 

library(gplots) 
row_distance = dist(dfdat_zscore, method =manhattan") 
row_cluster = hclust(row_distance, method = "ward.D") 
col_distance = dist(dfdat_zscore, method = "manhattan") 
col_cluster = hclust(col_distance, method = "ward.D") 





Assuming that dfdat_zscore is not a square matrix, row_distance should be using the transpose of that matrix. As it stands, you are calculating the distance between the columns for both col_distance and row_distance. Make that adjustment and see if that fixes your problem. 


Sean 



<blockquote>

heatmap.2(as.matrix(dfdat_zscore), 
main = "Z-score", 
notecol="black", 
density.info ="none", 
trace="none", 
margins =c(12,9), 
col=redgreen(75), 
breaks=col_breaks, 
dendrogram = "both", 
cexCol=0.5, cexRow=0.5, 
key=T, keysize=1.0, 
Rowv = as.dendrogram(row_cluster), 
Colv = as.dendrogram(col_cluster), 
distfun = dist(method = "manhattan"), 
hclustfun = hclust(col_distance, method = "ward.D"), 
labRow=rownames(df_zscore)) 

I've read some posts suggesting to upgrade gplots. However, the issue seems to persist with gplots_2.14.1 
Any help is appreciated. 
Best. 

Additional information: 
> sessionInfo() 
R version 3.1.1 (2014-07-10) 
Platform: x86_64-pc-linux-gnu (64-bit) 

locale: 
[1] C 

attached base packages: 
[1] stats graphics grDevices utils datasets methods base 

other attached packages: 
[1] gplots_2.14.1 

loaded via a namespace (and not attached): 
[1] KernSmooth_2.23-12 bitops_1.0-6 caTools_1.17 gdata_2.13.3 
[5] gtools_3.4.1 

[[alternative HTML version deleted]] 

_______________________________________________ 
Bioconductor mailing list 
[email protected] 
https://stat.ethz.ch/mailman/listinfo/bioconductor 
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor 

</blockquote>


</blockquote>


	[[alternative HTML version deleted]]

_______________________________________________
Bioconductor mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor