This is a test version of Biostars. For the public version, visit https://www.biostars.org.
ComplexHeatmap Package takes forever to plot

Hi, I just started self-learning R. I am using the Complex Heatmap package. I have 1 NA cell on every row, but the package says it can process this. My problem is it takes forever to run and I have waited 1 hour after running Heatmap(matrix) multiple times. The dimension of the matrix is 600*21. No plot has come out yet. Has anyone encountered this problem? Any advice would be appreciated.

complexheatmap heatmap

Can you show us the code that you used andd few lines of the data so that we can reproduce the issue. It is also good practice to paste your sessioninfo.

Hi Badribio, thank you for helping out. Here's my code: I haven't imputed the NA value in the matrix because I don't see an error. It just takes forever to run. My file is a txt file converted from an Excel sheet.

library("ComplexHeatmap")

filename <- "LibC R1 + -.txt"

lib <- read.table(filename, sep="\t", quote="", na.string = "wt",header=TRUE)

head(lib)

dim(lib)

lib_matrix <- as.matrix(lib[ ,c(2:21)])

lib_matrix

class(lib)

class(lib_matrix)

save column for single amino acid locations for annotation

aminoacid_location <- data.frame(location = lib$X2.5.5)

aminoacid_location

Heatmap(lib_matrix, cluster_columns = FALSE)

Here's the session info:

sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 10.16

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

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] grid stats graphics grDevices utils datasets methods base

other attached packages: [1] ComplexHeatmap_2.8.0

loaded via a namespace (and not attached): [1] circlize_0.4.12 IRanges_2.26.0 matrixStats_0.58.0 codetools_0.2-18
[5] png_0.1-7 digest_0.6.27 foreach_1.5.1 crayon_1.4.1
[9] stats4_4.1.0 GlobalOptions_0.1.2 doParallel_1.0.16 S4Vectors_0.30.0
[13] GetoptLong_1.0.5 RColorBrewer_1.1-2 rjson_0.2.20 Cairo_1.5-12.2
[17] iterators_1.0.13 tools_4.1.0 parallel_4.1.0 compiler_4.1.0
[21] clue_0.3-59 colorspace_2.0-1 BiocGenerics_0.38.0 cluster_2.1.2
[25] BiocManager_1.30.15 shape_1.4.6

without data, it is difficult to reproduce the issue. Please do not post images of the data.

0 answers

No answers yet.

Log in to answer this question.