R crash when matrix nrows exceeds 45000 using pheatmap/heatmap.2
2
0
Entering edit mode
John ▴ 30
@john-9676
Last seen 6.5 years ago

Hi,

pheatmap(FW_SD, cluster_rows = T, cluster_cols = F, main = 'FW')

> nrow(FW_SD)
[1] 53049

R crashes. Is there hardcoded memory limitation?

I have over 500GB RAM in my host.

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.3 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] pheatmap_1.0.8

loaded via a namespace (and not attached):
[1] Rcpp_0.12.3                highr_0.5.1                RColorBrewer_1.1-2         futile.logger_1.4.1        GenomeInfoDb_1.6.3       
[6] plyr_1.8.3                 XVector_0.10.0             futile.options_1.0.0       tools_3.2.3                zlibbioc_1.16.0          
[11] rpart_4.1-10               RSQLite_1.0.0              annotate_1.48.0            gtable_0.1.2               lattice_0.20-33          
[16] DBI_0.3.1                  parallel_3.2.3             RcppArmadillo_0.6.500.4.0  gridExtra_2.0.0            knitr_1.12.3             
[21] genefilter_1.52.1          cluster_2.0.3              S4Vectors_0.8.11           IRanges_2.4.6              locfit_1.5-9.1           
[26] stats4_3.2.3               grid_3.2.3                 nnet_7.3-11                Biobase_2.30.0             AnnotationDbi_1.32.3     
[31] XML_3.98-1.3               survival_2.38-3            BiocParallel_1.4.3         foreign_0.8-66             latticeExtra_0.6-26      
[36] Formula_1.2-1              geneplotter_1.48.0         DESeq2_1.10.1              ggplot2_2.0.0              lambda.r_1.1.7           
[41] Hmisc_3.17-1               scales_0.3.0               splines_3.2.3              BiocGenerics_0.16.1        GenomicRanges_1.22.4     
[46] SummarizedExperiment_1.0.2 colorspace_1.2-6           xtable_1.8-2               acepack_1.3-3.3            munsell_0.4.2 

 

I couldn't show R crash report as it exceeds the allowed limit to post it here but you may look it here http://dpaste.com/0BTDK7R

Thanks for the  help.

J.

 

pheatmap heatmap.2 • 2.7k views
ADD COMMENT
1
Entering edit mode
Raivo Kolde ▴ 50
@raivo-kolde-8088
Last seen 7.3 years ago
Boston

There is no explicit memory restriction in pheatmap, but it is certainly not optimized for such large heatmaps.  Usually, a heatmap with 50K rows does not make much sense, as the number of vertical pixels available in a typical (or even atypical for that matter) screen is an order of magnitude smaller. As biological data tends to have many redundant patterns anyway, you might be better off trying to cluster your data before running trying to make a heatmap. For example, you could cluster the data that you have into 100 or 1000 clusters using k-means and then draw heatmap on their centers. In pheatmap you can achieve this using the parameter kmeans_k.

ADD COMMENT
0
Entering edit mode
John ▴ 30
@john-9676
Last seen 6.5 years ago

Thank you Raivo. 

J.

ADD COMMENT

Login before adding your answer.

Traffic: 684 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