Browse code

fixed a bug of annotation legens when 'df' is set

Zuguang Gu authored on 31/08/2022 14:37:52
Showing 4 changed files

... ...
@@ -1,8 +1,8 @@
1 1
 Package: ComplexHeatmap
2 2
 Type: Package
3 3
 Title: Make Complex Heatmaps
4
-Version: 2.13.1
5
-Date: 2021-05-10
4
+Version: 2.13.2
5
+Date: 2022-08-31
6 6
 Author: Zuguang Gu
7 7
 Maintainer: Zuguang Gu <z.gu@dkfz.de>
8 8
 Depends: R (>= 3.5.0), methods, grid, graphics, stats, grDevices
... ...
@@ -1,3 +1,9 @@
1
+CHANGES in VERSION 2.13.2
2
+
3
+* `HeatmapAnnotation()`: fixed a bug where annotation legends are not all generated when `df` is set.
4
+
5
+========================
6
+
1 7
 CHANGES in VERSION 2.13.1
2 8
 
3 9
 * `column_title_rot` can be set with any degree value.
... ...
@@ -211,6 +211,9 @@ HeatmapAnnotation = function(...,
211 211
     if(length(show_legend) == 1) {
212 212
 		show_legend = recycle_param(show_legend, simple_anno_name, TRUE)
213 213
 	}
214
+	if(length(show_legend) < length(anno_value_list) && length(show_legend) > 1) {
215
+		show_legend = recycle_param(show_legend, simple_anno_name, TRUE)
216
+	}
214 217
 	# check length of show_legend
215 218
 	if(length(show_legend) == length(anno_value_list) && !all(l_simple_anno)) {
216 219
 		show_legend = show_legend[l_simple_anno]
... ...
@@ -7,8 +7,9 @@ citEntry(
7 7
                        as.person("Roland Eils"),
8 8
                        as.person("Matthias Schlesner")),
9 9
    journal = "Bioinformatics",
10
+   doi = "10.1093/bioinformatics/btw313",
10 11
    year = 2016,
11
-   textVersion = "Gu, Z. (2016) Complex heatmaps reveal patterns and correlations in multidimensional genomic data. Bioinformatics. https://doi.org/10.1093/bioinformatics/btw313."
12
+   textVersion = "Gu, Z. (2016) Complex heatmaps reveal patterns and correlations in multidimensional genomic data. Bioinformatics."
12 13
 )
13 14
 
14 15
 
... ...
@@ -16,9 +17,10 @@ citEntry(
16 17
    entry="article",
17 18
    title = "Complex Heatmap Visualization",
18 19
    author = personList(as.person("Zuguang Gu")),
20
+   doi = "10.1002/imt2.43",
19 21
    journal = "iMeta",
20 22
    year = 2022,
21
-   textVersion = "Gu, Z. (2022) Complex Heatmap Visualization. iMeta. https://doi.org/10.1002/imt2.43."
23
+   textVersion = "Gu, Z. (2022) Complex Heatmap Visualization. iMeta."
22 24
 )
23 25
 
24 26