Browse code

Commit made by the Bioconductor Git-SVN bridge.

Commit id: 1682e4aed696b8fa901530ebc6b9d67ad2a013ad

refresh documentations and NAMESPACE



git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@105345 bc3139a8-67e5-0310-9ffc-ced21a209358

z.gu authored on 22/06/2015 21:57:04
Showing 72 changed files

... ...
@@ -44,7 +44,6 @@ exportMethods(make_row_cluster)
44 44
 export(AdditiveUnit)
45 45
 exportMethods(component_width)
46 46
 exportMethods(draw_heatmap_list)
47
-exportMethods(show)
48 47
 export(grid.dendrogram)
49 48
 export(dist2)
50 49
 export(rowAnnotation)
... ...
@@ -2,21 +2,18 @@
2 2
 \docType{class}
3 3
 \alias{AdditiveUnit-class}
4 4
 \title{
5
-An internal class  
6
-
5
+An internal class
7 6
 
8 7
 }
9 8
 \description{
10
-An internal class  
11
-
9
+An internal class
12 10
 
13 11
 }
14 12
 \details{
15
-This class is a super class for \code{\link{Heatmap-class}}, \code{\link{HeatmapList-class}} and \code{\link{HeatmapAnnotation-class}} classes. It is only designed for \code{+} generic method so that above three classes can be appended to each other.  
16
-
13
+This class is a super class for \code{\link{Heatmap-class}}, \code{\link{HeatmapList-class}} and \code{\link{HeatmapAnnotation-class}} classes.
14
+It is only designed for \code{+} generic method so that above three classes can be appended to each other.
17 15
 
18 16
 }
19 17
 \examples{
20 18
 # no example
21
-NULL
22
-}
19
+NULL}
... ...
@@ -1,39 +1,31 @@
1 1
 \name{AdditiveUnit}
2 2
 \alias{AdditiveUnit}
3 3
 \title{
4
-Constructor method for AdditiveUnit class  
5
-
4
+Constructor method for AdditiveUnit class
6 5
 
7 6
 }
8 7
 \description{
9
-Constructor method for AdditiveUnit class  
10
-
8
+Constructor method for AdditiveUnit class
11 9
 
12 10
 }
13 11
 \usage{
14
-AdditiveUnit(...)
15
-}
12
+AdditiveUnit(...)}
16 13
 \arguments{
17 14
 
18 15
   \item{...}{arguments.}
19
-
20 16
 }
21 17
 \details{
22
-This method is not used in the package.  
23
-
18
+This method is not used in the package.
24 19
 
25 20
 }
26 21
 \value{
27
-No value is returned.  
28
-
22
+No value is returned.
29 23
 
30 24
 }
31 25
 \author{
32
-Zuguang Gu <z.gu@dkfz.de>  
33
-
26
+Zuguang Gu <z.gu@dkfz.de>
34 27
 
35 28
 }
36 29
 \examples{
37 30
 # no example
38
-NULL
39
-}
31
+NULL}
... ...
@@ -2,22 +2,21 @@
2 2
 \docType{class}
3 3
 \alias{ColorMapping-class}
4 4
 \title{
5
-Class to map values to colors  
6
-
5
+Class to map values to colors
7 6
 
8 7
 }
9 8
 \description{
10
-Class to map values to colors  
11
-
9
+Class to map values to colors
12 10
 
13 11
 }
14 12
 \details{
15
-The \code{\link{ColorMapping-class}} handles color mapping with both discrete values and continuous values. Discrete values are mapped by setting a vector of colors and continuous values are mapped by setting a color mapping function.  
16
-
13
+The \code{\link{ColorMapping-class}} handles color mapping with both discrete values and continuous values.
14
+Discrete values are mapped by setting a vector of colors and continuous values are mapped by setting
15
+a color mapping function.
17 16
 
18 17
 }
19 18
 \section{Methods}{
20
-The \code{\link{ColorMapping-class}} provides following methods:  
19
+The \code{\link{ColorMapping-class}} provides following methods:
21 20
 
22 21
 \itemize{
23 22
   \item \code{\link{ColorMapping}}: contructor methods.
... ...
@@ -25,14 +24,11 @@ The \code{\link{ColorMapping-class}} provides following methods:
25 24
   \item \code{\link{color_mapping_legend,ColorMapping-method}}: draw legend or get the size of the legend.
26 25
 }
27 26
 
28
-
29 27
 }
30 28
 \author{
31
-Zuguang Gu <z.gu@dkfz.de>  
32
-
29
+Zuguang Gu <z.gu@dkfz.de>
33 30
 
34 31
 }
35 32
 \examples{
36 33
 # for examples, please go to `ColorMapping` method page
37
-NULL
38
-}
34
+NULL}
... ...
@@ -1,42 +1,36 @@
1 1
 \name{ColorMapping}
2 2
 \alias{ColorMapping}
3 3
 \title{
4
-Constructor methods for ColorMapping class  
5
-
4
+Constructor methods for ColorMapping class
6 5
 
7 6
 }
8 7
 \description{
9
-Constructor methods for ColorMapping class  
10
-
8
+Constructor methods for ColorMapping class
11 9
 
12 10
 }
13 11
 \usage{
14 12
 ColorMapping(name, colors = NULL, levels = NULL,
15
-    col_fun = NULL, breaks = NULL, na_col = "#FFFFFF")
16
-}
13
+    col_fun = NULL, breaks = NULL, na_col = "#FFFFFF")}
17 14
 \arguments{
18 15
 
19 16
   \item{name}{name for this color mapping. It is used for drawing the title of the legend.}
20 17
   \item{colors}{discrete colors.}
21
-  \item{levels}{levels that correspond to \code{colors}. If \code{colors} is name indexed,  \code{levels} can be ignored.}
18
+  \item{levels}{levels that correspond to \code{colors}. If \code{colors} is name indexed, \code{levels} can be ignored.}
22 19
   \item{col_fun}{color mapping function that maps continuous values to colors.}
23
-  \item{breaks}{breaks for the continuous color mapping. If \code{col_fun} is generated by \code{\link[circlize]{colorRamp2}}, \code{breaks} can be ignored.}
20
+  \item{breaks}{breaks for the continuous color mapping. If \code{col_fun} isgenerated by \code{\link[circlize]{colorRamp2}}, \code{breaks} can be ignored.}
24 21
   \item{na_col}{colors for \code{NA} values.}
25
-
26 22
 }
27 23
 \details{
28
-\code{colors} and \code{levels} are used for discrete color mapping, \code{col_fun} and  \code{breaks} are used for continuous color mapping.  
29
-
24
+\code{colors} and \code{levels} are used for discrete color mapping, \code{col_fun} and 
25
+\code{breaks} are used for continuous color mapping.
30 26
 
31 27
 }
32 28
 \value{
33
-A \code{\link{ColorMapping-class}} object.  
34
-
29
+A \code{\link{ColorMapping-class}} object.
35 30
 
36 31
 }
37 32
 \author{
38
-Zuguang Gu <z.gu@dkfz.de>  
39
-
33
+Zuguang Gu <z.gu@dkfz.de>
40 34
 
41 35
 }
42 36
 \examples{
... ...
@@ -56,5 +50,4 @@ cm
56 50
 require(circlize)
57 51
 cm = ColorMapping(name = "test",
58 52
     col_fun = colorRamp2(c(0, 0.5, 1), c("blue", "white", "red")))
59
-cm
60
-}
53
+cm}
... ...
@@ -2,19 +2,19 @@
2 2
 \docType{package}
3 3
 \alias{ComplexHeatmap-package}
4 4
 \title{
5
-Making complex heatmap  
6
-
5
+Making complex heatmap
7 6
 
8 7
 }
9 8
 \description{
10
-Making complex heatmap  
11
-
9
+Making complex heatmap
12 10
 
13 11
 }
