Hi,
I was using ComplexHeatmap package to plot some data, however, I come across an error message as shown below while running the code. Please assist me how to resolve this error.
Error in Heatmap(df_plot, cluster_rows = TRUE, cluster_columns = F, height = unit(4, : unused arguments (height = unit(4, "mm") * nrow(df_plot), row_split = ann_table$Cluster, left_annotation = row_ha)
dput(head(df_plot))
structure(list(GSM261581 = c(0, 0, 0, 0, -19.047619047619, 0),
GSM261913 = c(0, 0, 30.7692307692308, 0, 23.8095238095238,
-16), GSM261914 = c(0, 0, -23.0769230769231, 0, 0, 0), GSM260537 = c(0,
17.6470588235294, -38.4615384615385, 0, -23.8095238095238,
28), GSM260541 = c(0, 17.6470588235294, -65.3846153846154,
0, 19.047619047619, 0), GSM260542 = c(0, 0, 65.3846153846154,
0, -42.8571428571429, 48), GSM261573 = c(0, 0, 50, 20, -28.5714285714286,
16), GSM261575 = c(0, 23.5294117647059, -50, 0, 47.6190476190476,
-28), GSM261580 = c(0, 23.5294117647059, -76.9230769230769,
0, -33.3333333333333, 28)), row.names = c("M3.1.Cell cycle",
"M8.1.TBD", "M8.2.Prostanoids", "M8.3.Type 1 Interferon", "M9.1.Cytotoxic lymphocytes",
"M9.2.Erythrocytes"), class = "data.frame")
class(df_plot) "data.frame"
GSE_ID = "GSE12345"
platform = "GPL123"
pdf(paste0(GSE_ID, "_", platform, "_plot.pdf"), height = 70, width = 18)
ht=Heatmap(df_plot,
cluster_rows = TRUE,
cluster_columns = F,
height = unit(4, "mm")*nrow(df_plot),
width = unit(4, "mm")*ncol(df_plot),
rect_gp = gpar(type = "none"),
row_split = ann_table$Cluster,
top_annotation = ha_column,
left_annotation = row_ha,
row_title_rot = 0,
name = "% Response",
row_names_max_width = unit(10,"in"),
row_title_gp = gpar(fontsize = 12),
column_names_gp = gpar(fontsize = 12),
row_names_gp = gpar(fontsize = 12),
cell_fun = function(j, i, x, y, width, height, fill) {
grid.circle(x = x, y = y, r = unit(1.85, "mm") ,gp = gpar(fill = col_fun(df_plot[i, j]), col = NA))
}
)
draw(ht,heatmap_legend_side = "left", annotation_legend_side = "left", padding = unit(c(2, 20, 2, 2), "mm"))
dev.off()
Best Regards,
Toufiq
@Kevin Blighe, thank you for looking into this.
I see. You are using an older version of the package in which the
height
parameter did not exist. You should considering upgrading both R and ComplexHeatmap@Kevin Blighe , thank you so much. The issue has been resolved after upgrading both R and ComplexHeatmap.
Great to hear