Browse code

Commit made by the Bioconductor Git-SVN bridge.

Commit id: db263179df8a28bd25eb5afcf64aa9c37b2fdd32

refresh docs



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

z.gu authored on 12/08/2015 22:49:59
Showing 33 changed files

... ...
@@ -14,6 +14,7 @@ a color mapping function.
14 14
 }
15 15
 \section{Methods}{
16 16
 The \code{\link{ColorMapping-class}} provides following methods:
17
+
17 18
 \itemize{
18 19
   \item \code{\link{ColorMapping}}: contructor methods.
19 20
   \item \code{\link{map_to_colors,ColorMapping-method}}: mapping values to colors.
... ...
@@ -10,8 +10,10 @@ Making complex heatmap
10 10
 \details{
11 11
 This package aims to provide a simple and flexible way to arrange
12 12
 multiple heatmaps as well as self-defining annotation graphics.
13
+
13 14
 The package is implemented in an object-oriented way. 
14 15
 Components of heatmap lists are abstracted into several classes.
16
+
15 17
 \itemize{
16 18
   \item \code{\link{Heatmap-class}}: a single heatmap containing heatmap body, row/column names, titles, dendrograms and column annotations.
17 19
   \item \code{\link{HeatmapList-class}}: a list of heatmaps and row annotations.
... ...
@@ -19,6 +21,7 @@ Components of heatmap lists are abstracted into several classes.
19 21
 }
20 22
 
21 23
 There are also several internal classes:
24
+
22 25
 \itemize{
23 26
   \item \code{\link{SingleAnnotation-class}}: a single row annotation or column annotation.
24 27
   \item \code{\link{ColorMapping-class}}: mapping from values to colors.
... ...
@@ -26,5 +29,6 @@ There are also several internal classes:
26 29
 
27 30
 For plotting one single heatmap, please go to the documentation page of \code{\link{Heatmap}}.
28 31
 For plotting multiple heatmaps, please go to \code{\link{HeatmapList-class}} and \code{+.AdditiveUnit}.
32
+
29 33
 The vignette provides detailed explanation of how to use this package.
30 34
 }
... ...
@@ -9,6 +9,7 @@ Class for a single heatmap
9 9
 }
10 10
 \details{
11 11
 The components for a single heamtap are placed into a 9 x 7 layout:
12
+
12 13
   \preformatted{
13 14
 +------+ (1)
14 15
          +------+ (2)
... ...
@@ -23,6 +24,7 @@ The components for a single heamtap are placed into a 9 x 7 layout:
23 24
          +------+ (9)  }
24 25
 
25 26
 From top to bottom in column 4, the regions are:
27
+
26 28
 \itemize{
27 29
   \item title which is put on the top of the heatmap, graphics are drawn by \code{\link{draw_title,Heatmap-method}}.
28 30
   \item column cluster on the top, graphics are drawn by \code{\link{draw_hclust,Heatmap-method}}.
... ...
@@ -36,6 +38,7 @@ From top to bottom in column 4, the regions are:
36 38
 }
37 39
 
38 40
 From left to right in row 5, the regions are:
41
+
39 42
 \itemize{
40 43
   \item title which is put in the left of the heatmap, graphics are drawn by \code{\link{draw_title,Heatmap-method}}.
41 44
   \item row cluster on the left, graphics are drawn by \code{\link{draw_hclust,Heatmap-method}}.
... ...
@@ -52,6 +55,7 @@ and call \code{\link{draw,HeatmapList-method}} to make a complete heatmap.
52 55
 }
53 56
 \section{Methods}{
54 57
 The \code{\link{Heatmap-class}} provides following methods:
58
+
55 59
 \itemize{
56 60
   \item \code{\link{Heatmap}}: constructor method.
57 61
   \item \code{\link{draw,Heatmap-method}}: draw a single heatmap.
... ...
@@ -96,7 +96,9 @@ Heatmap(matrix, col, name, na_col = "grey", rect_gp = gpar(col = NA),
96 96
 \details{
97 97
 The initialization function only applies parameter checking and fill values to each slot with proper ones.
98 98
 Then it will be ready for clustering and layout.
99
+
99 100
 Following methods can be applied on the \code{\link{Heatmap-class}} object:
101
+
100 102
 \itemize{
101 103
   \item \code{\link{show,Heatmap-method}}: draw a single heatmap with default parameters
102 104
   \item \code{\link{draw,Heatmap-method}}: draw a single heatmap.
... ...
@@ -14,6 +14,7 @@ represented as a list of \code{\link{SingleAnnotation-class}} objects with same
14 14
 }
15 15
 \section{Methods}{
16 16
 The \code{\link{HeatmapAnnotation-class}} provides following methods:
17
+
17 18
 \itemize{
18 19
   \item \code{\link{HeatmapAnnotation}}: constructor method
19 20
   \item \code{\link{draw,HeatmapAnnotation-method}}: draw the annotations
... ...
@@ -9,7 +9,9 @@ Class for a list of heatmaps
9 9
 }
10 10
 \details{
11 11
 A heatmap list is defined as a list of heatmaps and row annotations.
12
+
12 13
 The components for the heamtap list are placed into a 7 x 7 layout:
14
+
13 15
   \preformatted{
14 16
 +------+(1)
15 17
          +------+(2)
... ...
@@ -22,6 +24,7 @@ The components for the heamtap list are placed into a 7 x 7 layout:
22 24
          +------+(7)  }
23 25
 
24 26
 From top to bottom in column 4, the regions are:
27
+
25 28
 \itemize{
26 29
   \item annotation legend on the top, graphics are drawn by \code{\link{draw_annotation_legend,HeatmapList-method}}.
27 30
   \item heatmap legend on the top, graphics are drawn by \code{\link{draw_heatmap_legend,HeatmapList-method}}.
... ...
@@ -33,6 +36,7 @@ From top to bottom in column 4, the regions are:
33 36
 }
34 37
 
35 38
 From left to right in row 4, the regions are:
39
+
36 40
 \itemize{
37 41
   \item annotation legend on the left, graphics are drawn by \code{\link{draw_annotation_legend,HeatmapList-method}}.
38 42
   \item heatmap legend on the left, graphics are drawn by \code{\link{draw_heatmap_legend,HeatmapList-method}}.
... ...
@@ -48,6 +52,7 @@ are placed one after the other.
48 52
 }
49 53
 \section{Methods}{
50 54
 The \code{\link{HeatmapList-class}} provides following methods:
55
+
51 56
 \itemize{
52 57
   \item \code{\link{draw,HeatmapList-method}}: draw the list of heatmaps and row annotations.
53 58
   \item \code{\link{add_heatmap,HeatmapList-method}} add heatmaps to the list of heatmaps.
... ...
@@ -13,11 +13,13 @@ the \code{\link{SingleAnnotation-class}} defines the basic unit of annotations.
13 13
 The most simple annotation is one row or one column grids in which different colors
14 14
 represent different classes of the data. The annotation can also be more complex
15 15
 graphics, such as a boxplot that shows data distribution in corresponding row or column.
16
+
16 17
 The \code{\link{SingleAnnotation-class}} is used for storing data for a single annotation and provides
17 18
 methods for drawing annotation graphics.
18 19
 }
19 20
 \section{Methods}{
20 21
 The \code{\link{SingleAnnotation-class}} provides following methods:
22
+
21 23
 \itemize{
22 24
   \item \code{\link{SingleAnnotation}}: constructor method
23 25
   \item \code{\link{draw,SingleAnnotation-method}}: draw the single annotation.
... ...
@@ -27,12 +27,15 @@ The most simple annotation is one row or one column grids in which different col
27 27
 represent different classes of the data. Here the function use \code{\link{ColorMapping-class}}
28 28
 to process such simple annotation. \code{value} and \code{col} arguments controls values and colors
29 29
 of the simple annotation and a \code{\link{ColorMapping-class}} object will be constructed based on \code{value} and \code{col}.
30
+
30 31
 \code{fun} is used to construct a more complex annotation. Users can add any type of annotation graphics
31 32
 by implementing a function. The only input argument of \code{fun} is a index
32 33
 of rows or columns which is already adjusted by the clustering. In the package, there are already
33 34
 several annotation graphic function generators: \code{\link{anno_points}}, \code{\link{anno_histogram}} and \code{\link{anno_boxplot}}.
35
+
34 36
 In the case that row annotations are splitted by rows, \code{index} corresponding to row orders in each row-slice
35 37
 and \code{fun} will be applied on each of the row slices.
38
+
36 39
 One thing that users should be careful is the difference of coordinates when the annotation is a row
37 40
 annotation or a column annotation.
38 41
 }
... ...
@@ -18,6 +18,7 @@ Add heatmaps or row annotations to a heatmap list
18 18
 \details{
19 19
 It is only a shortcut function. It actually calls \code{\link{add_heatmap,Heatmap-method}}, \code{\link{add_heatmap,HeatmapList-method}}
20 20
 or \code{\link{add_heatmap,HeatmapAnnotation-method}} depending on the class of the input objects.
21
+
21 22
 The \code{\link{HeatmapAnnotation-class}} object to be added should only be row annotations.
22 23
 }
23 24
 \value{
... ...
@@ -20,6 +20,7 @@ Size of the annotation legend viewport
20 20
 \details{
21 21
 Legends for all heatmaps or legends for all annotations will be put in one viewport. This function
22 22
 calculates the size of such viewport. Note graphic parameters for legends will affect the size.
23
+
23 24
 This function is only for internal use.
24 25
 }
25 26
 \value{
... ...
@@ -40,6 +40,7 @@ Draw legend based on color mapping
40 40
 }
41 41
 \details{
42 42
 A viewport is created which contains a legend title, legend grids and corresponding labels.
43
+
43 44
 This function will be improved in the future to support more types of legends.
44 45
 }
45 46
 \value{
... ...
@@ -16,6 +16,7 @@ columnAnnotation(...)
16 16
 }
17 17
 \details{
18 18
 The function is identical to
19
+
19 20
   \preformatted{
20 21
 HeatmapAnnotation(..., which = "column")  }
21 22
 }
... ...
@@ -19,6 +19,7 @@ Draw the single annotation
19 19
 }
20 20
 \details{
21 21
 A viewport is created.
22
+
22 23
 The graphics would be different depending the annotation is a row annotation or a column annotation.
23 24
 }
24 25
 \value{
... ...
@@ -18,8 +18,10 @@ Draw column annotations
18 18
 }
19 19
 \details{
20 20
 A viewport is created which contains column annotations.
21
+
21 22
 Since the column annotations is a \code{\link{HeatmapAnnotation-class}} object, the function
22 23
 calls \code{\link{draw,HeatmapAnnotation-method}} to draw the annotations.
24
+
23 25
 This function is only for internal use.
24 26
 }
25 27
 \value{
... ...
@@ -19,6 +19,7 @@ Draw legends for all column annotations
19 19
 }
20 20
 \details{
21 21
 A viewport is created which contains annotation legends.
22
+
22 23
 This function is only for internal use.
23 24
 }
24 25
 \value{
... ...
@@ -22,6 +22,7 @@ Draw row names or column names
22 22
 }
23 23
 \details{
24 24
 A viewport is created which contains row names or column names.
25
+
25 26
 This function is only for internal use.
26 27
 }
27 28
 \value{
... ...
@@ -23,7 +23,9 @@ Draw dendrogram on row or column
23 23
 \details{
24 24
 If the matrix is split into several row slices, a list of dendrograms will be drawn by 
25 25
 the heatmap that each dendrogram corresponds to its row slices.
26
+
26 27
 A viewport is created which contains dendrograms.
28
+
27 29
 This function is only for internal use.
28 30
 }
29 31
 \value{
... ...
@@ -21,7 +21,9 @@ Draw the heatmap body
21 21
 The matrix can be split into several parts by rows if \code{km} or \code{split} is 
22 22
 specified when initializing the \code{\link{Heatmap}} object. If the matrix is split, 
23 23
 there will be gaps between rows to identify different row-slice.
24
+
24 25
 A viewport is created which contains subset rows of the heatmap.
26
+
25 27
 This function is only for internal use.
26 28
 }
27 29
 \value{
... ...
@@ -19,6 +19,7 @@ Draw legends for all heatmaps
19 19
 }
20 20
 \details{
21 21
 A viewport is created which contains heatmap legends.
22
+
22 23
 This function is only for internal use.
23 24
 }
24 25
 \value{
... ...
@@ -17,6 +17,7 @@ Draw the list of heatmaps
17 17
 }
18 18
 \details{
19 19
 A viewport is created which contains heatmaps.
20
+
20 21
 This function is only for internal use.
21 22
 }
22 23
 \value{
... ...
@@ -20,6 +20,7 @@ Draw heatmap title
20 20
 }
21 21
 \details{
22 22
 A viewport is created which contains heatmap title.
23
+
23 24
 This function is only for internal use.
24 25
 }
25 26
 \value{
... ...
@@ -18,6 +18,7 @@ Draw heatmap list title
18 18
 }
19 19
 \details{
20 20
 A viewport is created which contains heatmap list title.
21
+
21 22
 This function is only for internal use.
22 23
 }
23 24
 \value{
... ...
@@ -17,6 +17,7 @@ Get a list of color mapping objects
17 17
 }
18 18
 \details{
19 19
 Color mapping for visible simple annotations are only returned.
20
+
20 21
 This function is only for internal use.
21 22
 }
22 23
 \value{
... ...
@@ -17,6 +17,7 @@ Get a list of color mapping parameters
17 17
 }
18 18
 \details{
19 19
 Color mapping parameters for visible simple annotations are only returned.
20
+
20 21
 This function is only for internal use.
21 22
 }
22 23
 \value{
... ...
@@ -21,6 +21,7 @@ grid.dendrogram(dend, facing = c("bottom", "top", "left", "right"),
21 21
 }
22 22
 \details{
23 23
 The dendrogram tree can be renderred (e.g. by \code{dendextend} package).
24
+
24 25
 A viewport is created which contains the dendrogram.
25 26
 }
26 27
 \value{
... ...
@@ -19,6 +19,7 @@ ht_global_opt(..., RESET = FALSE, READ.ONLY = NULL)
19 19
 \details{
20 20
 You can set some parameters for all heatmaps/annotations by this global function.
21 21
 There are following parameters:
22
+
22 23
 \describe{
23 24
   \item{heatmap_row_names_gp}{set \code{row_names_gp} in \code{\link{Heatmap}}.}
24 25
   \item{heatmap_column_names_gp}{set \code{column_names_gp} in \code{\link{Heatmap}}.}
... ...
@@ -17,6 +17,7 @@ Make cluster on columns
17 17
 }
18 18
 \details{
19 19
 The function will fill or adjust \code{column_hclust} and \code{column_order} slots.
20
+
20 21
 This function is only for internal use.
21 22
 }
22 23
 \value{
... ...
@@ -17,8 +17,10 @@ Make the layout of a single heatmap
17 17
 \details{
18 18
 The layout of the single heatmap will be established by setting the size of each heatmap components.
19 19
 Also functions that make graphics for heatmap components will be recorded.
20
+
20 21
 Whether apply row clustering or column clustering affects the layout, so clustering should be applied 
21 22
 first before making the layout.
23
+
22 24
 This function is only for internal use.
23 25
 }
24 26
 \value{
... ...
@@ -43,7 +43,9 @@ Make layout for the complete plot
43 43
 }
44 44
 \details{
45 45
 It sets the size of each component of the heatmap list and adjusts graphic parameters for each heatmap if necessary.
46
+
46 47
 The layout for the heatmap list and layout for each heatmap are calculated when drawing the heatmap list.
48
+
47 49
 This function is only for internal use.
48 50
 }
49 51
 \value{
... ...
@@ -17,7 +17,9 @@ Make cluster on rows
17 17
 }
18 18
 \details{
19 19
 The function will fill or adjust \code{row_hclust_list}, \code{row_order_list}, \code{row_title} and \code{matrix_param} slots.
20
+
20 21
 If \code{order} is defined, no clustering will be applied.
22
+
21 23
 This function is only for internal use.
22 24
 }
23 25
 \value{
... ...
@@ -32,6 +32,7 @@ plotDataFrame(df, overlap = 0.25, nlevel = 30, show_row_names = TRUE,
32 32
 \details{
33 33
 The data frame contains heterogeneous information. The \code{\link{plotDataFrame}} function provides a simple and quick way to
34 34
 visualize information that are stored in a data frame.
35
+
35 36
 There are only a few advanced settings in this function, so the heamtap generated by this functioin
36 37
 may look ugly (in most of the time). However, users can customize the style of the heatmaps by manually
37 38
 constructing a \code{\link{HeatmapList}} object.
... ...
@@ -18,6 +18,7 @@ Prepare the heatmap
18 18
 }
19 19
 \details{
20 20
 The preparation of the heatmap includes following steps:
21
+
21 22
 \itemize{
22 23
   \item making clustering on rows if specified (by calling \code{\link{make_row_cluster,Heatmap-method}})
23 24
   \item making clustering on columns if specified (by calling \code{\link{make_column_cluster,Heatmap-method}})
... ...
@@ -16,6 +16,7 @@ rowAnnotation(...)
16 16
 }
17 17
 \details{
18 18
 The function is identical to
19
+
19 20
   \preformatted{
20 21
 HeatmapAnnotation(..., which = "row")  }
21 22
 }