14 12
 \details{
15
-This package aims to provide a simple and flexible way to arrange multiple heatmaps as well as self-defining annotation graphics.  
13
+This package aims to provide a simple and flexible way to arrange
14
+multiple heatmaps as well as self-defining annotation graphics.
16 15
 
17
-The package is implemented in an object oriented way.  Components of heatmap lists are abstracted into several classes.  
16
+The package is implemented in an object oriented way. 
17
+Components of heatmap lists are abstracted into several classes.
18 18
 
19 19
 \itemize{
20 20
   \item \code{\link{Heatmap-class}}: a single heatmap containing heatmap body, row/column names, titles, dendrograms and column annotations.
... ...
@@ -22,16 +22,16 @@ The package is implemented in an object oriented way.  Components of heatmap lis
22 22
   \item \code{\link{HeatmapAnnotation-class}}: a list of row annotations or column annotations.
23 23
 }
24 24
 
25
-There are also several internal classes:  
25
+There are also several internal classes:
26 26
 
27 27
 \itemize{
28 28
   \item \code{\link{SingleAnnotation-class}}: a single row annotation or column annotation.
29 29
   \item \code{\link{ColorMapping-class}}: mapping from values to colors.
30 30
 }
31 31
 
32
-For plotting one single heatmap, please go to the documentation page of \code{\link{Heatmap}}. For plotting multiple heatmaps, please go to \code{\link{HeatmapList-class}} and \code{+.AdditiveUnit}.  
33
-
34
-The vignette provides detailed explanation of how to use this package.  
32
+For plotting one single heatmap, please go to the documentation page of \code{\link{Heatmap}}.
33
+For plotting multiple heatmaps, please go to \code{\link{HeatmapList-class}} and \code{+.AdditiveUnit}.
35 34
 
35
+The vignette provides detailed explanation of how to use this package.
36 36
 
37 37
 }
... ...
@@ -2,17 +2,15 @@
2 2
 \docType{class}
3 3
 \alias{Heatmap-class}
4 4
 \title{
5
-Class for a single heatmap  
6
-
5
+Class for a single heatmap
7 6
 
8 7
 }
9 8
 \description{
10
-Class for a single heatmap  
11
-
9
+Class for a single heatmap
12 10
 
13 11
 }
14 12
 \details{
15
-The components for a single heamtap are placed into a 9 x 7 layout:  
13
+The components for a single heamtap are placed into a 9 x 7 layout:
16 14
 
17 15
   \preformatted{
18 16
          +------+ (1)
... ...
@@ -28,7 +26,7 @@ The components for a single heamtap are placed into a 9 x 7 layout:
28 26
          +------+ (9)
29 27
   }
30 28
 
31
-From top to bottom in column 4, the regions are:  
29
+From top to bottom in column 4, the regions are:
32 30
 
33 31
 \itemize{
34 32
   \item title which is put on the top of the heatmap, graphics are drawn by \code{\link{draw_title,Heatmap-method}}.
... ...
@@ -42,7 +40,7 @@ From top to bottom in column 4, the regions are:
42 40
   \item title on the bottom, graphics are drawn by \code{\link{draw_title,Heatmap-method}}.
43 41
 }
44 42
 
45
-From left to right in row 5, the regions are:  
43
+From left to right in row 5, the regions are:
46 44
 
47 45
 \itemize{
48 46
   \item title which is put in the left of the heatmap, graphics are drawn by \code{\link{draw_title,Heatmap-method}}.
... ...
@@ -54,12 +52,13 @@ From left to right in row 5, the regions are:
54 52
   \item title on the right, graphics are drawn by \code{\link{draw_title,Heatmap-method}}.
55 53
 }
56 54
 
57
-The \code{\link{Heatmap-class}} is not responsible for heatmap legend and annotation legends. The \code{\link{draw,Heatmap-method}} method will construct a \code{\link{HeatmapList-class}} object which only contains one single heatmap and call \code{\link{draw,HeatmapList-method}} to make a complete heatmap.  
58
-
55
+The \code{\link{Heatmap-class}} is not responsible for heatmap legend and annotation legends. The \code{\link{draw,Heatmap-method}} method
56
+will construct a \code{\link{HeatmapList-class}} object which only contains one single heatmap
57
+and call \code{\link{draw,HeatmapList-method}} to make a complete heatmap.
59 58
 
60 59
 }
61 60
 \section{Methods}{
62
-The \code{\link{Heatmap-class}} provides following methods:  
61
+The \code{\link{Heatmap-class}} provides following methods:
63 62
 
64 63
 \itemize{
65 64
   \item \code{\link{Heatmap}}: constructor method.
... ...
@@ -67,14 +66,11 @@ The \code{\link{Heatmap-class}} provides following methods:
67 66
   \item \code{\link{add_heatmap,Heatmap-method}} append heatmaps and row annotations to a list of heatmaps.
68 67
 }
69 68
 
70
-
71 69
 }
72 70
 \author{
73
-Zuguang Gu <z.gu@dkfz.de>  
74
-
71
+Zuguang Gu <z.gu@dkfz.de>
75 72
 
76 73
 }
77 74
 \examples{
78 75
 # for examples, please go to `Heatmap` method page
79
-NULL
80
-}
76
+NULL}
... ...
@@ -1,13 +1,11 @@
1 1
 \name{Heatmap}
2 2
 \alias{Heatmap}
3 3
 \title{
4
-Constructor method for Heatmap class  
5
-
4
+Constructor method for Heatmap class
6 5
 
7 6
 }
8 7
 \description{
9
-Constructor method for Heatmap class  
10
-
8
+Constructor method for Heatmap class
11 9
 
12 10
 }
