Ive moved on to a new server and Installed R version 3.0 on it.
(gplots library was no longer available for 2.14)
Using a script that worked for version 2.14 I now encounter a problem generating a heatmap.
In R version 3 I get an error:
Error in lapply(args, is.character) : node stack overflow
Error in dev.flush() : node stack overflow
Error in par(op) : node stack overflow
In R version 2.14 I get an error:
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Which I can resolve by increasing the options(expressions=500000)
In R version 3 increasing this option does not resolve the issue.
And Im still stuck with the same error.
The script is the same for both:
y=read.table("test", row.names=1, sep="", header=TRUE)
hr <- hclust(dist(as.matrix(y)))
hc <- hclust(dist(as.matrix(t(y))))
mycl <- cutree(hr, k=7); mycolhc <- rainbow(length(unique(mycl)), start=0.1, end=0.9); mycolhc <- mycolhc[as.vector(mycl)]
install.packages("gplots")
library("gplots", character.only=TRUE)
myheatcol <- redgreen(75)
pdf("heatmap.pdf")
heatmap.2(as.matrix(y), Rowv=as.dendrogram(hr), Colv=as.dendrogram(hc), col=myheatcol,scale="none", density.info="none", trace="none", RowSideColors=mycolhc, labRow=FALSE)
dev.off()
Where "test" is a tdl file with headers and row names and a 40*5000 0/1 matrix
Any help would be appreciated
PS: When I reduce my data set to 2000 lines I no longer get the error.
PSS: Increasing the dataset to 2500 lines resulted in the same error; However, removing all non-informative lines (all 1s) left me with 3700 lines. Using this data set did not result in the error.
See Question&Answers more detail:
os