[BioC] heatmap.2: Colv dendrogram doesn't match size of x

ferreirafm at usp.br ferreirafm at usp.br
Thu Aug 28 20:16:58 CEST 2014

Silly me. This is it! 
Thanks for helping 

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

De: "Sean Davis" <sdavis2 at mail.nih.gov> 
Para: ferreirafm at usp.br 
Cc: bioconductor at r-project.org 
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, < ferreirafm at usp.br > wrote: 

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

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. 



main = "Z-score", 
density.info ="none", 
margins =c(12,9), 
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"), 

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

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

[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 
Bioconductor at r-project.org 
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor 



	[[alternative HTML version deleted]]

More information about the Bioconductor mailing list