13 11
 \usage{
... ...
@@ -36,16 +34,15 @@ Heatmap(matrix, col, name, na_col = "grey", rect_gp = gpar(col = NA),
36 34
     bottom_annotation_height = unit(5*length(bottom_annotation@anno_list), "mm"),
37 35
     km = 1, split = NULL, gap = unit(1, "mm"),
38 36
     combined_name_fun = function(x) paste(x, collapse = "/"),
39
-    width = NULL, show_heatmap_legend = TRUE)
40
-}
37
+    width = NULL, show_heatmap_legend = TRUE)}
41 38
 \arguments{
42 39
 
43
-  \item{matrix}{a matrix. Either numeric or character. If it is a simple vector, it will be converted to a one-column matrix.}
44
-  \item{col}{a vector of colors if the color mapping is discrete or a color mapping  function if the matrix is continuous numbers. If the matrix is continuous, the value can also be a vector of colors so that colors will be interpolated. Pass to \code{\link{ColorMapping}}.}
40
+  \item{matrix}{a matrix. Either numeric or character. If it is a simple vector, it will beconverted to a one-column matrix.}
41
+  \item{col}{a vector of colors if the color mapping is discrete or a color mapping function if the matrix is continuous numbers. If the matrix is continuous,the value can also be a vector of colors so that colors will be interpolated. Pass to \code{\link{ColorMapping}}.}
45 42
   \item{name}{name of the heatmap. The name is used as the title of the heatmap legend.}
46 43
   \item{na_col}{color for \code{NA} values.}
47 44
   \item{rect_gp}{graphic parameters for drawing rectangles (for heatmap body).}
48
-  \item{cell_fun}{self-defined function to add graphics on each cell. Seven parameters will be passed into  this function: \code{i}, \code{j}, \code{x}, \code{y}, \code{width}, \code{height}, \code{fill} which are row index, column index in \code{matrix}, coordinate of the middle points in the heatmap body viewport, the width and height of the cell and the filled color. }
45
+  \item{cell_fun}{self-defined function to add graphics on each cell. Seven parameters will be passed into this function: \code{i}, \code{j}, \code{x}, \code{y}, \code{width}, \code{height}, \code{fill} which are row index,column index in \code{matrix}, coordinate of the middle points in the heatmap body viewport,the width and height of the cell and the filled color. }
49 46
   \item{row_title}{title on row.}
50 47
   \item{row_title_side}{will the title be put on the left or right of the heatmap?}
51 48
   \item{row_title_gp}{graphic parameters for drawing text.}
... ...
@@ -54,13 +51,13 @@ Heatmap(matrix, col, name, na_col = "grey", rect_gp = gpar(col = NA),
54 51
   \item{column_title_side}{will the title be put on the top or bottom of the heatmap?}
55 52
   \item{column_title_gp}{graphic parameters for drawing text.}
56 53
   \item{column_title_rot}{rotation of column titles. Only 0, 90, 270 are allowed to set.}
57
-  \item{cluster_rows}{If the value is a logical, it means whether make cluster on rows. The value can also be a \code{\link[stats]{hclust}} or a \code{\link[stats]{dendrogram}} that already contains clustering information. This means you can use any type of clustering methods and render the \code{\link[stats]{dendrogram}} object with self-defined graphic settings.}
58
-  \item{clustering_distance_rows}{it can be a pre-defined character which is in  ("euclidean", "maximum", "manhattan", "canberra", "binary",  "minkowski", "pearson", "spearman", "kendall"). It can also be a function. If the function has one argument, the input argument should be a matrix and  the returned value should be a \code{\link[stats]{dist}} object. If the function has two arguments, the input arguments are two vectors and the function calculates distance between these two vectors.}
54
+  \item{cluster_rows}{If the value is a logical, it means whether make cluster on rows. The value can alsobe a \code{\link[stats]{hclust}} or a \code{\link[stats]{dendrogram}} that already contains clustering information.This means you can use any type of clustering methods and render the \code{\link[stats]{dendrogram}}object with self-defined graphic settings.}
55
+  \item{clustering_distance_rows}{it can be a pre-defined character which is in ("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski", "pearson", "spearman", "kendall"). It can also be a function.If the function has one argument, the input argument should be a matrix and the returned value should be a \code{\link[stats]{dist}} object. If the function has two arguments,the input arguments are two vectors and the function calculates distance between thesetwo vectors.}
59 56
   \item{clustering_method_rows}{method to make cluster, pass to \code{\link[stats]{hclust}}.}
60 57
   \item{row_hclust_side}{should the row cluster be put on the left or right of the heatmap?}
61 58
   \item{row_hclust_width}{width of the row cluster, should be a \code{\link[grid]{unit}} object.}
62 59
   \item{show_row_hclust}{whether show row clusters. }
63
-  \item{row_hclust_gp}{graphics parameters for drawing lines. If users already provide a \code{\link[stats]{dendrogram}} object with edges rendered, this argument will be ignored.}
60
+  \item{row_hclust_gp}{graphics parameters for drawing lines. If users already provide a \code{\link[stats]{dendrogram}}object with edges rendered, this argument will be ignored.}
64 61
   \item{cluster_columns}{whether make cluster on columns. Same settings as \code{cluster_rows}.}
65 62
   \item{clustering_distance_columns}{same setting as \code{clustering_distance_rows}.}
66 63
   \item{clustering_method_columns}{method to make cluster, pass to \code{\link[stats]{hclust}}.}
... ...
@@ -68,11 +65,11 @@ Heatmap(matrix, col, name, na_col = "grey", rect_gp = gpar(col = NA),
68 65
   \item{column_hclust_height}{height of the column cluster, should be a \code{\link[grid]{unit}} object.}
69 66
   \item{show_column_hclust}{whether show column clusters.}
70 67
   \item{column_hclust_gp}{graphic parameters for drawling lines. Same settings as \code{row_hclust_gp}.}
71
-  \item{row_order}{order of rows. It makes it easy to adjust row order for a list of heatmaps if this heatmap  is selected as the main heatmap. Manually setting row order should turn off clustering}
68
+  \item{row_order}{order of rows. It makes it easy to adjust row order for a list of heatmaps if this heatmap is selected as the main heatmap. Manually setting row order should turn off clustering}
72 69
   \item{column_order}{order of column. It makes it easy to adjust column order for both matrix and column annotations.}
73 70
   \item{row_names_side}{should the row names be put on the left or right of the heatmap?}
74 71
   \item{show_row_names}{whether show row names.}
75
-  \item{row_names_max_width}{maximum width of row names viewport. Because some times row names can be very long, it is not reasonable to show them all.}
72
+  \item{row_names_max_width}{maximum width of row names viewport. Because some times row names can be very long, it is not reasonableto show them all.}
76 73
   \item{row_names_gp}{graphic parameters for drawing text.}
77 74
   \item{column_names_side}{should the column names be put on the top or bottom of the heatmap?}
78 75
   \item{column_names_max_height}{maximum height of column names viewport.}
... ...
@@ -82,18 +79,18 @@ Heatmap(matrix, col, name, na_col = "grey", rect_gp = gpar(col = NA),
82 79
   \item{top_annotation_height}{total height of the column annotations on the top.}
83 80
   \item{bottom_annotation}{a \code{\link{HeatmapAnnotation}} object.}
84 81
   \item{bottom_annotation_height}{total height of the column annotations on the bottom.}
85
-  \item{km}{do k-means clustering on rows. If the value is larger than 1, the heatmap will be split by rows according to the k-means clustering. For each row-clusters, hierarchical clustering is still applied with parameters above.}
82
+  \item{km}{do k-means clustering on rows. If the value is larger than 1, the heatmap will be split by rows according to the k-means clustering.For each row-clusters, hierarchical clustering is still applied with parameters above.}
86 83
   \item{split}{a vector or a data frame by which the rows are split.}
87 84
   \item{gap}{gap between row-slices if the heatmap is split by rows, should be \code{\link[grid]{unit}} object.}
88
-  \item{combined_name_fun}{if the heatmap is split by rows, how to make a combined row title for each slice? The input parameter for this function is a vector which contains level names under each column in \code{split}.}
89
-  \item{width}{the width of the single heatmap, should be a fixed \code{\link[grid]{unit}} object. It is used for the layout when the heatmap is appended to a list of heatmaps.}
85
+  \item{combined_name_fun}{if the heatmap is split by rows, how to make a combined row title for each slice?The input parameter for this function is a vector which contains level names under each column in \code{split}.}
86
+  \item{width}{the width of the single heatmap, should be a fixed \code{\link[grid]{unit}} object. It is used for the layout when the heatmapis appended to a list of heatmaps.}
90 87
   \item{show_heatmap_legend}{whether show heatmap legend?}
91
-
92 88
 }
93 89
 \details{
94
-The initialization function only applies parameter checking and fill values to each slot with proper ones. Then it will be ready for clustering and layout.  
90
+The initialization function only applies parameter checking and fill values to each slot with proper ones.
91
+Then it will be ready for clustering and layout.
95 92
 
96
-Following methods can be applied on the \code{\link{Heatmap-class}} object:  
93
+Following methods can be applied on the \code{\link{Heatmap-class}} object:
97 94
 
98 95
 \itemize{
99 96
   \item \code{\link{show,Heatmap-method}}: draw a single heatmap with default parameters
... ...
@@ -101,18 +98,16 @@ Following methods can be applied on the \code{\link{Heatmap-class}} object:
101 98
   \item \code{\link{add_heatmap,Heatmap-method}} append heatmaps and row annotations to a list of heatmaps.
102 99
 }
103 100
 
104
-The constructor function pretends to be a high-level graphic function because the \code{show} method of the \code{\link{Heatmap-class}} object actually plots the graphics.  
105
-
101
+The constructor function pretends to be a high-level graphic function because the \code{show} method
102
+of the \code{\link{Heatmap-class}} object actually plots the graphics.
106 103
 
107 104
 }
108 105
 \value{
109
-A \code{\link{Heatmap-class}} object.  
110
-
106
+A \code{\link{Heatmap-class}} object.
111 107
 
112 108
 }
113 109
 \author{
114
-Zuguang Gu <z.gu@dkfz.de>  
115
-
110
+Zuguang Gu <z.gu@dkfz.de>
116 111
 
117 112
 }
118 113
 \examples{
... ...
@@ -186,5 +181,4 @@ Heatmap(mat, rect_gp = gpar(col = "white"),
186 181
         grid.text(mat[i, j], x = x, y = y)
187 182
     },
188 183
     cluster_rows = FALSE, cluster_columns = FALSE, row_names_side = "left", 
189
-    column_names_side = "top")
190
-}
184
+    column_names_side = "top")}
... ...
@@ -2,36 +2,32 @@
2 2
 \docType{class}
3 3
 \alias{HeatmapAnnotation-class}
4 4
 \title{
5
-Class for heatmap annotations  
6
-
5
+Class for heatmap annotations
7 6
 
8 7
 }
