[BioC] clustering & memory

Floor Stam fjstam at bio.vu.nl
Thu Nov 25 12:04:23 CET 2004


hi there

I am using R1.9.1 under mac OSX on an Apple iBook 640MB ram

I'm trying to cluster my genes, and run into a memory problem (or at 
least, that's what it looks like). When i do:

 >single.clust<-function(d) hclust(d, method="single")
 >eucl.dist <- function(x) dist(x, method="euclidian")

 >hm1<-heatmap(kdata, Colv=NA, distfun=eucl.dist, 
hclustfun=single.clust, col=pal, zlim=c(-3,3), scale="none", labRow=NA)

I get a nice dendrogram if the kdata contains 10 genes, but it fails if 
kdata contains 1300 genes, it says:

Error in match.fun(FUN) : evaluation nested too deeply: infinite 
recursion / options(expression=)?
Error: evaluation nested too deeply: infinite recursion / 
options(expression=)?


However, i think if i split the clustering and the heatmap drawing up 
that i will be able to do it, since

 >heatmap(data, Colv=NA, col=pal, zlim=c(-3, 3), scale="none", labRow=NA)

works fine for 1300 genes (and 14 samples)
and

 >e.dist<-dist(data, method="eucl")
 >e.clust<-hclust(e.dist, method="average")

does not lead to errors either. How do i tell heatmap do use e.clust 
instead of clustering all over again with the default parameters? I 
tried to change the Rowv argument:

 >heatmap(s.data, Colv=NA, Rowv=s.clust, col=pal, zlim=c(-3, 3), 
scale="none", labRow=NA, keep.dendro=FALSE)

Error in lV + rV : non-numeric argument to binary operator

or

 >heatmap(s.data, Colv=NA, Rowv=as.dendrogram(s.clust), col=pal, 
zlim=c(-3, 3), scale="none", labRow=NA)

Error in match.fun(FUN) : evaluation nested too deeply: infinite 
recursion / options(expression=)?
Error: evaluation nested too deeply: infinite recursion / 
options(expression=)?

Any suggestions for this or do i just need to get myself a bigger 
computer or restrict myself to smaller amounts of genes?

I am a biologist so if you have any suggestions, please keep it simple 
for me!


regards
Floor


P.S. Before anyone starts screaming about the relevance of this action: 
What i want to do is show the genes that are regulated in my dataset, 
which comprises two 7 time-point time-courses after 2 different 
treatments. I need to point out that the regulated genes are partly 
similarly regulated but mostly dissimilarly regulated by the 2 
treatments. I will show a cluster dendrogram of time-points which shows 
that samples of one time-couse cluster apart from the other. However, 
the clearest illustration of this finding would be a heatmap of 
regulated genes since not all biologists will be able to appreciate the 
significance of path-lengths of such a dendrogram immediately. And they 
are, in fact, my audience. So yes, i want to show a heatmap to make 
them (and first the referees, of course) happy.




	[[alternative text/enriched version deleted]]



More information about the Bioconductor mailing list