File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ Heatmap_with_groups <- function(D,
86
86
log_base = 2 ,
87
87
colour_scale_max = NULL ,
88
88
textsize = 15 ,
89
+ top_annotation = NULL ,
89
90
... ) {
90
91
91
92
data.asmatrix <- as.matrix(D )
@@ -155,16 +156,19 @@ Heatmap_with_groups <- function(D,
155
156
row_labels <- rep(" " , nrow(data.asmatrix ))
156
157
}
157
158
158
- # ## top annotation for groups
159
- if (! is.null(groups )) {
160
- top_annotation = ComplexHeatmap :: HeatmapAnnotation(Group = groups ,
161
- col = group_colours ,
162
- annotation_name_gp = grid :: gpar(fontsize = textsize ), name = " Group" ,
163
- annotation_legend_param = list (title_gp = grid :: gpar(fontsize = textsize ,
164
- fontface = " bold" ),
165
- labels_gp = grid :: gpar(fontsize = textsize )))
166
- } else {
167
- top_annotation = NULL
159
+
160
+ if (is.null(top_annotation )) {
161
+ # ## top annotation for groups
162
+ if (! is.null(groups )) {
163
+ top_annotation = ComplexHeatmap :: HeatmapAnnotation(Group = groups ,
164
+ col = group_colours ,
165
+ annotation_name_gp = grid :: gpar(fontsize = textsize ), name = " Group" ,
166
+ annotation_legend_param = list (title_gp = grid :: gpar(fontsize = textsize ,
167
+ fontface = " bold" ),
168
+ labels_gp = grid :: gpar(fontsize = textsize )))
169
+ } else {
170
+ top_annotation = NULL
171
+ }
168
172
}
169
173
170
174
# ## set column split
You can’t perform that action at this time.
0 commit comments