9 8
 \description{
10
-Class for heatmap annotations  
11
-
9
+Class for heatmap annotations
12 10
 
13 11
 }
14 12
 \details{
15
-A complex heatmap contains a list of annotations which represent as different graphics placed on rows and columns. The \code{\link{HeatmapAnnotation-class}} is a category of single annotations which are by a list of \code{\link{SingleAnnotation-class}} objects with same number of rows or columns.  
16
-
13
+A complex heatmap contains a list of annotations which represent as different graphics
14
+placed on rows and columns. The \code{\link{HeatmapAnnotation-class}} is a category of single annotations which are
15
+by a list of \code{\link{SingleAnnotation-class}} objects with same number of rows or columns.
17 16
 
18 17
 }
19 18
 \section{Methods}{
20
-The \code{\link{HeatmapAnnotation-class}} provides following methods:  
19
+The \code{\link{HeatmapAnnotation-class}} provides following methods:
21 20
 
22 21
 \itemize{
23 22
   \item \code{\link{HeatmapAnnotation}}: constructor method
24 23
   \item \code{\link{draw,HeatmapAnnotation-method}}: draw the annotations
25 24
 }
26 25
 
27
-
28 26
 }
29 27
 \author{
30
-Zuguang Gu <z.gu@dkfz.de>  
31
-
28
+Zuguang Gu <z.gu@dkfz.de>
32 29
 
33 30
 }
34 31
 \examples{
35 32
 # for examples, please go to `HeatmapAnnotation` method page
36
-NULL
37
-}
33
+NULL}
... ...
@@ -1,21 +1,18 @@
1 1
 \name{HeatmapAnnotation}
2 2
 \alias{HeatmapAnnotation}
3 3
 \title{
4
-Constructor method for HeatmapAnnotation class  
5
-
4
+Constructor method for HeatmapAnnotation class
6 5
 
7 6
 }
8 7
 \description{
9
-Constructor method for HeatmapAnnotation class  
10
-
8
+Constructor method for HeatmapAnnotation class
11 9
 
12 10
 }
13 11
 \usage{
14 12
 HeatmapAnnotation(df, name, col, show_legend = rep(TRUE, n_anno), ...,
15 13
     which = c("column", "row"), annotation_height = 1, annotation_width = 1,
16 14
     height = unit(1, "cm"), width = unit(1, "cm"), gp = gpar(col = NA),
17
-    gap = unit(0, "null"))
18
-}
15
+    gap = unit(0, "null"))}
19 16
 \arguments{
20 17
 
21 18
   \item{df}{a data frame. Each column will be treated as a simple annotation. The data frame must have column names.}
... ...
@@ -30,26 +27,22 @@ HeatmapAnnotation(df, name, col, show_legend = rep(TRUE, n_anno), ...,
30 27
   \item{width}{width of the whole heatmap annotations, only used for row annotation when appending to the list of heatmaps.}
31 28
   \item{gp}{graphic parameters for simple annotations.}
32 29
   \item{gap}{gap between each annotation}
33
-
34 30
 }
35 31
 \details{
36
-The simple annotations are defined by \code{df} and \code{col} arguments. Complex annotations are defined by the function list. So you need to at least to define \code{df} or a annotation function.  
37
-
32
+The simple annotations are defined by \code{df} and \code{col} arguments. Complex annotations are
33
+defined by the function list. So you need to at least to define \code{df} or a annotation function.
38 34
 
39 35
 }
40 36
 \value{
41
-A \code{\link{HeatmapAnnotation-class}} object.  
42
-
37
+A \code{\link{HeatmapAnnotation-class}} object.
43 38
 
44 39
 }
45 40
 \seealso{
46
-There are two shortcut functions: \code{\link{rowAnnotation}} and \code{\link{columnAnnotation}}.  
47
-
41
+There are two shortcut functions: \code{\link{rowAnnotation}} and \code{\link{columnAnnotation}}.
48 42
 
49 43
 }
50 44
 \author{
51
-Zuguang Gu <z.gu@dkfz.de>  
52
-
45
+Zuguang Gu <z.gu@dkfz.de>
53 46
 
54 47
 }
55 48
 \examples{
... ...
@@ -66,5 +59,4 @@ ha = HeatmapAnnotation(points = anno_points(1:6))
66 59
 ha = HeatmapAnnotation(histogram = anno_points(1:6))
67 60
 
68 61
 mat = matrix(rnorm(36), 6)
69
-ha = HeatmapAnnotation(boxplot = anno_boxplot(mat))
70
-}
62
+ha = HeatmapAnnotation(boxplot = anno_boxplot(mat))}
... ...
@@ -2,19 +2,17 @@
2 2
 \docType{class}
3 3
 \alias{HeatmapList-class}
4 4
 \title{
5
-Class for a list of heatmaps  
6
-
5
+Class for a list of heatmaps
7 6
 
8 7
 }
9 8
 \description{
10
-Class for a list of heatmaps  
11
-
9
+Class for a list of heatmaps
12 10
 
13 11
 }
14 12
 \details{
15
-A heatmap list is defined as a list of heatmaps and row annotations.  
13
+A heatmap list is defined as a list of heatmaps and row annotations.
16 14
 
17
-The components for the heamtap list are placed into a 7 x 7 layout:  
15
+The components for the heamtap list are placed into a 7 x 7 layout:
18 16
 
19 17
   \preformatted{
20 18
          +------+(1)
... ...
@@ -28,7 +26,7 @@ The components for the heamtap list are placed into a 7 x 7 layout:
28 26
          +------+(7)
29 27
   }
30 28
 
31
-From top to bottom in column 4, the regions are:  
29
+From top to bottom in column 4, the regions are:
32 30
 
33 31
 \itemize{
34 32
   \item annotation legend on the top, graphics are drawn by \code{\link{draw_annotation_legend,HeatmapList-method}}.
... ...
@@ -40,7 +38,7 @@ From top to bottom in column 4, the regions are:
40 38
   \item annotation legend on the bottom, graphics are drawn by \code{\link{draw_annotation_legend,HeatmapList-method}}.
41 39
 }
42 40
 
43
-From left to right in row 4, the regions are:  
41
+From left to right in row 4, the regions are:
44 42
 
45 43
 \itemize{
46 44
   \item annotation legend on the left, graphics are drawn by \code{\link{draw_annotation_legend,HeatmapList-method}}.
... ...
@@ -52,23 +50,21 @@ From left to right in row 4, the regions are:
52 50
   \item annotation legend on the right, graphics are drawn by \code{\link{draw_annotation_legend,HeatmapList-method}}.
53 51
 }
54 52
 
55
-For the list of heatmaps which are placed at (5, 5) in the layout, the heatmaps and row annotations are placed one after the other.  
56
-
53
+For the list of heatmaps which are placed at (5, 5) in the layout, the heatmaps and row annotations
54
+are placed one after the other.
57 55
 
58 56
 }
59 57
 \section{Methods}{
60
-The \code{\link{HeatmapList-class}} provides following methods:  
58
+The \code{\link{HeatmapList-class}} provides following methods:
61 59
 
62 60
 \itemize{
63 61
   \item \code{\link{draw,HeatmapList-method}}: draw the list of heatmaps and row annotations.
64 62
   \item \code{\link{add_heatmap,HeatmapList-method}} add heatmaps to the list of heatmaps.
65 63
 }
66 64
 
67
-
68 65
 }
69 66
 \author{
70
-Zuguang Gu <z.gu@dkfz.de>  
71
-
67
+Zuguang Gu <z.gu@dkfz.de>
72 68
 
73 69
 }
74 70
 \examples{
... ...
@@ -87,5 +83,4 @@ ht + ht_list
87 83
 ha = HeatmapAnnotation(points = anno_points(1:12, which = "row"), 
88 84
     which = "row")
89 85
 ht + ha
90
-ht_list + ha
91
-}
86
+ht_list + ha}
... ...
@@ -1,42 +1,33 @@
1 1
 \name{HeatmapList}
2 2
 \alias{HeatmapList}
3 3
 \title{
4
-Constructor method for HeatmapList class  
5
-
4
+Constructor method for HeatmapList class
6 5
 
7 6
 }
