作者:Zuguang Gu8
    翻译:Steven Shen
    原文:https://jokergoo.github.io/ComplexHeatmap-reference/book/a-list-of-heatmaps.html#control-main-heatmap-in-draw-function


    Settings of the main heatmap can be controlled in the main Heatmap() function. To make it convinient, settings that affect heatmap rows can also be directly set in draw(). If some of these settings are set, corresponding settings in the main Heatmap() will be overwritten.

    In draw() function, following main heatmap settings control row orders of all heatmaps.

    • cluster_rows
    • clustering_distance_rows
    • clustering_method_rows
    • row_dend_width
    • show_row_dend
    • row_dend_reorder
    • row_dend_gp
    • row_order

    Following settings control the row slices.

    • row_gap
    • row_km
    • row_km_repeats
    • row_split

    Following settings control the heatmap height.

    • height
    • heatmap_height

    In following example, row_km = 2, cluster_rows = FALSE for ht1 is overwritten in draw().

    1. ht1 = Heatmap(mat1, name = "rnorm", col = col_rnorm, row_km = 2, cluster_rows = FALSE)
    2. ht2 = Heatmap(mat2, name = "runif", col = col_runif)
    3. ht3 = Heatmap(le, name = "letters", col = col_letters)
    4. ht_list = ht1 + ht2 + ht3
    5. draw(ht_list, row_km = 1, row_split = le, cluster_rows = TRUE)

    4.5 在 draw() 函数中控制主热图 - 图1