[R] mva Hclust, heatmap and plotting functions

Jason Skelton jps at sanger.ac.uk
Mon Nov 3 18:47:53 CET 2003


Hi All

Not sure if this a bioconductor question or general R mailing list
so apologies if this has gone to the wrong one.................

When plotting dendrograms created by hclust you can "identify" clusters 
by clicking on the graphics and returning a list of what is contained in 
each cluster. However I'd like to be able to "zoom in" on specific 
clusters and plot them, is this possible at all ?


Also


I have a microarray experiment where I'd like to be able to plot
A gene tree against a condition tree using the heatmap function.
for genes according to treatments and viceversa

I.e Treatments being DIF1, DIF2, DIF3
genes being 324c_F, 634_F etc.


393 genes x 3 treatments

name		DIF1		DIF2		DIF3
324c_F		4.16E-01	2.65E-01	0.298602679
634_F		8.95E-01	6.67E-01	0.337895962
504c_F		4.54E-01	5.94E-01	1.185792741
1302_F		-6.43E-01	-5.39E-01	0.073152009
233c_F		4.20E-01	4.27E-01	0.261216119
1274_F		-5.00E-01	-3.53E-01	-0.161567509
1314_F		1.59E+00	1.08E+00	0.403198377
1791c_F		9.08E-01	4.11E-01	0.461046812
594c_F		6.43E-01	3.93E-01	-0.142807556
854c_F		-5.59E-01	-9.70E-01	-0.766361402

viseversa.

3 treatment x 393 genes

name	324c_F		634_F		504c_F		1302_F..........
DIF1	4.16E-01	8.95E-01	4.54E-01	-6.43E-01......
DIF2	2.65E-01	6.67E-01	5.94E-01	-5.39E-01......
DIF3	0.298602679	0.337895962	1.185792741	0.073152009....

etc.............

And would like to be able to plot one against the other.

I've used as.dendrogram to create dendrograms from the output of hclust 
for each of the data sets mentioned above but..........
I'm having problems with the rest of the functions
Could someone advise me as to which numeric matrix I should be using 
specified as X
in the example:

heatmap(x, dendrogram1, dendrogram2 etc)

I.e. is X coming from the results of dist, hclust or the original data ?

If so do you then need to covert it into a numeric matrix ?
I've thus far tried the data.matrix function on the output from all of 
the above only to get:  `x' must be a numeric matrix

heatmap(DIF123distmatrix, hclustfun=hclust)
This command works nicely but obviously plots the same thing
on both axes.

I've tried something along the lines of:

heatmap(DIF123datamat, DIF123clustFLIPasdendro,
DIF123clustHCmcquittyasdendro, hclustfun=hclust)
but this returns
row dendrogram ordering gave index of wrong length
which has come from the viseversa example above.



thanks for any help and guidance

Jason







-- 
--------------------------------
Jason Skelton
Pathogen Microarrays
Wellcome Trust Sanger Institute
Hinxton
Cambridge
CB10 1SA

Tel +44(0)1223 834244 Ext 7123
Fax +44(0)1223 494919




More information about the R-help mailing list