8 7
 \description{
9
-Constructor method for HeatmapList class  
10
-
8
+Constructor method for HeatmapList class
11 9
 
12 10
 }
13 11
 \usage{
14
-HeatmapList(...)
15
-}
12
+HeatmapList(...)}
16 13
 \arguments{
17 14
 
18 15
   \item{...}{arguments}
19
-
20 16
 }
21 17
 \details{
22
-There is no public constructor method for the \code{\link{HeatmapList-class}}.  
23
-
18
+There is no public constructor method for the \code{\link{HeatmapList-class}}.
24 19
 
25 20
 }
26 21
 \value{
27
-No value is returned.  
28
-
22
+No value is returned.
29 23
 
30 24
 }
31 25
 \author{
32
-Zuguang Gu <z.gu@dkfz.de>  
33
-
26
+Zuguang Gu <z.gu@dkfz.de>
34 27
 
35 28
 }
36 29
 \section{Detailes}{
37
-There is no public constructor method for the \code{\link{HeatmapList-class}}.
38
-}
30
+There is no public constructor method for the \code{\link{HeatmapList-class}}.}
39 31
 \examples{
40 32
 # no example
41
-NULL
42
-}
33
+NULL}
... ...
@@ -2,43 +2,42 @@
2 2
 \docType{class}
3 3
 \alias{SingleAnnotation-class}
4 4
 \title{
5
-Class for a single annotation  
6
-
5
+Class for a single annotation
7 6
 
8 7
 }
9 8
 \description{
10
-Class for a single annotation  
11
-
9
+Class for a single annotation
12 10
 
13 11
 }
14 12
 \details{
15
-A complex heatmap always has more than one annotations on rows and columns. Here the \code{\link{SingleAnnotation-class}} defines the basic unit of annotations. The most simple annotation is one row or one column grids in which different colors represent different classes of the data. The annotation can also be more complex graphics, such as a boxplot that shows data distribution in corresponding row or column.  
16
-
17
-The \code{\link{SingleAnnotation-class}} is used for storing data for a single annotation and provides methods for drawing annotation graphics.  
13
+A complex heatmap always has more than one annotations on rows and columns. Here
14
+the \code{\link{SingleAnnotation-class}} defines the basic unit of annotations.
15
+The most simple annotation is one row or one column grids in which different colors
16
+represent different classes of the data. The annotation can also be more complex
17
+graphics, such as a boxplot that shows data distribution in corresponding row or column.
18 18
 
19
+The \code{\link{SingleAnnotation-class}} is used for storing data for a single annotation and provides
20
+methods for drawing annotation graphics.
19 21
 
20 22
 }
21 23
 \section{Methods}{
22
-The \code{\link{SingleAnnotation-class}} provides following methods:  
24
+The \code{\link{SingleAnnotation-class}} provides following methods:
23 25
 
24 26
 \itemize{
25 27
   \item \code{\link{SingleAnnotation}}: constructor method
26 28
   \item \code{\link{draw,SingleAnnotation-method}}: draw the single annotation.
27 29
 }
28 30
 
29
-
30 31
 }
31 32
 \seealso{
32
-The \code{\link{SingleAnnotation-class}} is always used internally. The public \code{\link{HeatmapAnnotation-class}} contains a list of \code{\link{SingleAnnotation-class}} objects and is used to add annotation graphics on heatmaps.  
33
-
33
+The \code{\link{SingleAnnotation-class}} is always used internally. The public \code{\link{HeatmapAnnotation-class}}
34
+contains a list of \code{\link{SingleAnnotation-class}} objects and is used to add annotation graphics on heatmaps.
34 35
 
35 36
 }
36 37
 \author{
37
-Zuguang Gu <z.gu@dkfz.de>  
38
-
38
+Zuguang Gu <z.gu@dkfz.de>
39 39
 
40 40
 }
41 41
 \examples{
42 42
 # for examples, please go to `SingleAnnotation` method page
43
-NULL
44
-}
43
+NULL}
... ...
@@ -1,49 +1,50 @@
1 1
 \name{SingleAnnotation}
2 2
 \alias{SingleAnnotation}
3 3
 \title{
4
-Constructor method for SingleAnnotation class  
5
-
4
+Constructor method for SingleAnnotation class
6 5
 
7 6
 }
8 7
 \description{
9
-Constructor method for SingleAnnotation class  
10
-
8
+Constructor method for SingleAnnotation class
11 9
 
12 10
 }
13 11
 \usage{
14 12
 SingleAnnotation(name, value, col, fun, which = c("column", "row"),
15
-    show_legend = TRUE, gp = gpar(col = NA))
16
-}
13
+    show_legend = TRUE, gp = gpar(col = NA))}
17 14
 \arguments{
18 15
 
19 16
   \item{name}{name for this annotation.}
20 17
   \item{value}{A vector of annotation.}
21
-  \item{col}{colors corresponding to \code{value}. If the mapping is discrete mapping, the value of \code{col} should be a vector; If the mapping is continuous mapping, the value of \code{col} should be  a color mapping function. }
22
-  \item{fun}{a self-defined function to add annotation graphics. The argument of this function should only  be a vector of index that corresponds to rows or columns.}
18
+  \item{col}{colors corresponding to \code{value}. If the mapping is discrete mapping, the value of \code{col}should be a vector; If the mapping is continuous mapping, the value of \code{col} should be a color mapping function. }
19
+  \item{fun}{a self-defined function to add annotation graphics. The argument of this function should only be a vector of index that corresponds to rows or columns.}
23 20
   \item{which}{is the annotation a row annotation or a column annotation?}
24 21
   \item{show_legend}{if it is a simple annotation, whether show legend when making the complete heatmap.}
25 22
   \item{gp}{graphic parameters for simple annotations.}
26
-
27 23
 }
28 24
 \details{
29
-The most simple annotation is one row or one column grids in which different colors represent different classes of the data. Here the function use \code{\link{ColorMapping-class}} to process such simple annotation. \code{value} and \code{col} arguments controls values and colors of the simple annotation and a \code{\link{ColorMapping-class}} object will be constructed based on \code{value} and \code{col}.  
25
+The most simple annotation is one row or one column grids in which different colors
26
+represent different classes of the data. Here the function use \code{\link{ColorMapping-class}}
27
+to process such simple annotation. \code{value} and \code{col} arguments controls values and colors
28
+of the simple annotation and a \code{\link{ColorMapping-class}} object will be constructed based on \code{value} and \code{col}.
30 29
 
31
-\code{fun} is used to construct a more complex annotation. Users can add any type of annotation graphics by implementing a function. The only input argument of \code{fun} is a index of rows or columns which is already adjusted by the clustering. In the package, there are already several annotation graphic function generators: \code{\link{anno_points}}, \code{\link{anno_histogram}} and \code{\link{anno_boxplot}}.  
30
+\code{fun} is used to construct a more complex annotation. Users can add any type of annotation graphics
31
+by implementing a function. The only input argument of \code{fun} is a index
32
+of rows or columns which is already adjusted by the clustering. In the package, there are already
33
+several annotation graphic function generators: \code{\link{anno_points}}, \code{\link{anno_histogram}} and \code{\link{anno_boxplot}}.
32 34
 
33
-In the case that row annotations are splitted by rows, \code{index} corresponding to row orders in each row-slice and \code{fun} will be applied on each of the row slices.  
34
-
35
-One thing that users should be careful is the difference of coordinates when the annotation is a row annotation or a column annotation.   
35
+In the case that row annotations are splitted by rows, \code{index} corresponding to row orders in each row-slice
36
+and \code{fun} will be applied on each of the row slices.
36 37
 
38
+One thing that users should be careful is the difference of coordinates when the annotation is a row
39
+annotation or a column annotation. 
37 40
 
38 41
 }
39 42
 \value{
40
-A \code{\link{SingleAnnotation-class}} object.  
41
-
43
+A \code{\link{SingleAnnotation-class}} object.
42 44
 
43 45
 }
44 46
 \author{
45
-Zuguang Gu <z.gu@dkfz.de>  
46
-
47
+Zuguang Gu <z.gu@dkfz.de>
47 48
 
48 49
 }
