ComplexHeatmap - R Session aborted after calling Heatmap()
Entering edit mode
AR3513 • 0
Last seen 8 months ago


I have an error with the following piece of code, which was working fine a few months ago:

Heatmap(score_matrix, cluster_rows = hr, cluster_columns = FALSE,
                         name = "MWAS_score", row_dend_reorder = TRUE)

My R session gets killed, and in the command line it says "Called from: make_cluster(object, "row")". See a description of my variables below:

"score_matrix" is a matrix and looks like:

                        T2D      BMI
Lactate            2.911951 3.963538
3-Hydroxybutyrate  4.177989 0.000000
Leucine            2.402377 3.564122
Valine             2.927309 3.963538
Isoleucine         3.653767 3.228553
Acetate            0.000000 0.000000
Alanine            0.000000 2.910231
1,5-AG            -2.776466 0.000000

and "hr" is of class "hclust" and results from the clustering of the 8 variables in the rows of "score_matrix"*

Any help?

Many thanks,


software error Tutorial • 211 views
Entering edit mode

You will likely have to provide more information, like the output of sessionInfo() so we know what versions of the software you are using. But this will still be difficult to get help with as there is we can't reproduce the error to try to help debug

  1. Does this only happen when you provide hr? a. What if you just call Heatmap(score_matrix) b. What if you call it like Heatmap(score_matrix, custer_rows = hr, cluster_columns = FALSE), row_dend_reorder = FALSE)strong text (ie. ignore the `
  2. Does it only happen in RStudio? I can sometimes crash RStudio in fun ways, and I'm not sure it would happen if I just run R from the command line.
  3. Does this still happen after you upgrade to the just-released version of bioconductor?
Entering edit mode

Many thanks for your response. See some comments below:

  1. I just realised it works until I use "rowdendreorder = TRUE". So it would work with "Heatmap(scorematrix, clusterrows = hr, cluster_columns = FALSE)"

  2. It crashes both R and RStudio

  3. Yes, I just upgraded bioconductor. See session info below:

sessionInfo() R version 4.0.0 (2020-04-24) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Mojave 10.14.6

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale: [1] enGB.UTF-8/enGB.UTF-8/enGB.UTF-8/C/enGB.UTF-8/en_GB.UTF-8

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

other attached packages: [1] ComplexHeatmap2.4.0 SummarizedExperiment1.18.0 DelayedArray0.14.0
[4] matrixStats
0.56.0 Biobase2.48.0 GenomicRanges1.40.0
[7] GenomeInfoDb1.24.0 IRanges2.22.0 S4Vectors0.26.0
[10] BiocGenerics
0.34.0 MWASTools_1.5.4

loaded via a namespace (and not attached): [1] KEGGgraph1.48.0 Rcpp1.0.4.6 circlize0.4.8 lattice0.20-41
[5] png0.1-7 Biostrings2.56.0 R62.4.1 cellranger1.1.0
[9] plyr1.8.6 httr1.4.1 ggplot23.3.0 pillar1.4.3
[13] GlobalOptions0.1.1 zlibbioc1.34.0 rlang0.4.5 curl4.3
[17] readxl1.3.1 rstudioapi0.11 data.table1.12.8 car3.0-7
[21] glm21.2.1 GetoptLong0.1.8 Matrix1.2-18 qvalue2.20.0
[25] splines4.0.0 stringr1.4.0 foreign0.8-78 igraph1.2.5
[29] RCurl1.98-1.2 munsell0.5.0 compiler4.0.0 pkgconfig2.0.3
[33] shape1.4.4 KEGGREST1.28.0 gridExtra2.3 tibble3.0.1
[37] GenomeInfoDbData1.2.3 ppcor1.1 rio0.5.16 XML3.99-0.3
[41] crayon1.3.4 MASS7.3-51.5 bitops1.0-6 gtable0.3.0
[45] lifecycle0.2.0 magrittr1.5 scales1.1.0 graph1.66.0
[49] zip2.0.4 stringi1.4.6 carData3.0-3 XVector0.28.0
[53] reshape21.4.4 ellipsis0.3.0 vctrs0.2.4 boot1.3-24
[57] openxlsx4.1.4 RColorBrewer1.1-2 rjson0.2.20 tools4.0.0
[61] forcats0.5.0 glue1.4.0 hms0.5.3 abind1.4-5
[65] clue0.3-57 colorspace1.4-1 cluster2.1.0 haven2.2.0

Entering edit mode
Zuguang Gu ▴ 210
Last seen 9 months ago
Germany / Heidelberg / DKFZ

It is because I forgot to remove one ‘browser()’ line when debug the code. Please update the package to 2.5.1 from github.

Entering edit mode

Thanks!! Coul you please update bioconductor level as well? I use the Heatmap function in my package MWASTools, so I get an build error because I can´t run the example that uses your function!

Many thanks


Entering edit mode

It has already updated, both on the release branch and devel branch. It might take several days to appear on bioc website.


Login before adding your answer.

Traffic: 376 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6