Browse code

fixed a bug of missing right annotation legends for vertically concatenated heatmaps

Zuguang Gu authored on 09/09/2021 11:56:42
Showing 3 changed files

... ...
@@ -1,5 +1,7 @@
1 1
 CHANGES in VERSION 2.9.4
2 2
 
3
+* fixed a bug of missing right annotation legends for vertically concatenated heatmaps.
4
+
3 5
 ========================
4 6
 
5 7
 CHANGES in VERSION 2.9.3
... ...
@@ -801,8 +801,8 @@ setMethod(f = "draw",
801 801
                                 ColorMappingList = c.list(ColorMappingList, list = get_color_mapping_list(ht@bottom_annotation))
802 802
                             }
803 803
                         }
804
-                        if(!is.null(ht@top_annotation)) {
805
-                            ColorMappingList = c.list(ColorMappingList, list = get_color_mapping_list(ht@top_annotation))
804
+                        if(!is.null(ht@right_annotation)) {
805
+                            ColorMappingList = c.list(ColorMappingList, list = get_color_mapping_list(ht@right_annotation))
806 806
                         }
807 807
                     } else if(inherits(ht, "HeatmapAnnotation")) {
808 808
                         if(legend_grouping == "original") {
... ...
@@ -1061,8 +1061,8 @@ setMethod(f = "make_layout",
1061 1061
                             ColorMappingList = c.list(ColorMappingList, list = get_color_mapping_list(ht@bottom_annotation))
1062 1062
                         }
1063 1063
                     }
1064
-                    if(!is.null(ht@top_annotation)) {
1065
-                        ColorMappingList = c.list(ColorMappingList, list = get_color_mapping_list(ht@top_annotation))
1064
+                    if(!is.null(ht@right_annotation)) {
1065
+                        ColorMappingList = c.list(ColorMappingList, list = get_color_mapping_list(ht@right_annotation))
1066 1066
                     }
1067 1067
                 } else if(inherits(ht, "HeatmapAnnotation")) {
1068 1068
                     if(legend_grouping == "original") {