49 50
 \examples{
... ...
@@ -62,5 +63,4 @@ SingleAnnotation(value = 1:10)
62 63
 SingleAnnotation(value = 1:10, col = colorRamp2(c(1, 10), c("blue", "red")))
63 64
 
64 65
 # self-defined graphic function
65
-SingleAnnotation(fun = anno_points(1:10))
66
-}
66
+SingleAnnotation(fun = anno_points(1:10))}
... ...
@@ -1,39 +1,33 @@
1 1
 \name{+.AdditiveUnit}
2 2
 \alias{+.AdditiveUnit}
3 3
 \title{
4
-Add heatmaps or row annotations to a heatmap list  
5
-
4
+Add heatmaps or row annotations to a heatmap list
6 5
 
7 6
 }
8 7
 \description{
9
-Add heatmaps or row annotations to a heatmap list  
10
-
8
+Add heatmaps or row annotations to a heatmap list
11 9
 
12 10
 }
13 11
 \usage{
14
-\method{+}{AdditiveUnit}(x, y)
15
-}
12
+\method{+}{AdditiveUnit}(x, y)}
16 13
 \arguments{
17 14
 
18 15
   \item{x}{a \code{\link{Heatmap-class}} object, a \code{\link{HeatmapAnnotation-class}} object or a \code{\link{HeatmapList-class}} object.}
19 16
   \item{y}{a \code{\link{Heatmap-class}} object, a \code{\link{HeatmapAnnotation-class}} object or a \code{\link{HeatmapList-class}} object.}
20
-
21 17
 }
22 18
 \details{
23
-It is only a shortcut function. It actually calls \code{\link{add_heatmap,Heatmap-method}}, \code{\link{add_heatmap,HeatmapList-method}} or \code{\link{add_heatmap,HeatmapAnnotation-method}} depending on the class of the input objects.  
24
-
25
-The \code{\link{HeatmapAnnotation-class}} object to be added should only be row annotations.  
19
+It is only a shortcut function. It actually calls \code{\link{add_heatmap,Heatmap-method}}, \code{\link{add_heatmap,HeatmapList-method}}
20
+or \code{\link{add_heatmap,HeatmapAnnotation-method}} depending on the class of the input objects.
26 21
 
22
+The \code{\link{HeatmapAnnotation-class}} object to be added should only be row annotations.
27 23
 
28 24
 }
29 25
 \value{
30
-A \code{\link{HeatmapList-class}} object.  
31
-
26
+A \code{\link{HeatmapList-class}} object.
32 27
 
33 28
 }
34 29
 \author{
35
-Zuguang Gu <z.gu@dkfz.de>  
36
-
30
+Zuguang Gu <z.gu@dkfz.de>
37 31
 
38 32
 }
39 33
 \examples{
... ...
@@ -54,5 +48,4 @@ ha = HeatmapAnnotation(points = anno_points(1:12, which = "row"),
54 48
 ht + ha
55 49
 ht_list + ha
56 50
 
57
-ha + ha + ht
58
-}
51
+ha + ha + ht}
... ...
@@ -1,37 +1,30 @@
1 1
 \name{add_heatmap-Heatmap-method}
2 2
 \alias{add_heatmap,Heatmap-method}
3 3
 \title{
4
-Add heatmaps or row annotations as a heatmap list  
5
-
4
+Add heatmaps or row annotations as a heatmap list
6 5
 
7 6
 }
8 7
 \description{
9
-Add heatmaps or row annotations as a heatmap list  
10
-
8
+Add heatmaps or row annotations as a heatmap list
11 9
 
12 10
 }
13 11
 \usage{
14
-\S4method{add_heatmap}{Heatmap}(object, x)
15
-}
12
+\S4method{add_heatmap}{Heatmap}(object, x)}
16 13
 \arguments{
17 14
 
18 15
   \item{object}{a \code{\link{Heatmap-class}} object.}
19 16
   \item{x}{a \code{\link{Heatmap-class}} object, a \code{\link{HeatmapAnnotation-class}} object or a \code{\link{HeatmapList-class}} object.}
20
-
21 17
 }
22 18
 \details{
23
-There is a shortcut function \code{+.AdditiveUnit}.  
24
-
19
+There is a shortcut function \code{+.AdditiveUnit}.
25 20
 
26 21
 }
27 22
 \value{
28
-A \code{\link{HeatmapList-class}} object.  
29
-
23
+A \code{\link{HeatmapList-class}} object.
30 24
 
31 25
 }
32 26
 \author{
33
-Zuguang Gu <z.gu@dkfz.de>  
34
-
27
+Zuguang Gu <z.gu@dkfz.de>
35 28
 
36 29
 }
37 30
 \examples{
... ...
@@ -45,5 +38,4 @@ add_heatmap(ht, ht)
45 38
 
46 39
 ha = HeatmapAnnotation(points = anno_points(1:12, which = "row"), 
47 40
     which = "row")
48
-add_heatmap(ht, ha)
49
-}
41
+add_heatmap(ht, ha)}
... ...
@@ -1,37 +1,30 @@
1 1
 \name{add_heatmap-HeatmapAnnotation-method}
2 2
 \alias{add_heatmap,HeatmapAnnotation-method}
3 3
 \title{
4
-Add row annotations or heatmaps as a heatmap list  
5
-
4
+Add row annotations or heatmaps as a heatmap list
6 5
 
7 6
 }
8 7
 \description{
9
-Add row annotations or heatmaps as a heatmap list  
10
-
8
+Add row annotations or heatmaps as a heatmap list
11 9
 
12 10
 }
13 11
 \usage{
14
-\S4method{add_heatmap}{HeatmapAnnotation}(object, x)
15
-}
12
+\S4method{add_heatmap}{HeatmapAnnotation}(object, x)}
16 13
 \arguments{
17 14
 
18 15
   \item{object}{a \code{\link{HeatmapAnnotation-class}} object.}
19 16
   \item{x}{a \code{\link{Heatmap-class}} object, a \code{\link{HeatmapAnnotation-class}} object or a \code{\link{HeatmapList-class}} object.}
20
-
21 17
 }
22 18
 \details{
23
-There is a shortcut function \code{+.AdditiveUnit}.  
24
-
19
+There is a shortcut function \code{+.AdditiveUnit}.
25 20
 
26 21
 }
27 22
 \value{
28
-A \code{\link{HeatmapList-class}} object.  
29
-
23
+A \code{\link{HeatmapList-class}} object.
30 24
 
31 25
 }
32 26
 \author{
33
-Zuguang Gu <z.gu@dkfz.de>  
34
-
27
+Zuguang Gu <z.gu@dkfz.de>
35 28
 
36 29
 }
37 30
 \examples{
... ...
@@ -44,5 +37,4 @@ ht = Heatmap(mat)
44 37
 
45 38
 ha = HeatmapAnnotation(points = anno_points(1:12, which = "row"), 
46 39
     which = "row")
47
-add_heatmap(ha, ht)
48
-}
40
+add_heatmap(ha, ht)}
... ...
@@ -1,37 +1,30 @@
1 1
 \name{add_heatmap-HeatmapList-method}
2 2
 \alias{add_heatmap,HeatmapList-method}
3 3
 \title{
4
-Add heatmaps and row annotations to the heatmap list  
5
-
4
+Add heatmaps and row annotations to the heatmap list
6 5
 
7 6
 }
8 7
 \description{
9
-Add heatmaps and row annotations to the heatmap list  
10
-
8
+Add heatmaps and row annotations to the heatmap list
11 9
 
12 10
 }
13 11
 \usage{
14
-\S4method{add_heatmap}{HeatmapList}(object, x)
15
-}
12
+\S4method{add_heatmap}{HeatmapList}(object, x)}
16 13
 \arguments{
17 14
 
18 15
   \item{object}{a \code{\link{HeatmapList-class}} object.}
19 16
   \item{x}{a \code{\link{Heatmap-class}} object or a \code{\link{HeatmapAnnotation-class}} object or a \code{\link{HeatmapList-class}} object.}
20
-
21 17
 }
22 18
 \details{
23
-There is a shortcut function \code{+.AdditiveUnit}.  
24
-
19
+There is a shortcut function \code{+.AdditiveUnit}.
25 20
 
26 21
 }
