Browse code

rename to anno_textbox()

Zuguang Gu authored on 15/06/2022 10:11:58
Showing160 changed files

... ...
@@ -48,8 +48,8 @@ S3method("heightDetails", "legend_body")
48 48
 export("heightDetails.legend_body")
49 49
 S3method("heightDetails", "packed_legends")
50 50
 export("heightDetails.packed_legends")
51
-S3method("heightDetails", "text_box")
52
-export("heightDetails.text_box")
51
+S3method("heightDetails", "textbox")
52
+export("heightDetails.textbox")
53 53
 S3method("length", "HeatmapAnnotation")
54 54
 export("length.HeatmapAnnotation")
55 55
 S3method("length", "HeatmapList")
... ...
@@ -124,8 +124,8 @@ S3method("widthDetails", "legend_body")
124 124
 export("widthDetails.legend_body")
125 125
 S3method("widthDetails", "packed_legends")
126 126
 export("widthDetails.packed_legends")
127
-S3method("widthDetails", "text_box")
128
-export("widthDetails.text_box")
127
+S3method("widthDetails", "textbox")
128
+export("widthDetails.textbox")
129 129
 export("%v%")
130 130
 export("AdditiveUnit")
131 131
 export("AnnotationFunction")
... ...
@@ -159,7 +159,7 @@ export("anno_points")
159 159
 export("anno_simple")
160 160
 export("anno_summary")
161 161
 export("anno_text")
162
-export("anno_text_box")
162
+export("anno_textbox")
163 163
 export("anno_zoom")
164 164
 export("annotation_axis_grob")
165 165
 export("bar3D")
... ...
@@ -199,7 +199,7 @@ export("getXY_in_parent_vp")
199 199
 export("grid.annotation_axis")
200 200
 export("grid.boxplot")
201 201
 export("grid.dendrogram")
202
-export("grid.text_box")
202
+export("grid.textbox")
203 203
 export("gt_render")
204 204
 export("ht_global_opt")
205 205
 export("ht_opt")
... ...
@@ -235,7 +235,7 @@ export("subset_matrix_by_row")
235 235
 export("subset_no")
236 236
 export("subset_vector")
237 237
 export("test_alter_fun")
238
-export("text_box_grob")
238
+export("textbox_grob")
239 239
 export("unify_mat_list")
240 240
 export("upset_left_annotation")
241 241
 export("upset_right_annotation")
... ...
@@ -290,7 +290,6 @@ exportMethods("set_component_height")
290 290
 exportMethods("set_component_width")
291 291
 
292 292
 import(digest)
293
-import(parallel)
294 293
 import(doParallel)
295 294
 import(foreach)
296 295
 import(grDevices)
... ...
@@ -298,6 +297,7 @@ import(graphics)
298 297
 import(grid)
299 298
 import(matrixStats)
300 299
 import(methods)
300
+import(parallel)
301 301
 import(png)
302 302
 import(stats)
303 303
 importFrom("GetoptLong", qq)
... ...
@@ -324,5 +324,4 @@ importFrom("utils", "combn")
324 324
 importFrom("utils", "getFromNamespace")
325 325
 importFrom("utils", "packageDescription")
326 326
 importFrom("utils", "str")
327
-importFrom("utils", "sessionInfo")
328 327
 
... ...
@@ -1,32 +1,32 @@
1
-setGeneric('column_order', function(object, ...) standardGeneric('column_order'))
2
-setGeneric('draw', function(object, ...) standardGeneric('draw'))
3
-setGeneric('prepare', function(object, ...) standardGeneric('prepare'))
4
-setGeneric('row_dend', function(object, ...) standardGeneric('row_dend'))
5
-setGeneric('copy_all', function(object, ...) standardGeneric('copy_all'))
6
-setGeneric('heatmap_legend_size', function(object, ...) standardGeneric('heatmap_legend_size'))
7
-setGeneric('make_column_cluster', function(object, ...) standardGeneric('make_column_cluster'))
8
-setGeneric('column_dend', function(object, ...) standardGeneric('column_dend'))
9 1
 setGeneric('re_size', function(object, ...) standardGeneric('re_size'))
10
-setGeneric('annotation_legend_size', function(object, ...) standardGeneric('annotation_legend_size'))
11
-setGeneric('draw_dend', function(object, ...) standardGeneric('draw_dend'))
12
-setGeneric('draw_annotation_legend', function(object, ...) standardGeneric('draw_annotation_legend'))
2
+setGeneric('get_color_mapping_list', function(object, ...) standardGeneric('get_color_mapping_list'))
3
+setGeneric('component_height', function(object, ...) standardGeneric('component_height'))
4
+setGeneric('make_row_cluster', function(object, ...) standardGeneric('make_row_cluster'))
5
+setGeneric('color_mapping_legend', function(object, ...) standardGeneric('color_mapping_legend'))
6
+setGeneric('draw_annotation', function(object, ...) standardGeneric('draw_annotation'))
13 7
 setGeneric('get_legend_param_list', function(object, ...) standardGeneric('get_legend_param_list'))
14 8
 setGeneric('draw_title', function(object, ...) standardGeneric('draw_title'))
15
-setGeneric('draw_heatmap_list', function(object, ...) standardGeneric('draw_heatmap_list'))
16
-setGeneric('adjust_heatmap_list', function(object, ...) standardGeneric('adjust_heatmap_list'))
9
+setGeneric('make_layout', function(object, ...) standardGeneric('make_layout'))
10
+setGeneric('draw', function(object, ...) standardGeneric('draw'))
17 11
 setGeneric('draw_heatmap_legend', function(object, ...) standardGeneric('draw_heatmap_legend'))
12
+setGeneric('column_dend', function(object, ...) standardGeneric('column_dend'))
13
+setGeneric('heatmap_legend_size', function(object, ...) standardGeneric('heatmap_legend_size'))
18 14
 setGeneric('draw_heatmap_body', function(object, ...) standardGeneric('draw_heatmap_body'))
19
-setGeneric('attach_annotation', function(object, ...) standardGeneric('attach_annotation'))
15
+setGeneric('map_to_colors', function(object, ...) standardGeneric('map_to_colors'))
16
+setGeneric('make_column_cluster', function(object, ...) standardGeneric('make_column_cluster'))
17
+setGeneric('annotation_legend_size', function(object, ...) standardGeneric('annotation_legend_size'))
20 18
 setGeneric('component_width', function(object, ...) standardGeneric('component_width'))
21
-setGeneric('make_layout', function(object, ...) standardGeneric('make_layout'))
22
-setGeneric('make_row_cluster', function(object, ...) standardGeneric('make_row_cluster'))
19
+setGeneric('copy_all', function(object, ...) standardGeneric('copy_all'))
20
+setGeneric('column_order', function(object, ...) standardGeneric('column_order'))
21
+setGeneric('draw_heatmap_list', function(object, ...) standardGeneric('draw_heatmap_list'))
22
+setGeneric('draw_dend', function(object, ...) standardGeneric('draw_dend'))
23
+setGeneric('prepare', function(object, ...) standardGeneric('prepare'))
24
+setGeneric('draw_dimnames', function(object, ...) standardGeneric('draw_dimnames'))
25
+setGeneric('adjust_heatmap_list', function(object, ...) standardGeneric('adjust_heatmap_list'))
23 26
 setGeneric('set_component_height', function(object, ...) standardGeneric('set_component_height'))
24
-setGeneric('add_heatmap', function(object, ...) standardGeneric('add_heatmap'))
25
-setGeneric('get_color_mapping_list', function(object, ...) standardGeneric('get_color_mapping_list'))
26 27
 setGeneric('row_order', function(object, ...) standardGeneric('row_order'))
