clustering & memory
1
0
Entering edit mode
Floor Stam ▴ 90
@floor-stam-582
Last seen 9.6 years ago
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]]
Clustering Clustering • 1.4k views
ADD COMMENT
0
Entering edit mode
Jenny Bryan ▴ 110
@jenny-bryan-949
Last seen 9.6 years ago
I suspect that you can find your answer here: https://stat.ethz.ch/pipermail/bioconductor/2004-January/003415.html which explains this is not a memory problem. The number of genes dictates the depth of your dendrogram (=tree). Since the functions that work with those objects often use recursion, gene clustering can easily exceed the default limit on recursions. You may have success if you explicitly raise that limit (options("expressions")). Good luck, Jenny -- Jenny Bryan *----------------------------------* * Assistant Professor * * Department of Statistics and * * the Michael Smith Laboratories * * University of British Columbia * *----------------------------------* tel: 604.822.6422 email: jenny@stat.ubc.ca
ADD COMMENT

Login before adding your answer.

Traffic: 748 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6