27 22
 \value{
28
-A \code{\link{HeatmapList-class}} object.  
29
-
23
+A \code{\link{HeatmapList-class}} object.
30 24
 
31 25
 }
32 26
 \author{
33
-Zuguang Gu <z.gu@dkfz.de>  
34
-
27
+Zuguang Gu <z.gu@dkfz.de>
35 28
 
36 29
 }
37 30
 \examples{
... ...
@@ -46,5 +39,4 @@ add_heatmap(ht_list, ht)
46 39
 
47 40
 ha = HeatmapAnnotation(points = anno_points(1:12, which = "row"), 
48 41
     which = "row")
49
-add_heatmap(ht_list, ha)
50
-}
42
+add_heatmap(ht_list, ha)}
... ...
@@ -1,20 +1,17 @@
1 1
 \name{add_heatmap-dispatch}
2 2
 \alias{add_heatmap}
3 3
 \title{
4
-Method dispatch page for add_heatmap
5
-}
4
+Method dispatch page for add_heatmap}
6 5
 \description{
7
-Method dispatch page for \code{add_heatmap}.
8
-}
6
+Method dispatch page for \code{add_heatmap}.}
9 7
 \section{Dispatch}{
10 8
 \code{add_heatmap} can be dispatched on following classes:
11 9
 
12 10
 \itemize{
13
-\item \code{\link{add_heatmap,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation}} class method
14
-\item \code{\link{add_heatmap,HeatmapList-method}}, \code{\link{HeatmapList}} class method
15
-\item \code{\link{add_heatmap,Heatmap-method}}, \code{\link{Heatmap}} class method
11
+\item \code{\link{add_heatmap,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
12
+\item \code{\link{add_heatmap,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
13
+\item \code{\link{add_heatmap,Heatmap-method}}, \code{\link{Heatmap-class}} class method
16 14
 }
17
-
18 15
 }
19 16
 \section{Example}{
20 17
 # no example
... ...
@@ -22,5 +19,4 @@ NULL
22 19
 }
23 20
 \examples{
24 21
 # no example
25
-NULL
26
-}
22
+NULL}
... ...
@@ -1,20 +1,17 @@
1 1
 \name{anno_barplot}
2 2
 \alias{anno_barplot}
3 3
 \title{
4
-Using barplot as annotation  
5
-
4
+Using barplot as annotation
6 5
 
7 6
 }
8 7
 \description{
9
-Using barplot as annotation  
10
-
8
+Using barplot as annotation
11 9
 
12 10
 }
13 11
 \usage{
14 12
 anno_barplot(x, which = c("column", "row"),
15 13
     gp = gpar(fill = "#CCCCCC"), axis = FALSE, axis_side = NULL,
16
-    axis_gp = gpar(fontsize = 8), ...)
17
-}
14
+    axis_gp = gpar(fontsize = 8), ...)}
18 15
 \arguments{
19 16
 
20 17
   \item{x}{a vector of values.}
... ...
@@ -24,16 +21,13 @@ anno_barplot(x, which = c("column", "row"),
24 21
   \item{axis_side}{value in "left", "right", "bottom" and "top"}
25 22
   \item{axis_gp}{graphic parameters for axis}
26 23
   \item{...}{for future use.}
27
-
28 24
 }
29 25
 \value{
30
-A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.  
31
-
26
+A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.
32 27
 
33 28
 }
34 29
 \author{
35
-Zuguang Gu <z.gu@dkfz.de>  
36
-
30
+Zuguang Gu <z.gu@dkfz.de>
37 31
 
38 32
 }
39 33
 \examples{
... ...
@@ -41,5 +35,4 @@ f = anno_barplot(rnorm(10))
41 35
 grid.newpage(); f(1:10)
42 36
 
43 37
 f = anno_barplot(rnorm(10), which = "row")
44
-grid.newpage(); f(1:10)
45
-}
38
+grid.newpage(); f(1:10)}
... ...
@@ -1,23 +1,20 @@
1 1
 \name{anno_boxplot}
2 2
 \alias{anno_boxplot}
3 3
 \title{
4
-Using boxplot as annotation  
5
-
4
+Using boxplot as annotation
6 5
 
7 6
 }
8 7
 \description{
9
-Using boxplot as annotation  
10
-
8
+Using boxplot as annotation
11 9
 
12 10
 }
13 11
 \usage{
14 12
 anno_boxplot(x, which = c("column", "row"), gp = gpar(fill = "#CCCCCC"),
15 13
     pch = 16, size = unit(2, "mm"), axis = FALSE, axis_side = NULL,
16
-    axis_gp = gpar(fontsize = 8))
17
-}
14
+    axis_gp = gpar(fontsize = 8))}
18 15
 \arguments{
19 16
 
20
-  \item{x}{a matrix or a list. If \code{x} is a matrix and if \code{which} is \code{column}, statistics for boxplot is calculated by columns, if \code{which} is \code{row}, the calculation is by rows.}
17
+  \item{x}{a matrix or a list. If \code{x} is a matrix and if \code{which} is \code{column}, statistics for boxplotis calculated by columns, if \code{which} is \code{row}, the calculation is by rows.}
21 18
   \item{which}{is the annotation a column annotation or a row annotation?}
22 19
   \item{gp}{graphic parameters}
23 20
   \item{pch}{point type}
... ...
@@ -25,16 +22,13 @@ anno_boxplot(x, which = c("column", "row"), gp = gpar(fill = "#CCCCCC"),
25 22
   \item{axis}{whether add axis}
26 23
   \item{axis_side}{value in "left", "right", "bottom" and "top"}
27 24
   \item{axis_gp}{graphic parameters for axis}
28
-
29 25
 }
30 26
 \value{
31
-A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.  
32
-
27
+A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.
33 28
 
34 29
 }
35 30
 \author{
36
-Zuguang Gu <z.gu@dkfz.de>  
37
-
31
+Zuguang Gu <z.gu@dkfz.de>
38 32
 
39 33
 }
40 34
 \examples{
... ...
@@ -47,5 +41,4 @@ grid.newpage(); f(1:4)
47 41
 
48 42
 lt = lapply(1:4, function(i) rnorm(8))
49 43
 f = anno_boxplot(lt)
50
-grid.newpage(); f(1:4)
51
-}
44
+grid.newpage(); f(1:4)}
... ...
@@ -1,36 +1,30 @@
1 1
 \name{anno_density}
2 2
 \alias{anno_density}
3 3
 \title{
4
-Using kernel density as annotation  
5
-
4
+Using kernel density as annotation
6 5
 
7 6
 }
8 7
 \description{
9
-Using kernel density as annotation  
10
-
8
+Using kernel density as annotation
11 9
 
12 10
 }
13 11
 \usage{
14 12
 anno_density(x, which = c("column", "row"), gp = gpar(fill = "#CCCCCC"),
15
-    type = c("lines", "violin", "heatmap"), ...)
16
-}
13
+    type = c("lines", "violin", "heatmap"), ...)}
17 14
 \arguments{
18 15
 
19
-  \item{x}{a matrix or a list. If \code{x} is a matrix and if \code{which} is \code{column}, statistics for density is calculated by columns, if \code{which} is \code{row}, the calculation is by rows.}
16
+  \item{x}{a matrix or a list. If \code{x} is a matrix and if \code{which} is \code{column}, statistics for densityis calculated by columns, if \code{which} is \code{row}, the calculation is by rows.}
20 17
   \item{which}{is the annotation a column annotation or a row annotation?}
21 18
   \item{gp}{graphic parameters. Note it is ignored if \code{type} equals to \code{heatmap}.}
22 19
   \item{type}{which type of graphics is used to represent density distribution.}
23 20
   \item{...}{pass to \code{\link[stats]{density}}}
24
-
25 21
 }
26 22
 \value{
27
-A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.  
28
-
23
+A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.
29 24
 
30 25
 }
31 26
 \author{
32
-Zuguang Gu <z.gu@dkfz.de>  
33
-
27
+Zuguang Gu <z.gu@dkfz.de>
34 28
 
35 29
 }