27
-setGeneric('component_height', function(object, ...) standardGeneric('component_height'))
28
-setGeneric('map_to_colors', function(object, ...) standardGeneric('map_to_colors'))
28
+setGeneric('attach_annotation', function(object, ...) standardGeneric('attach_annotation'))
29
+setGeneric('draw_annotation_legend', function(object, ...) standardGeneric('draw_annotation_legend'))
29 30
 setGeneric('set_component_width', function(object, ...) standardGeneric('set_component_width'))
30
-setGeneric('color_mapping_legend', function(object, ...) standardGeneric('color_mapping_legend'))
31
-setGeneric('draw_annotation', function(object, ...) standardGeneric('draw_annotation'))
32
-setGeneric('draw_dimnames', function(object, ...) standardGeneric('draw_dimnames'))
31
+setGeneric('row_dend', function(object, ...) standardGeneric('row_dend'))
32
+setGeneric('add_heatmap', function(object, ...) standardGeneric('add_heatmap'))
... ...
@@ -410,6 +410,7 @@ setMethod(f = "draw",
410 410
     show_parent_dend_line = NULL
411 411
     ) {
412 412
 
413
+    .ENV$IS_UNDER_JUPYTER = is_under_jupyter()
413 414
 
414 415
     if(.ENV$IS_UNDER_JUPYTER && !.ENV$IS_UNDER_JUPYTER_IGNORE) {
415 416
         .ENV$IS_UNDER_JUPYTER_IGNORE = TRUE
416 417
similarity index 89%
417 418
rename from R/anno_text_box.R
418 419
rename to R/anno_textbox.R
... ...
@@ -28,15 +28,15 @@
28 28
 # == example
29 29
 # words = sapply(1:30, function(x) strrep(sample(letters, 1), sample(3:10, 1)))
30 30
 # grid.newpage()
31
-# grid.text_box(words, gp = gpar(fontsize = runif(30, min = 5, max = 30)))
31
+# grid.textbox(words, gp = gpar(fontsize = runif(30, min = 5, max = 30)))
32 32
 #
33 33
 # sentenses = c("This is sentense 1", "This is a long long long long long long long sentense.")
34 34
 # grid.newpage()
35
-# grid.text_box(sentenses)
36
-# grid.text_box(sentenses, word_wrap = TRUE)
37
-# grid.text_box(sentenses, word_wrap = TRUE, add_new_line = TRUE)
35
+# grid.textbox(sentenses)
36
+# grid.textbox(sentenses, word_wrap = TRUE)
37
+# grid.textbox(sentenses, word_wrap = TRUE, add_new_line = TRUE)
38 38
 #
39
-text_box_grob = function(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), just = "centre", 
39
+textbox_grob = function(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), just = "centre", 
40 40
 	gp = gpar(), background_gp = gpar(col = "black", fill = "transparent"), round_corners = FALSE, r = unit(0.1, "snpc"),
41 41
 	line_space = unit(4, "pt"), text_space = unit(4, "pt"), max_width = unit(100, "mm"), 
42 42
 	padding = unit(4, "pt"), first_text_from = "top", add_new_line = FALSE, word_wrap = FALSE) { # width in mm
... ...
@@ -203,33 +203,33 @@ text_box_grob = function(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), just
203 203
 		# rectGrob(x = x, y = y, width = text_width, height = text_height, default.units = "mm", just = c(0, 0))
204 204
 	)
205 205
 
206
-	gb = gTree(children = gl, cl = "text_box", 
206
+	gb = gTree(children = gl, cl = "textbox", 
207 207
 		vp = viewport(x = vp_x, y = vp_y, just = vp_just, width = unit(w, "mm"), 
208 208
 			          height = unit(h, "mm")))
209 209
 	return(gb)
210 210
 }
211 211
 
212 212
 # == title
213
-# Width for text_box grob
213
+# Width for textbox grob
214 214
 #
215 215
 # == param
216
-# -x The ``text_box`` grob returned by `text_box_grob`.
216
+# -x The ``textbox`` grob returned by `textbox_grob`.
217 217
 #
218 218
 # == value
219 219
 # A `grid::unit` object.
220
-widthDetails.text_box = function(x) {
220
+widthDetails.textbox = function(x) {
221 221
 	x$vp$width
222 222
 }
223 223
 
224 224
 # == title
225
-# Height for text_box grob
225
+# Height for textbox grob
226 226
 #
227 227
 # == param
228
-# -x The ``text_box`` grob returned by `text_box_grob`.
228
+# -x The ``textbox`` grob returned by `textbox_grob`.
229 229
 #
230 230
 # == value
231 231
 # A `grid::unit` object.
232
-heightDetails.text_box = function(x) {
232
+heightDetails.textbox = function(x) {
233 233
 	x$vp$height
234 234
 }
235 235
 
... ...
@@ -241,13 +241,13 @@ heightDetails.text_box = function(x) {
241 241
 # -x X position.
242 242
 # -y Y position.
243 243
 # -gp Graphics parameters of texts.
244
-# -... Pass to `text_box_grob`.
244
+# -... Pass to `textbox_grob`.
245 245
 #
246 246
 # == details
247
-# All details can be found in the help page of `text_box_grob`.
247
+# All details can be found in the help page of `textbox_grob`.
248 248
 #
249
-grid.text_box = function(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), gp = gpar(), ...) {
250
-	gb = text_box_grob(text, x = x, y = y, gp = gp, ...)
249
+grid.textbox = function(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), gp = gpar(), ...) {
250
+	gb = textbox_grob(text, x = x, y = y, gp = gp, ...)
251 251
 	grid.draw(gb)
252 252
 }
253 253
 
... ...
@@ -257,7 +257,7 @@ grid.text_box = function(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), gp =
257 257
 #
258 258
 # == param
259 259
 # -align_to It controls how the text boxes are aligned to the heatmap rows. The value can be a categorical vector which have the same
260
-#      length as heatmap rows, or a list of row indices.
260
+#      length as heatmap rows, or a list of row indices. It does not necessarily include all row indices.
261 261
 # -text The corresponding texts. The value should be a list of texts. To control graphics parameters of texts in the boxes, The value
262 262
 #    of ``text`` can also be set as a list of data frames where the first column contains the text, from the second column contains
263 263
 #    graphics parameters for each text. The column names should be "col", "fontsize", "fontfamily" and "fontface".
... ...
@@ -265,7 +265,7 @@ grid.text_box = function(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), gp =
265 265
 # -which Only "row" is allowed.
266 266
 # -by Are text boxed arranged by `anno_link` or by `anno_block`?
267 267
 # -side Side of the annotation to the heatmap.
268
-# -... Pass to `text_box_grob`.
268
+# -... Pass to `textbox_grob`.
269 269
 #
270 270
 # == example
271 271
 # require(circlize)
... ...
@@ -278,9 +278,9 @@ grid.text_box = function(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), gp =
278 278
 # names(text) = unique(split)
279 279
 #
280 280
 # Heatmap(mat, cluster_rows = FALSE, row_split = split,
281
-#     right_annotation = rowAnnotation(wc = anno_text_box(split, text))
281
+#     right_annotation = rowAnnotation(wc = anno_textbox(split, text))
282 282
 # )
283
-anno_text_box = function(align_to, text, background_gp = gpar(fill = "#DDDDDD", col = "#AAAAAA"),
283
+anno_textbox = function(align_to, text, background_gp = gpar(fill = "#DDDDDD", col = "#AAAAAA"),
284 284
 	which = c("row", "column"), by = "anno_link", side = c("right", "left"), ...) {
285 285
 
286 286
 	if(is.null(background_gp$fill)) background_gp$fill = "#DDDDDD"
... ...
@@ -290,7 +290,7 @@ anno_text_box = function(align_to, text, background_gp = gpar(fill = "#DDDDDD",
290 290
 
291 291
 	which = match.arg(which)[1]
292 292
 	if(which == "column") {
293
-		stop_wrap("`anno_text_box()` can only be used as row annotation.")
293
+		stop_wrap("`anno_textbox()` can only be used as row annotation.")
294 294
 	}
295 295
 
296 296
 	# 1. align_to numeric index, text: a data frame
... ...
@@ -328,12 +328,12 @@ anno_text_box = function(align_to, text, background_gp = gpar(fill = "#DDDDDD",
328 328
 		stop_wrap("Format of `align_to` or `text` is wrong.")
329 329
 	}
330 330
 
331
-	# a list of text_box grobs
331
+	# a list of textbox grobs
332 332
 	dev.null()
333 333
 	
334 334
 	gbl = lapply(text, function(x) {
335 335
 		if(is.atomic(x)) {
336
-			text_box_grob(text = x, background_gp = gpar(col = NA, fill = "transparent"), ...)
336
+			textbox_grob(text = x, background_gp = gpar(col = NA, fill = "transparent"), ...)
337 337
 		} else if(is.data.frame(x)) {
338 338
 			if("col" %in% colnames(x)) {
339 339
 				col = x$col
... ...
@@ -358,7 +358,7 @@ anno_text_box = function(align_to, text, background_gp = gpar(fill = "#DDDDDD",
358 358
 			} else {
359 359
 				fontface = get.gpar("fontface")[[1]]
360 360
 			}
361
-			text_box_grob(text = x[[1]], gp = gpar(col = col, fontsize = fontsize, fontfamily = fontfamily, fontface = fontface), 
361
+			textbox_grob(text = x[[1]], gp = gpar(col = col, fontsize = fontsize, fontfamily = fontfamily, fontface = fontface), 
362 362
 				background_gp = gpar(col = NA, fill = "transparent"), ...)
363 363
 		}
364 364
 	})
... ...
@@ -247,8 +247,7 @@ GLOBAL_PADDING = unit(rep(5.5, 4), "points")
247 247
 
248 248
 
249 249
 is_under_jupyter = function() {
250
-    s = sessionInfo()
251
-    "IRkernel" %in% c(names(s$otherPkgs), names(s$loadedOnly))
250
+    "IRkernel" %in% loadedNamespaces()
252 251
 }
253 252
 
254 253
 .ENV$IS_UNDER_JUPYTER = FALSE
... ...
@@ -29,9 +29,6 @@ This message can be suppressed by:
29 29
 
30 30
     packageStartupMessage(msg)
31 31
 
32
-
33
-    .ENV$IS_UNDER_JUPYTER = is_under_jupyter()
34
-    .ENV$IS_UNDER_JUPYTER_IGNORE = FALSE
35 32
 }
36 33
 
37 34
 rv = R.Version()
... ...
@@ -15,5 +15,4 @@ method and the \code{\%v\%v} method so that above three classes can be appended
15 15
 \examples{
16 16
 # There is no example
17 17
 NULL
18
-
19 18
 }
... ...
@@ -26,5 +26,4 @@ Zuguang Gu <z.gu@dkfz.de>
26 26
 \examples{
27 27
 # There is no example
28 28
 NULL
29
-
30 29
 }
... ...
@@ -22,5 +22,4 @@ See \code{\link{AnnotationFunction}} constructor for details.
22 22
 \examples{
23 23
 # There is no example
24 24
 NULL
25
-
26 25
 }
... ...
@@ -26,5 +26,4 @@ Zuguang Gu <z.gu@dkfz.de>
26 26
 \examples{
27 27
 # There is no example
28 28
 NULL
29
-
30 29
 }
... ...
@@ -40,5 +40,4 @@ The complete reference of ComplexHeatmap package is available at \url{http://jok
40 40
 \examples{
41 41
 # There is no example
42 42
 NULL
43
-
44 43
 }
... ...
@@ -22,5 +22,4 @@ Internally used.
22 22
 \examples{
23 23
 # There is no example
24 24
 NULL
25
-
26 25
 }
... ...
@@ -30,5 +30,4 @@ Zuguang Gu <z.gu@dkfz.de>
30 30
 \examples{
31 31
 # There is no example
32 32
 NULL
33
-
34 33
 }
... ...
@@ -181,8 +181,8 @@ Heatmap(matrix, col, name,
181 181
   \item{raster_quality}{A value larger than 1.}
182 182
   \item{raster_device_param}{A list of further parameters for the selected graphic device. For raster image support, please check \url{https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#heatmap-as-raster-image} .}
183 183
   \item{raster_resize_mat}{Whether resize the matrix to let the dimension of the matrix the same as the dimension of the raster image? The value can be logical. If it is \code{TRUE}, \code{\link[base]{mean}} is used to summarize the sub matrix which corresponds to a single pixel. The value can also be a summary function, e.g. \code{\link[base:Extremes]{max}}.}
184
-  \item{raster_by_magick}{Whether to use \code{\link[magick:transform]{image_resize}} to scale the image.}
185
-  \item{raster_magick_filter}{Pass to \code{filter} argument of \code{\link[magick:transform]{image_resize}}. A character scalar and all possible values are in \code{\link[magick:options]{filter_types}}. The default is \code{"Lanczos"}.}
184
+  \item{raster_by_magick}{Whether to use \code{\link[magick]{image_resize}} to scale the image.}
185
+  \item{raster_magick_filter}{Pass to \code{filter} argument of \code{\link[magick]{image_resize}}. A character scalar and all possible values are in \code{\link[magick]{filter_types}}. The default is \code{"Lanczos"}.}
186 186
   \item{post_fun}{A function which will be executed after the heatmap list is drawn.}
187 187
 
188 188
 }
... ...
@@ -212,5 +212,4 @@ Zuguang Gu <z.gu@dkfz.de>
212 212
 \examples{
213 213
 # There is no example
214 214
 NULL
215
-
216 215
 }
... ...
@@ -25,5 +25,4 @@ Zuguang Gu <z.gu@dkfz.de>
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -84,5 +84,4 @@ Zuguang Gu <z.gu@dkfz.de>
84 84
 \examples{
85 85
 # There is no example
86 86
 NULL
87
-
88 87
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -26,5 +26,4 @@ Zuguang Gu <z.gu@dkfz.de>
26 26
 \examples{
27 27
 # There is no example
28 28
 NULL
29
-
30 29
 }
... ...
@@ -26,5 +26,4 @@ Zuguang Gu <z.gu@dkfz.de>
26 26
 \examples{
27 27
 # There is no example
28 28
 NULL
29
-
30 29
 }
... ...
@@ -28,5 +28,4 @@ Zuguang Gu <z.gu@dkfz.de>
28 28
 \examples{
29 29
 # There is no example
30 30
 NULL
31
-
32 31
 }
... ...
@@ -40,5 +40,4 @@ Zuguang Gu <z.gu@dkfz.de>
40 40
 \examples{
41 41
 # There is no example
42 42
 NULL
43
-
44 43
 }
... ...
@@ -28,5 +28,4 @@ Zuguang Gu <z.gu@dkfz.de>
28 28
 \examples{
29 29
 # There is no example
30 30
 NULL
31
-
32 31
 }
... ...
@@ -28,5 +28,4 @@ Zuguang Gu <z.gu@dkfz.de>
28 28
 \examples{
29 29
 # There is no example
30 30
 NULL
31
-
32 31
 }
... ...
@@ -28,5 +28,4 @@ Zuguang Gu <z.gu@dkfz.de>
28 28
 \examples{
29 29
 # There is no example
30 30
 NULL
31
-
32 31
 }
... ...
@@ -10,9 +10,9 @@ Method dispatch page for \code{add_heatmap}.
10 10
 \code{add_heatmap} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
-\item \code{\link{add_heatmap,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
14
-\item \code{\link{add_heatmap,Heatmap-method}}, \code{\link{Heatmap-class}} class method
15 13
 \item \code{\link{add_heatmap,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
14
+\item \code{\link{add_heatmap,Heatmap-method}}, \code{\link{Heatmap-class}} class method
15
+\item \code{\link{add_heatmap,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
16 16
 }
17 17
 }
18 18
 \examples{
... ...
@@ -1,6 +1,5 @@
1 1
 \name{adjust_heatmap_list-HeatmapList-method}
2 2
 \alias{adjust_heatmap_list,HeatmapList-method}
3
-\alias{adjust_heatmap_list}
4 3
 \title{
5 4
 Adjust Heatmap List
6 5
 }
... ...
@@ -24,8 +23,8 @@ This function is only for internal use.
24 23
 \author{
25 24
 Zuguang Gu <z.gu@dkfz.de>
26 25
 }
26
+\alias{adjust_heatmap_list}
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -20,5 +20,4 @@ This function is the same as \code{\link{anno_zoom}}. It links subsets of rows o
20 20
 \examples{
21 21
 # There is no example
22 22
 NULL
23
-
24 23
 }
... ...
@@ -36,5 +36,4 @@ Zuguang Gu <z.gu@dkfz.de>
36 36
 \examples{
37 37
 # There is no example
38 38
 NULL
39
-
40 39
 }
41 40
similarity index 84%
42 41
rename from man/anno_text_box.Rd
43 42
rename to man/anno_textbox.Rd
... ...
@@ -1,5 +1,5 @@
1
-\name{anno_text_box}
2
-\alias{anno_text_box}
1
+\name{anno_textbox}
2
+\alias{anno_textbox}
3 3
 \title{
4 4
 Text box annotations
5 5
 }
... ...
@@ -7,7 +7,7 @@ Text box annotations
7 7
 Text box annotations
8 8
 }
9 9
 \usage{
10
-anno_text_box(align_to, text, background_gp = gpar(fill = "#DDDDDD", col = "#AAAAAA"),
10
+anno_textbox(align_to, text, background_gp = gpar(fill = "#DDDDDD", col = "#AAAAAA"),
11 11
     which = c("row", "column"), by = "anno_link", side = c("right", "left"), ...)
12 12
 }
13 13
 \arguments{
... ...
@@ -18,7 +18,7 @@ anno_text_box(align_to, text, background_gp = gpar(fill = "#DDDDDD", col = "#AAA
18 18
   \item{which}{Only "row" is allowed.}
19 19
   \item{by}{Are text boxed arranged by \code{\link{anno_link}} or by \code{\link{anno_block}}?}
20 20
   \item{side}{Side of the annotation to the heatmap.}
21
-  \item{...}{Pass to \code{\link{text_box_grob}}.}
21
+  \item{...}{Pass to \code{\link{textbox_grob}}.}
22 22
 
23 23
 }
24 24
 \examples{
... ...
@@ -32,6 +32,6 @@ text = lapply(unique(split), function(x) {
32 32
 names(text) = unique(split)
33 33
 
34 34
 Heatmap(mat, cluster_rows = FALSE, row_split = split,
35
-    right_annotation = rowAnnotation(wc = anno_text_box(split, text))
35
+    right_annotation = rowAnnotation(wc = anno_textbox(split, text))
36 36
 )
37 37
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{annotation_legend_size-HeatmapList-method}
2 2
 \alias{annotation_legend_size,HeatmapList-method}
3
-\alias{annotation_legend_size}
4 3
 \title{
5 4
 Size of the Annotation Legends
6 5
 }
... ...
@@ -28,8 +27,8 @@ A \code{\link[grid]{unit}} object.
28 27
 \author{
29 28
 Zuguang Gu <z.gu@dkfz.de>
30 29
 }
30
+\alias{annotation_legend_size}
31 31
 \examples{
32 32
 # There is no example
33 33
 NULL
34
-
35 34
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{attach_annotation-Heatmap-method}
2 2
 \alias{attach_annotation,Heatmap-method}
3
-\alias{attach_annotation}
4 3
 \title{
5 4
 Attach heatmap annotations to the heatmap
6 5
 }
... ...
@@ -29,3 +28,4 @@ ha2 = HeatmapAnnotation(bar = letters[1:10])
29 28
 ht = attach_annotation(ht, ha2)
30 29
 ht
31 30
 }
31
+\alias{attach_annotation}
... ...
@@ -23,5 +23,4 @@ A \code{\link[GenomicRanges:GRanges-class]{GRanges}} object of the genomic bins.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{color_mapping_legend-ColorMapping-method}
2 2
 \alias{color_mapping_legend,ColorMapping-method}
3
-\alias{color_mapping_legend}
4 3
 \title{
5 4
 Draw Legend Based on Color Mapping
6 5
 }
... ...
@@ -70,8 +69,8 @@ A \code{\link{Legends-class}} object.
70 69
 \author{
71 70
 Zuguang Gu <z.gu@dkfz.de>
72 71
 }
72
+\alias{color_mapping_legend}
73 73
 \examples{
74 74
 # There is no example
75 75
 NULL
76
-
77 76
 }
... ...
@@ -29,5 +29,4 @@ Zuguang Gu <z.gu@dkfz.de>
29 29
 \examples{
30 30
 # There is no example
31 31
 NULL
32
-
33 32
 }
... ...
@@ -10,8 +10,8 @@ Method dispatch page for \code{column_order}.
10 10
 \code{column_order} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
-\item \code{\link{column_order,Heatmap-method}}, \code{\link{Heatmap-class}} class method
14 13
 \item \code{\link{column_order,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
14
+\item \code{\link{column_order,Heatmap-method}}, \code{\link{Heatmap-class}} class method
15 15
 }
16 16
 }
17 17
 \examples{
... ...
@@ -20,5 +20,4 @@ If there is no complement set, it returns zero.
20 20
 \examples{
21 21
 # There is no example
22 22
 NULL
23
-
24 23
 }
... ...
@@ -31,5 +31,4 @@ Zuguang Gu <z.gu@dkfz.de>
31 31
 \examples{
32 32
 # There is no example
33 33
 NULL
34
-
35 34
 }
... ...
@@ -24,5 +24,4 @@ Zuguang Gu <z.gu@dkfz.de>
24 24
 \examples{
25 25
 # There is no example
26 26
 NULL
27
-
28 27
 }
... ...
@@ -10,8 +10,8 @@ Method dispatch page for \code{component_height}.
10 10
 \code{component_height} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
-\item \code{\link{component_height,Heatmap-method}}, \code{\link{Heatmap-class}} class method
14 13
 \item \code{\link{component_height,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
14
+\item \code{\link{component_height,Heatmap-method}}, \code{\link{Heatmap-class}} class method
15 15
 }
16 16
 }
17 17
 \examples{
... ...
@@ -30,5 +30,4 @@ Zuguang Gu <z.gu@dkfz.de>
30 30
 \examples{
31 31
 # There is no example
32 32
 NULL
33
-
34 33
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -26,5 +26,4 @@ The environment is at \code{object@var_env}.
26 26
 \examples{
27 27
 # There is no example
28 28
 NULL
29
-
30 29
 }
... ...
@@ -21,5 +21,4 @@ it calls \code{\link{copy_all,AnnotationFunction-method}} to hard copy the varia
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -20,5 +20,4 @@ It recognizes following separators: \code{;:,|}.
20 20
 \examples{
21 21
 # There is no example
22 22
 NULL
23
-
24 23
 }
... ...
@@ -17,5 +17,4 @@ dend_heights(x)
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -28,5 +28,4 @@ A \code{\link{grob}} object which is contructed by \code{\link[grid:grid.segment
28 28
 \examples{
29 29
 # There is no example
30 30
 NULL
31
-
32 31
 }
... ...
@@ -17,5 +17,4 @@ Dimension of the Heatmap
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -28,5 +28,4 @@ which is generally for testing purpose.
28 28
 \examples{
29 29
 # There is no example
30 30
 NULL
31
-
32 31
 }
... ...
@@ -33,5 +33,4 @@ Zuguang Gu <z.gu@dkfz.de>
33 33
 \examples{
34 34
 # There is no example
35 35
 NULL
36
-
37 36
 }
... ...
@@ -30,5 +30,4 @@ Zuguang Gu <z.gu@dkfz.de>
30 30
 \examples{
31 31
 # There is no example
32 32
 NULL
33
-
34 33
 }
... ...
@@ -209,5 +209,4 @@ Zuguang Gu <z.gu@dkfz.de>
209 209
 \examples{
210 210
 # There is no example
211 211
 NULL
212
-
213 212
 }
... ...
@@ -29,5 +29,4 @@ Zuguang Gu <z.gu@dkfz.de>
29 29
 \examples{
30 30
 # There is no example
31 31
 NULL
32
-
33 32
 }
... ...
@@ -10,11 +10,11 @@ Method dispatch page for \code{draw}.
10 10
 \code{draw} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
-\item \code{\link{draw,AnnotationFunction-method}}, \code{\link{AnnotationFunction-class}} class method
14 13
 \item \code{\link{draw,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
15
-\item \code{\link{draw,Legends-method}}, \code{\link{Legends-class}} class method
16 14
 \item \code{\link{draw,Heatmap-method}}, \code{\link{Heatmap-class}} class method
17 15
 \item \code{\link{draw,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
16
+\item \code{\link{draw,Legends-method}}, \code{\link{Legends-class}} class method
17
+\item \code{\link{draw,AnnotationFunction-method}}, \code{\link{AnnotationFunction-class}} class method
18 18
 \item \code{\link{draw,SingleAnnotation-method}}, \code{\link{SingleAnnotation-class}} class method
19 19
 }
20 20
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{draw_annotation-Heatmap-method}
2 2
 \alias{draw_annotation,Heatmap-method}
3
-\alias{draw_annotation}
4 3
 \title{
5 4
 Draw Heatmap Annotations on the Heatmap
6 5
 }
... ...
@@ -31,8 +30,8 @@ This function returns no value.
31 30
 \author{
32 31
 Zuguang Gu <z.gu@dkfz.de>
33 32
 }
33
+\alias{draw_annotation}
34 34
 \examples{
35 35
 # There is no example
36 36
 NULL
37
-
38 37
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{draw_annotation_legend-HeatmapList-method}
2 2
 \alias{draw_annotation_legend,HeatmapList-method}
3
-\alias{draw_annotation_legend}
4 3
 \title{
5 4
 Draw legends for All Annotations
6 5
 }
... ...
@@ -32,8 +31,8 @@ This function returns no value.
32 31
 \author{
33 32
 Zuguang Gu <z.gu@dkfz.de>
34 33
 }
34
+\alias{draw_annotation_legend}
35 35
 \examples{
36 36
 # There is no example
37 37
 NULL
38
-
39 38
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{draw_dend-Heatmap-method}
2 2
 \alias{draw_dend,Heatmap-method}
3
-\alias{draw_dend}
4 3
 \title{
5 4
 Draw Heatmap Dendrograms
6 5
 }
... ...
@@ -34,8 +33,8 @@ This function returns no value.
34 33
 \author{
35 34
 Zuguang Gu <z.gu@dkfz.de>
36 35
 }
36
+\alias{draw_dend}
37 37
 \examples{
38 38
 # There is no example
39 39
 NULL
40
-
41 40
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{draw_dimnames-Heatmap-method}
2 2
 \alias{draw_dimnames,Heatmap-method}
3
-\alias{draw_dimnames}
4 3
 \title{
5 4
 Draw row names or column names
6 5
 }
... ...
@@ -30,8 +29,8 @@ This function returns no value.
30 29
 \author{
31 30
 Zuguang Gu <z.gu@dkfz.de>
32 31
 }
32
+\alias{draw_dimnames}
33 33
 \examples{
34 34
 # There is no example
35 35
 NULL
36
-
37 36
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{draw_heatmap_body-Heatmap-method}
2 2
 \alias{draw_heatmap_body,Heatmap-method}
3
-\alias{draw_heatmap_body}
4 3
 \title{
5 4
 Draw Heatmap Body
6 5
 }
... ...
@@ -29,8 +28,8 @@ This function returns no value.
29 28
 \author{
30 29
 Zuguang Gu <z.gu@dkfz.de>
31 30
 }
31
+\alias{draw_heatmap_body}
32 32
 \examples{
33 33
 # There is no example
34 34
 NULL
35
-
36 35
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{draw_heatmap_legend-HeatmapList-method}
2 2
 \alias{draw_heatmap_legend,HeatmapList-method}
3
-\alias{draw_heatmap_legend}
4 3
 \title{
5 4
 Draw legends for All Heatmaps
6 5
 }
... ...
@@ -33,8 +32,8 @@ This function returns no value.
33 32
 \author{
34 33
 Zuguang Gu <z.gu@dkfz.de>
35 34
 }
35
+\alias{draw_heatmap_legend}
36 36
 \examples{
37 37
 # There is no example
38 38
 NULL
39
-
40 39
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{draw_heatmap_list-HeatmapList-method}
2 2
 \alias{draw_heatmap_list,HeatmapList-method}
3
-\alias{draw_heatmap_list}
4 3
 \title{
5 4
 Draw the List of Heatmaps
6 5
 }
... ...
@@ -26,8 +25,8 @@ This function returns no value.
26 25
 \author{
27 26
 Zuguang Gu <z.gu@dkfz.de>
28 27
 }
28
+\alias{draw_heatmap_list}
29 29
 \examples{
30 30
 # There is no example
31 31
 NULL
32
-
33 32
 }
... ...
@@ -32,5 +32,4 @@ Zuguang Gu <z.gu@dkfz.de>
32 32
 \examples{
33 33
 # There is no example
34 34
 NULL
35
-
36 35
 }
... ...
@@ -30,5 +30,4 @@ Zuguang Gu <z.gu@dkfz.de>
30 30
 \examples{
31 31
 # There is no example
32 32
 NULL
33
-
34 33
 }
... ...
@@ -10,8 +10,8 @@ Method dispatch page for \code{draw_title}.
10 10
 \code{draw_title} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
-\item \code{\link{draw_title,Heatmap-method}}, \code{\link{Heatmap-class}} class method
14 13
 \item \code{\link{draw_title,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
14
+\item \code{\link{draw_title,Heatmap-method}}, \code{\link{Heatmap-class}} class method
15 15
 }
16 16
 }
17 17
 \examples{
... ...
@@ -1,6 +1,5 @@
1 1
 \name{get_color_mapping_list-HeatmapAnnotation-method}
2 2
 \alias{get_color_mapping_list,HeatmapAnnotation-method}
3
-\alias{get_color_mapping_list}
4 3
 \title{
5 4
 Get a List of ColorMapping objects
6 5
 }
... ...
@@ -26,8 +25,8 @@ A list of \code{\link{ColorMapping-class}} objects or an empty list.
26 25
 \author{
27 26
 Zuguang Gu <z.gu@dkfz.de>
28 27
 }
28
+\alias{get_color_mapping_list}
29 29
 \examples{
30 30
 # There is no example
31 31
 NULL
32
-
33 32
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{get_legend_param_list-HeatmapAnnotation-method}
2 2
 \alias{get_legend_param_list,HeatmapAnnotation-method}
3
-\alias{get_legend_param_list}
4 3
 \title{
5 4
 Get a List of Annotation Legend Parameters
6 5
 }
... ...
@@ -26,8 +25,8 @@ A list.
26 25
 \author{
27 26
 Zuguang Gu <z.gu@dkfz.de>
28 27
 }
28
+\alias{get_legend_param_list}
29 29
 \examples{
30 30
 # There is no example
31 31
 NULL
32
-
33 32
 }
34 33
similarity index 57%
35 34
rename from man/grid.text_box.Rd
36 35
rename to man/grid.textbox.Rd
... ...
@@ -1,5 +1,5 @@
1
-\name{grid.text_box}
2
-\alias{grid.text_box}
1
+\name{grid.textbox}
2
+\alias{grid.textbox}
3 3
 \title{
4 4
 Draw multiple texts in a box
5 5
 }
... ...
@@ -7,7 +7,7 @@ Draw multiple texts in a box
7 7
 Draw multiple texts in a box
8 8
 }
9 9
 \usage{
10
-grid.text_box(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), gp = gpar(), ...)
10
+grid.textbox(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), gp = gpar(), ...)
11 11
 }
12 12
 \arguments{
13 13
 
... ...
@@ -15,14 +15,13 @@ grid.text_box(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), gp = gpar(), ...
15 15
   \item{x}{X position.}
16 16
   \item{y}{Y position.}
17 17
   \item{gp}{Graphics parameters of texts.}
18
-  \item{...}{Pass to \code{\link{text_box_grob}}.}
18
+  \item{...}{Pass to \code{\link{textbox_grob}}.}
19 19
 
20 20
 }
21 21
 \details{
22
-All details can be found in the help page of \code{\link{text_box_grob}}.
22
+All details can be found in the help page of \code{\link{textbox_grob}}.
23 23
 }
24 24
 \examples{
25 25
 # There is no example
26 26
 NULL
27
-
28 27
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{heatmap_legend_size-HeatmapList-method}
2 2
 \alias{heatmap_legend_size,HeatmapList-method}
3
-\alias{heatmap_legend_size}
4 3
 \title{
5 4
 Size of the Heatmap Legends
6 5
 }
... ...
@@ -28,8 +27,8 @@ A \code{\link[grid]{unit}} object.
28 27
 \author{
29 28
 Zuguang Gu <z.gu@dkfz.de>
30 29
 }
30
+\alias{heatmap_legend_size}
31 31
 \examples{
32 32
 # There is no example
33 33
 NULL
34
-
35 34
 }
... ...
@@ -18,5 +18,4 @@ Height of the Heatmap
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -21,5 +21,4 @@ Internally used.
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -18,5 +18,4 @@ Height of the Heatmap List
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -21,5 +21,4 @@ Internally used.
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -23,5 +23,4 @@ Internally used.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -23,5 +23,4 @@ Internally used.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -23,5 +23,4 @@ Internally used.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -20,5 +20,4 @@ The physical height of the grob can be get by \code{convertWidth(grobHeight(axis
20 20
 \examples{
21 21
 # There is no example
22 22
 NULL
23
-
24 23
 }
... ...
@@ -17,5 +17,4 @@ Grob height for packed_legends
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -17,5 +17,4 @@ Grob height for legend_body
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -17,5 +17,4 @@ Grob height for packed_legends
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
22 21
deleted file mode 100644
... ...
@@ -1,24 +0,0 @@
1
-\name{heightDetails.text_box}
2
-\alias{heightDetails.text_box}
3
-\title{
4
-Height for text_box grob
5
-}
6
-\description{
7
-Height for text_box grob
8
-}
9
-\usage{
10
-\method{heightDetails}{text_box}(x)
11
-}
12
-\arguments{
13
-
14
-  \item{x}{The \code{text_box} grob returned by \code{\link{text_box_grob}}.}
15
-
16
-}
17
-\value{
18
-A \code{\link[grid]{unit}} object.
19
-}
20
-\examples{
21
-# There is no example
22
-NULL
23
-
24
-}
25 0
new file mode 100644
... ...
@@ -0,0 +1,23 @@
1
+\name{heightDetails.textbox}
2
+\alias{heightDetails.textbox}
3
+\title{
4
+Height for textbox grob
5
+}
6
+\description{
7
+Height for textbox grob
8
+}
9
+\usage{
10
+\method{heightDetails}{textbox}(x)
11
+}
12
+\arguments{
13
+
14
+  \item{x}{The \code{textbox} grob returned by \code{\link{textbox_grob}}.}
15
+
16
+}
17
+\value{
18
+A \code{\link[grid]{unit}} object.
19
+}
20
+\examples{
21
+# There is no example
22
+NULL
23
+}
... ...
@@ -25,5 +25,4 @@ will also be sychronized in \code{\link{ht_opt}}.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -20,5 +20,4 @@ A list of two elements: width and height.
20 20
 \examples{
21 21
 # There is no example
22 22
 NULL
23
-
24 23
 }
... ...
@@ -17,5 +17,4 @@ Number of Annotations
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -17,5 +17,4 @@ Length of the HeatmapList object
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -20,5 +20,4 @@ A vector of viewport names.
20 20
 \examples{
21 21
 # There is no example
22 22
 NULL
23
-
24 23
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{make_column_cluster-Heatmap-method}
2 2
 \alias{make_column_cluster,Heatmap-method}
3
-\alias{make_column_cluster}
4 3
 \title{
5 4
 Make Cluster on Columns
6 5
 }
... ...
@@ -29,8 +28,8 @@ A \code{\link{Heatmap-class}} object.
29 28
 \author{
30 29
 Zuguang Gu <z.gu@dkfz.de>
31 30
 }
31
+\alias{make_column_cluster}
32 32
 \examples{
33 33
 # There is no example
34 34
 NULL
35
-
36 35
 }
... ...
@@ -32,5 +32,4 @@ Zuguang Gu <z.gu@dkfz.de>
32 32
 \examples{
33 33
 # There is no example
34 34
 NULL
35
-
36 35
 }
... ...
@@ -155,5 +155,4 @@ Zuguang Gu <z.gu@dkfz.de>
155 155
 \examples{
156 156
 # There is no example
157 157
 NULL
158
-
159 158
 }
... ...
@@ -10,8 +10,8 @@ Method dispatch page for \code{make_layout}.
10 10
 \code{make_layout} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
-\item \code{\link{make_layout,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
14 13
 \item \code{\link{make_layout,Heatmap-method}}, \code{\link{Heatmap-class}} class method
14
+\item \code{\link{make_layout,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
15 15
 }
16 16
 }
17 17
 \examples{
... ...
@@ -1,6 +1,5 @@
1 1
 \name{make_row_cluster-Heatmap-method}
2 2
 \alias{make_row_cluster,Heatmap-method}
3
-\alias{make_row_cluster}
4 3
 \title{
5 4
 Make Cluster on Rows
6 5
 }
... ...
@@ -28,8 +27,8 @@ A \code{\link{Heatmap-class}} object.
28 27
 \author{
29 28
 Zuguang Gu <z.gu@dkfz.de>
30 29
 }
30
+\alias{make_row_cluster}
31 31
 \examples{
32 32
 # There is no example
33 33
 NULL
34
-
35 34
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{map_to_colors-ColorMapping-method}
2 2
 \alias{map_to_colors,ColorMapping-method}
3
-\alias{map_to_colors}
4 3
 \title{
5 4
 Map Values to Colors
6 5
 }
... ...
@@ -35,3 +34,4 @@ col_fun = colorRamp2(c(0, 1), c("white", "red"))
35 34
 cm = ColorMapping(col_fun = col_fun)
36 35
 map_to_colors(cm, runif(10))
37 36
 }
37
+\alias{map_to_colors}
... ...
@@ -17,5 +17,4 @@ Names of the heatmaps/annotations
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -17,5 +17,4 @@ Number of Columns in the Heatmap
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -22,5 +22,4 @@ it returns \code{NA}.
22 22
 \examples{
23 23
 # There is no example
24 24
 NULL
25
-
26 25
 }
... ...
@@ -21,5 +21,4 @@ It returns the \code{n} slot of the annotaton function. If it does not exist, it
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -24,5 +24,4 @@ The sets (by \code{\link{set_name}}) from all combination matrice should be the
24 24
 \examples{
25 25
 # There is no example
26 26
 NULL
27
-
28 27
 }
... ...
@@ -17,5 +17,4 @@ Number of Rows in the Heatmap
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -95,5 +95,4 @@ Zuguang Gu <z.gu@dkfz.de>
95 95
 \examples{
96 96
 # There is no example
97 97
 NULL
98
-
99 98
 }
... ...
@@ -23,5 +23,4 @@ by the combination matrix.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -39,5 +39,4 @@ Zuguang Gu <z.gu@dkfz.de>
39 39
 \examples{
40 40
 # There is no example
41 41
 NULL
42
-
43 42
 }
... ...
@@ -148,5 +148,4 @@ A \code{\link{Heatmap-class}} object.
148 148
 \examples{
149 149
 # There is no example
150 150
 NULL
151
-
152 151
 }
... ...
@@ -18,5 +18,4 @@ Draw heatmap
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -18,5 +18,4 @@ Draw heatmap annotations
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -18,5 +18,4 @@ Draw heatmap
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{prepare-Heatmap-method}
2 2
 \alias{prepare,Heatmap-method}
3
-\alias{prepare}
4 3
 \title{
5 4
 Prepare the Heatmap
6 5
 }
... ...
@@ -34,8 +33,8 @@ The \code{\link{Heatmap-class}} object.
34 33
 \author{
35 34
 Zuguang Gu <z.gu@dkfz.de>
36 35
 }
36
+\alias{prepare}
37 37
 \examples{
38 38
 # There is no example
39 39
 NULL
40
-
41 40
 }
... ...
@@ -18,5 +18,4 @@ Print the comb_mat Object
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{re_size-HeatmapAnnotation-method}
2 2
 \alias{re_size,HeatmapAnnotation-method}
3
-\alias{re_size}
4 3
 \title{
5 4
 Resize the Width or Height of Heatmap Annotations
6 5
 }
... ...
@@ -42,8 +41,8 @@ The basic rules are (take \code{height} and \code{annotation_height} for example
42 41
      and \code{simple_anno_size} is disabled.
43 42
 6. If \code{simple_anno_size_adjust} is \code{FALSE}, the size of the simple annotations will not change.
44 43
 }
44
+\alias{re_size}
45 45
 \examples{
46 46
 # There is no example
47 47
 NULL
48
-
49 48
 }
... ...
@@ -29,5 +29,4 @@ Zuguang Gu <z.gu@dkfz.de>
29 29
 \examples{
30 30
 # There is no example
31 31
 NULL
32
-
33 32
 }
... ...
@@ -25,5 +25,4 @@ See help page of \code{\link{anno_barplot}}.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -25,5 +25,4 @@ See help page of \code{\link{anno_boxplot}}.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -25,5 +25,4 @@ See help page of \code{\link{anno_density}}.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -25,5 +25,4 @@ See help page of \code{\link{anno_histogram}}.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -25,5 +25,4 @@ See help page of \code{\link{anno_points}}.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -25,5 +25,4 @@ See help page of \code{\link{anno_text}}.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -10,8 +10,8 @@ Method dispatch page for \code{row_dend}.
10 10
 \code{row_dend} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
-\item \code{\link{row_dend,Heatmap-method}}, \code{\link{Heatmap-class}} class method
14 13
 \item \code{\link{row_dend,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
14
+\item \code{\link{row_dend,Heatmap-method}}, \code{\link{Heatmap-class}} class method
15 15
 }
16 16
 }
17 17
 \examples{
... ...
@@ -10,8 +10,8 @@ Method dispatch page for \code{row_order}.
10 10
 \code{row_order} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
-\item \code{\link{row_order,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
14 13
 \item \code{\link{row_order,Heatmap-method}}, \code{\link{Heatmap-class}} class method
14
+\item \code{\link{row_order,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
15 15
 }
16 16
 }
17 17
 \examples{
... ...
@@ -1,6 +1,5 @@
1 1
 \name{set_component_height-Heatmap-method}
2 2
 \alias{set_component_height,Heatmap-method}
3
-\alias{set_component_height}
4 3
 \title{
5 4
 Set Height of Heatmap Component
6 5
 }
... ...
@@ -30,8 +29,8 @@ The \code{\link{Heatmap-class}} object.
30 29
 \author{
31 30
 Zuguang Gu <z.gu@dkfz.de>
32 31
 }
32
+\alias{set_component_height}
33 33
 \examples{
34 34
 # There is no example
35 35
 NULL
36
-
37 36
 }
... ...
@@ -1,6 +1,5 @@
1 1
 \name{set_component_width-Heatmap-method}
2 2
 \alias{set_component_width,Heatmap-method}
3
-\alias{set_component_width}
4 3
 \title{
5 4
 Set Width of Heatmap Component
6 5
 }
... ...
@@ -29,8 +28,8 @@ The \code{\link{Heatmap-class}} object.
29 28
 \author{
30 29
 Zuguang Gu <z.gu@dkfz.de>
31 30
 }
31
+\alias{set_component_width}
32 32
 \examples{
33 33
 # There is no example
34 34
 NULL
35
-
36 35
 }
... ...
@@ -17,5 +17,4 @@ Print the AnnotationFunction Object
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -23,5 +23,4 @@ Zuguang Gu <z.gu@dkfz.de>
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -23,5 +23,4 @@ Zuguang Gu <z.gu@dkfz.de>
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -24,5 +24,4 @@ This function returns no value.
24 24
 \examples{
25 25
 # There is no example
26 26
 NULL
27
-
28 27
 }
... ...
@@ -23,5 +23,4 @@ Zuguang Gu <z.gu@dkfz.de>
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -10,12 +10,12 @@ Method dispatch page for \code{show}.
10 10
 \code{show} can be dispatched on following classes:
11 11
 
12 12
 \itemize{
13
+\item \code{\link{show,AnnotationFunction-method}}, \code{\link{AnnotationFunction-class}} class method
13 14
 \item \code{\link{show,SingleAnnotation-method}}, \code{\link{SingleAnnotation-class}} class method
14
-\item \code{\link{show,ColorMapping-method}}, \code{\link{ColorMapping-class}} class method
15 15
 \item \code{\link{show,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
16
-\item \code{\link{show,Heatmap-method}}, \code{\link{Heatmap-class}} class method
17
-\item \code{\link{show,AnnotationFunction-method}}, \code{\link{AnnotationFunction-class}} class method
16
+\item \code{\link{show,ColorMapping-method}}, \code{\link{ColorMapping-class}} class method
18 17
 \item \code{\link{show,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
18
+\item \code{\link{show,Heatmap-method}}, \code{\link{Heatmap-class}} class method
19 19
 }
20 20
 }
21 21
 \examples{
... ...
@@ -23,5 +23,4 @@ Internally used.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -23,5 +23,4 @@ Internally used.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -25,5 +25,4 @@ Internally used.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -25,5 +25,4 @@ Internally used.
25 25
 \examples{
26 26
 # There is no example
27 27
 NULL
28
-
29 28
 }
... ...
@@ -18,5 +18,4 @@ str method
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -21,5 +21,4 @@ Mainly used for constructing the \code{\link{AnnotationFunction-class}} object.
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -21,5 +21,4 @@ Mainly used for constructing the \code{\link{AnnotationFunction-class}} object.
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -21,5 +21,4 @@ Mainly used for constructing the \code{\link{AnnotationFunction-class}} object.
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -18,5 +18,4 @@ Print the Summary of a Heatmap
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -18,5 +18,4 @@ Summary of a Heatmap List
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
23 22
similarity index 88%
24 23
rename from man/text_box_grob.Rd
25 24
rename to man/textbox_grob.Rd
... ...
@@ -1,5 +1,5 @@
1
-\name{text_box_grob}
2
-\alias{text_box_grob}
1
+\name{textbox_grob}
2
+\alias{textbox_grob}
3 3
 \title{
4 4
 A simple grob for the word cloud
5 5
 }
... ...
@@ -7,7 +7,7 @@ A simple grob for the word cloud
7 7
 A simple grob for the word cloud
8 8
 }
9 9
 \usage{
10
-text_box_grob(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), just = "centre",
10
+textbox_grob(text, x = unit(0.5, "npc"), y = unit(0.5, "npc"), just = "centre",
11 11
     gp = gpar(), background_gp = gpar(col = "black", fill = "transparent"), round_corners = FALSE, r = unit(0.1, "snpc"),
12 12
     line_space = unit(4, "pt"), text_space = unit(4, "pt"), max_width = unit(100, "mm"),
13 13
     padding = unit(4, "pt"), first_text_from = "top", add_new_line = FALSE, word_wrap = FALSE)
... ...
@@ -37,11 +37,11 @@ A \code{\link[grid:grid.grob]{grob}} object. The width and height of the grob ca
37 37
 \examples{
38 38
 words = sapply(1:30, function(x) strrep(sample(letters, 1), sample(3:10, 1)))
39 39
 grid.newpage()
40
-grid.text_box(words, gp = gpar(fontsize = runif(30, min = 5, max = 30)))
40
+grid.textbox(words, gp = gpar(fontsize = runif(30, min = 5, max = 30)))
41 41
 
42 42
 sentenses = c("This is sentense 1", "This is a long long long long long long long sentense.")
43 43
 grid.newpage()
44
-grid.text_box(sentenses)
45
-grid.text_box(sentenses, word_wrap = TRUE)
46
-grid.text_box(sentenses, word_wrap = TRUE, add_new_line = TRUE)
44
+grid.textbox(sentenses)
45
+grid.textbox(sentenses, word_wrap = TRUE)
46
+grid.textbox(sentenses, word_wrap = TRUE, add_new_line = TRUE)
47 47
 }
... ...
@@ -27,5 +27,4 @@ Zuguang Gu <z.gu@dkfz.de>
27 27
 \examples{
28 28
 # There is no example
29 29
 NULL
30
-
31 30
 }
... ...
@@ -35,5 +35,4 @@ upset_left_annotation(m,
35 35
 \examples{
36 36
 # There is no example
37 37
 NULL
38
-
39 38
 }
... ...
@@ -41,5 +41,4 @@ and if under the union mode, it is \code{union_size}.
41 41
 \examples{
42 42
 # There is no example
43 43
 NULL
44
-
45 44
 }
... ...
@@ -41,5 +41,4 @@ and if under the union mode, it is \code{union_size}.
41 41
 \examples{
42 42
 # There is no example
43 43
 NULL
44
-
45 44
 }
... ...
@@ -18,5 +18,4 @@ Width of the Heatmap
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -21,5 +21,4 @@ Internally used.
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -18,5 +18,4 @@ Width of the Heatmap List
18 18
 \examples{
19 19
 # There is no example
20 20
 NULL
21
-
22 21
 }
... ...
@@ -21,5 +21,4 @@ Internally used.
21 21
 \examples{
22 22
 # There is no example
23 23
 NULL
24
-
25 24
 }
... ...
@@ -23,5 +23,4 @@ Internally used.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -23,5 +23,4 @@ Internally used.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -23,5 +23,4 @@ Internally used.
23 23
 \examples{
24 24
 # There is no example
25 25
 NULL
26
-
27 26
 }
... ...
@@ -20,5 +20,4 @@ The physical width of the grob can be get by \code{convertWidth(grobWidth(axis_g
20 20
 \examples{
21 21
 # There is no example
22 22
 NULL
23
-
24 23
 }
... ...
@@ -17,5 +17,4 @@ Grob width for packed_legends
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -17,5 +17,4 @@ Grob width for legend_body
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
... ...
@@ -17,5 +17,4 @@ Grob width for packed_legends
17 17
 \examples{
18 18
 # There is no example
19 19
 NULL
20
-
21 20
 }
22 21
deleted file mode 100644
... ...
@@ -1,24 +0,0 @@
1
-\name{widthDetails.text_box}
2
-\alias{widthDetails.text_box}
3
-\title{
4
-Width for text_box grob
5
-}
6
-\description{
7
-Width for text_box grob
8
-}
9
-\usage{
10
-\method{widthDetails}{text_box}(x)
11
-}
12
-\arguments{
13
-
14
-  \item{x}{The \code{text_box} grob returned by \code{\link{text_box_grob}}.}
15
-
16
-}
17
-\value{
18
-A \code{\link[grid]{unit}} object.
19
-}
20
-\examples{
21
-# There is no example
22
-NULL
23
-
24
-}
25 0
new file mode 100644
... ...
@@ -0,0 +1,23 @@
1
+\name{widthDetails.textbox}
2
+\alias{widthDetails.textbox}
3
+\title{
4
+Width for textbox grob
5
+}
6
+\description{
7
+Width for textbox grob
8
+}
9
+\usage{
10
+\method{widthDetails}{textbox}(x)
11
+}
12
+\arguments{
13
+
14
+  \item{x}{The \code{textbox} grob returned by \code{\link{textbox_grob}}.}
15
+
16
+}
17
+\value{
18
+A \code{\link[grid]{unit}} object.
19
+}
20
+\examples{
21
+# There is no example
22
+NULL
23
+}
0 24
new file mode 100644
... ...
@@ -0,0 +1,23 @@
1
+words = sapply(1:30, function(x) strrep(sample(letters, 1), sample(3:10, 1)))
2
+grid.newpage()
3
+grid.textbox(words, gp = gpar(fontsize = runif(30, min = 5, max = 30)))
4
+
5
+sentenses = c("This is sentense 1", "This is a long long long long long long long sentense.")
6
+grid.newpage()
7
+grid.textbox(sentenses)
8
+grid.textbox(sentenses, word_wrap = TRUE)
9
+grid.textbox(sentenses, word_wrap = TRUE, add_new_line = TRUE)
10
+
11
+
12
+require(circlize)
13
+mat = matrix(rnorm(100*10), nrow = 100)
14
+
15
+split = sample(letters[1:10], 100, replace = TRUE)
16
+text = lapply(unique(split), function(x) {
17
+	data.frame(month.name, col = rand_color(12, friendly = TRUE), fontsize = runif(12, 6, 14))
18
+})
19
+names(text) = unique(split)
20
+
21
+Heatmap(mat, cluster_rows = FALSE, row_split = split,
22
+    right_annotation = rowAnnotation(wc = anno_textbox(split, text))
23
+)