36 30
 \examples{
... ...
@@ -43,5 +37,4 @@ grid.newpage(); f(1:4)
43 37
 
44 38
 lt = lapply(1:4, function(i) rnorm(8))
45 39
 f = anno_density(lt, type = "heatmap")
46
-grid.newpage(); f(1:4)
47
-}
40
+grid.newpage(); f(1:4)}
... ...
@@ -1,34 +1,28 @@
1 1
 \name{anno_histogram}
2 2
 \alias{anno_histogram}
3 3
 \title{
4
-Using histogram as annotation  
5
-
4
+Using histogram as annotation
6 5
 
7 6
 }
8 7
 \description{
9
-Using histogram as annotation  
10
-
8
+Using histogram as annotation
11 9
 
12 10
 }
13 11
 \usage{
14
-anno_histogram(x, which = c("column", "row"), gp = gpar(fill = "#CCCCCC"), ...)
15
-}
12
+anno_histogram(x, which = c("column", "row"), gp = gpar(fill = "#CCCCCC"), ...)}
16 13
 \arguments{
17 14
 
18
-  \item{x}{a matrix or a list. If \code{x} is a matrix and if \code{which} is \code{column}, statistics for histogram is calculated by columns, if \code{which} is \code{row}, the calculation is by rows.}
15
+  \item{x}{a matrix or a list. If \code{x} is a matrix and if \code{which} is \code{column}, statistics for histogramis calculated by columns, if \code{which} is \code{row}, the calculation is by rows.}
19 16
   \item{which}{is the annotation a column annotation or a row annotation?}
20 17
   \item{gp}{graphic parameters}
21 18
   \item{...}{pass to \code{\link[graphics]{hist}}}
22
-
23 19
 }
24 20
 \value{
25
-A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.  
26
-
21
+A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.
27 22
 
28 23
 }
29 24
 \author{
30
-Zuguang Gu <z.gu@dkfz.de>  
31
-
25
+Zuguang Gu <z.gu@dkfz.de>
32 26
 
33 27
 }
34 28
 \examples{
... ...
@@ -41,5 +35,4 @@ grid.newpage(); f(1:4)
41 35
 
42 36
 lt = lapply(1:4, function(i) rnorm(8))
43 37
 f = anno_histogram(lt)
44
-grid.newpage(); f(1:4)
45
-}
38
+grid.newpage(); f(1:4)}
... ...
@@ -1,20 +1,17 @@
1 1
 \name{anno_points}
2 2
 \alias{anno_points}
3 3
 \title{
4
-Using points as annotation  
5
-
4
+Using points as annotation
6 5
 
7 6
 }
8 7
 \description{
9
-Using points as annotation  
10
-
8
+Using points as annotation
11 9
 
12 10
 }
13 11
 \usage{
14 12
 anno_points(x, which = c("column", "row"), gp = gpar(), pch = 16,
15 13
     size = unit(2, "mm"), axis = FALSE, axis_side = NULL,
16
-    axis_gp = gpar(fontsize = 8), ...)
17
-}
14
+    axis_gp = gpar(fontsize = 8), ...)}
18 15
 \arguments{
19 16
 
20 17
   \item{x}{a vector of values.}
... ...
@@ -26,19 +23,15 @@ anno_points(x, which = c("column", "row"), gp = gpar(), pch = 16,
26 23
   \item{axis_side}{value in "left", "right", "bottom" and "top"}
27 24
   \item{axis_gp}{graphic parameters for axis}
28 25
   \item{...}{for future use.}
29
-
30 26
 }
31 27
 \value{
32
-A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.  
33
-
28
+A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.
34 29
 
35 30
 }
36 31
 \author{
37
-Zuguang Gu <z.gu@dkfz.de>  
38
-
32
+Zuguang Gu <z.gu@dkfz.de>
39 33
 
40 34
 }
41 35
 \examples{
42 36
 f = anno_points(rnorm(10))
43
-grid.newpage(); f(1:10)
44
-}
37
+grid.newpage(); f(1:10)}
... ...
@@ -1,19 +1,16 @@
1 1
 \name{anno_text}
2 2
 \alias{anno_text}
3 3
 \title{
4
-Using text as annotation  
5
-
4
+Using text as annotation
6 5
 
7 6
 }
8 7
 \description{
9
-Using text as annotation  
10
-
8
+Using text as annotation
11 9
 
12 10
 }
13 11
 \usage{
14 12
 anno_text(x, which = c("column", "row"), gp = gpar(), rot = 0,
15
-    just = NULL, offset = unit(0.5, "npc"))
16
-}
13
+    just = NULL, offset = unit(0.5, "npc"))}
17 14
 \arguments{
18 15
 
19 16
   \item{x}{a vector of text}
... ...
@@ -22,16 +19,13 @@ anno_text(x, which = c("column", "row"), gp = gpar(), rot = 0,
22 19
   \item{rot}{rotation of text}
23 20
   \item{just}{justification of text, pass to \code{\link[grid]{grid.text}}}
24 21
   \item{offset}{offset relative to start position}
25
-
26 22
 }
27 23
 \value{
28
-A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.  
29
-
24
+A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.
30 25
 
31 26
 }
32 27
 \author{
33
-Zuguang Gu <z.gu@dkfz.de>  
34
-
28
+Zuguang Gu <z.gu@dkfz.de>
35 29
 
36 30
 }
37 31
 \examples{
... ...
@@ -40,5 +34,4 @@ colnames(mat) = letters[1:10]
40 34
 rownames(mat) = LETTERS[1:10]
41 35
 long_cn = do.call("paste0", rep(list(colnames(mat)), 4))  # just to construct long text
42 36
 ha_rot_cn = HeatmapAnnotation(text = anno_text(long_cn, rot = 45, offset = unit(5, "mm")))
43
-Heatmap(mat, name = "foo", top_annotation = ha_rot_cn, top_annotation_height = unit(1.2, "cm"))
44
-}
37
+Heatmap(mat, name = "foo", top_annotation = ha_rot_cn, top_annotation_height = unit(1.2, "cm"))}
... ...
@@ -2,43 +2,36 @@
2 2
 \alias{annotation_legend_size,HeatmapList-method}
3 3
 \alias{annotation_legend_size}
4 4
 \title{
5
-Size of the annotation legend viewport  
6
-
5
+Size of the annotation legend viewport
7 6
 
8 7
 }
9 8
 \description{
10
-Size of the annotation legend viewport  
11
-
9
+Size of the annotation legend viewport
12 10
 
13 11
 }
14 12
 \usage{
15
-\S4method{annotation_legend_size}{HeatmapList}(object, annotation_legend_list = list(), ...)
16
-}
13
+\S4method{annotation_legend_size}{HeatmapList}(object, annotation_legend_list = list(), ...)}
17 14
 \arguments{
18 15
 
19 16
   \item{object}{a \code{\link{HeatmapList-class}} object.}
20 17
   \item{annotation_legend_list}{a list of self-defined legend, should be wrapped into \code{\link[grid]{grob}} objects.}
21 18
   \item{...}{graphic parameters passed to \code{\link{color_mapping_legend,ColorMapping-method}}.}
22
-
23 19
 }
24 20
 \details{
25
-Legends for all heatmaps or legends for all annotations will be put in one viewport. This function calculates the size of such viewport. Note graphic parameters for legends will affect the size.  
26
-
27
-This function is only for internal use.  
21
+Legends for all heatmaps or legends for all annotations will be put in one viewport. This function
22
+calculates the size of such viewport. Note graphic parameters for legends will affect the size.
28 23
 
24
+This function is only for internal use.
29 25
 
30 26
 }
31 27
 \value{
32
-A \code{\link[grid]{unit}} object.  
33
-
28
+A \code{\link[grid]{unit}} object.
34 29
 
35 30
 }
36 31
 \author{
37
-Zuguang Gu <z.gu@dkfz.de>  
38
-
32
+Zuguang Gu <z.gu@dkfz.de>
39 33
 
40 34
 }
41 35
 \examples{
42 36
 # no example for this internal method
43
-NULL
44
-}
37
+NULL}
... ...
@@ -2,21 +2,18 @@
2 2
 \alias{color_mapping_legend,ColorMapping-method}
3 3
 \alias{color_mapping_legend}
4 4
 \title{
5
-Draw legend based on color mapping  
6
-
5