... | ... |
@@ -25,6 +25,7 @@ Make Layout for the Heatmap List |
25 | 25 |
annotation_legend_list = list(), |
26 | 26 |
align_heatmap_legend = NULL, |
27 | 27 |
align_annotation_legend = NULL, |
28 |
+ legend_grouping = c("adjusted", "original"), |
|
28 | 29 |
|
29 | 30 |
ht_gap = unit(2, "mm"), |
30 | 31 |
|
... | ... |
@@ -93,6 +94,7 @@ Make Layout for the Heatmap List |
93 | 94 |
\item{annotation_legend_list}{A list of self-defined legends, should be wrapped into a list of \code{\link[grid:grid.grob]{grob}} objects. Normally they are constructed by \code{\link{Legend}}.} |
94 | 95 |
\item{align_heatmap_legend}{How to align the legends to heatmap. Possible values are "heatmap_center", "heatmap_top" and "global_center". If the value is \code{NULL}, it automatically picks the proper value from the three options.} |
95 | 96 |
\item{align_annotation_legend}{How to align the legends to heatmap. Possible values are "heatmap_center", "heatmap_top" and "global_center".} |
97 |
+ \item{legend_grouping}{How the legends are grouped. Values should be "adjusted" or "original".} |
|
96 | 98 |
\item{ht_gap}{Gap between heatmaps, should be a \code{\link[grid]{unit}} object. It can be a vector of length 1 or the number of heamtaps/annotations.} |
97 | 99 |
\item{main_heatmap}{Name or index for the main heatmap.} |
98 | 100 |
\item{padding}{Padding of the whole plot. The four values correspond to the bottom, left, top and right paddings.} |
... | ... |
@@ -23,6 +23,8 @@ Make Layout for the Heatmap List |
23 | 23 |
annotation_legend_side = c("right", "left", "bottom", "top"), |
24 | 24 |
show_annotation_legend = TRUE, |
25 | 25 |
annotation_legend_list = list(), |
26 |
+ align_heatmap_legend = NULL, |
|
27 |
+ align_annotation_legend = NULL, |
|
26 | 28 |
|
27 | 29 |
ht_gap = unit(2, "mm"), |
28 | 30 |
|
... | ... |
@@ -89,6 +91,8 @@ Make Layout for the Heatmap List |
89 | 91 |
\item{annotation_legend_side}{Side of annotation legends.} |
90 | 92 |
\item{show_annotation_legend}{Whether show annotation legends.} |
91 | 93 |
\item{annotation_legend_list}{A list of self-defined legends, should be wrapped into a list of \code{\link[grid:grid.grob]{grob}} objects. Normally they are constructed by \code{\link{Legend}}.} |
94 |
+ \item{align_heatmap_legend}{How to align the legends to heatmap. Possible values are "heatmap_center", "heatmap_top" and "global_center". If the value is \code{NULL}, it automatically picks the proper value from the three options.} |
|
95 |
+ \item{align_annotation_legend}{How to align the legends to heatmap. Possible values are "heatmap_center", "heatmap_top" and "global_center".} |
|
92 | 96 |
\item{ht_gap}{Gap between heatmaps, should be a \code{\link[grid]{unit}} object. It can be a vector of length 1 or the number of heamtaps/annotations.} |
93 | 97 |
\item{main_heatmap}{Name or index for the main heatmap.} |
94 | 98 |
\item{padding}{Padding of the whole plot. The four values correspond to the bottom, left, top and right paddings.} |
... | ... |
@@ -65,7 +65,13 @@ Make Layout for the Heatmap List |
65 | 65 |
column_km_repeats = NULL, |
66 | 66 |
column_split = NULL, |
67 | 67 |
width = NULL, |
68 |
- heatmap_width = NULL) |
|
68 |
+ heatmap_width = NULL, |
|
69 |
+ |
|
70 |
+ use_raster = NULL, |
|
71 |
+ raster_device = NULL, |
|
72 |
+ raster_quality = NULL, |
|
73 |
+ raster_device_param = NULL, |
|
74 |
+ raster_resize = NULL) |
|
69 | 75 |
} |
70 | 76 |
\arguments{ |
71 | 77 |
|
... | ... |
@@ -121,6 +127,11 @@ Make Layout for the Heatmap List |
121 | 127 |
\item{column_split}{Overwrite the corresponding setting in the main heatmap.} |
122 | 128 |
\item{width}{Overwrite the corresponding setting in the main heatmap.} |
123 | 129 |
\item{heatmap_width}{Overwrite the corresponding setting in the main heatmap.} |
130 |
+ \item{use_raster}{Overwrite the corresponding setting in every heatmap.} |
|
131 |
+ \item{raster_device}{Overwrite the corresponding setting in every heatmap.} |
|
132 |
+ \item{raster_quality}{Overwrite the corresponding setting in every heatmap.} |
|
133 |
+ \item{raster_device_param}{Overwrite the corresponding setting in every heatmap.} |
|
134 |
+ \item{raster_resize}{Overwrite the corresponding setting in every heatmap.} |
|
124 | 135 |
|
125 | 136 |
} |
126 | 137 |
\details{ |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,141 @@ |
1 |
+\name{make_layout-HeatmapList-method} |
|
2 |
+\alias{make_layout,HeatmapList-method} |
|
3 |
+\title{ |
|
4 |
+Make Layout for the Heatmap List |
|
5 |
+} |
|
6 |
+\description{ |
|
7 |
+Make Layout for the Heatmap List |
|
8 |
+} |
|
9 |
+\usage{ |
|
10 |
+\S4method{make_layout}{HeatmapList}(object, |
|
11 |
+ |
|
12 |
+ row_title = character(0), |
|
13 |
+ row_title_side = c("left", "right"), |
|
14 |
+ row_title_gp = gpar(fontsize = 14), |
|
15 |
+ column_title = character(0), |
|
16 |
+ column_title_side = c("top", "bottom"), |
|
17 |
+ column_title_gp = gpar(fontsize = 14), |
|
18 |
+ |
|
19 |
+ heatmap_legend_side = c("right", "left", "bottom", "top"), |
|
20 |
+ merge_legends = FALSE, |
|
21 |
+ show_heatmap_legend = TRUE, |
|
22 |
+ heatmap_legend_list = list(), |
|
23 |
+ annotation_legend_side = c("right", "left", "bottom", "top"), |
|
24 |
+ show_annotation_legend = TRUE, |
|
25 |
+ annotation_legend_list = list(), |
|
26 |
+ |
|
27 |
+ ht_gap = unit(2, "mm"), |
|
28 |
+ |
|
29 |
+ main_heatmap = which(sapply(object@ht_list, inherits, "Heatmap"))[1], |
|
30 |
+ padding = GLOBAL_PADDING, |
|
31 |
+ |
|
32 |
+ auto_adjust = TRUE, |
|
33 |
+ row_dend_side = c("original", "left", "right"), |
|
34 |
+ row_sub_title_side = c("original", "left", "right"), |
|
35 |
+ column_dend_side = c("original", "top", "bottom"), |
|
36 |
+ column_sub_title_side = c("original", "top", "bottom"), |
|
37 |
+ |
|
38 |
+ row_gap = NULL, |
|
39 |
+ cluster_rows = NULL, |
|
40 |
+ cluster_row_slices = NULL, |
|
41 |
+ clustering_distance_rows = NULL, |
|
42 |
+ clustering_method_rows = NULL, |
|
43 |
+ row_dend_width = NULL, |
|
44 |
+ show_row_dend = NULL, |
|
45 |
+ row_dend_reorder = NULL, |
|
46 |
+ row_dend_gp = NULL, |
|
47 |
+ row_order = NULL, |
|
48 |
+ row_km = NULL, |
|
49 |
+ row_km_repeats = NULL, |
|
50 |
+ row_split = NULL, |
|
51 |
+ height = NULL, |
|
52 |
+ heatmap_height = NULL, |
|
53 |
+ |
|
54 |
+ column_gap = NULL, |
|
55 |
+ cluster_columns = NULL, |
|
56 |
+ cluster_column_slices = NULL, |
|
57 |
+ clustering_distance_columns = NULL, |
|
58 |
+ clustering_method_columns = NULL, |
|
59 |
+ column_dend_width = NULL, |
|
60 |
+ show_column_dend = NULL, |
|
61 |
+ column_dend_reorder = NULL, |
|
62 |
+ column_dend_gp = NULL, |
|
63 |
+ column_order = NULL, |
|
64 |
+ column_km = NULL, |
|
65 |
+ column_km_repeats = NULL, |
|
66 |
+ column_split = NULL, |
|
67 |
+ width = NULL, |
|
68 |
+ heatmap_width = NULL) |
|
69 |
+} |
|
70 |
+\arguments{ |
|
71 |
+ |
|
72 |
+ \item{object}{A \code{\link{HeatmapList-class}} object.} |
|
73 |
+ \item{row_title}{Title on the row.} |
|
74 |
+ \item{row_title_side}{Will the title be put on the left or right of the heatmap list?} |
|
75 |
+ \item{row_title_gp}{Graphic parameters for the row title.} |
|
76 |
+ \item{column_title}{Title on the column.} |
|
77 |
+ \item{column_title_side}{Will the title be put on the top or bottom of the heatmap?} |
|
78 |
+ \item{column_title_gp}{Graphic parameters for the column title.} |
|
79 |
+ \item{heatmap_legend_side}{Side of the heatmap legends.} |
|
80 |
+ \item{merge_legends}{Whether to put heatmap legends and annotation legends together. By default they are put in different viewports.} |
|
81 |
+ \item{show_heatmap_legend}{Whether show heatmap legends.} |
|
82 |
+ \item{heatmap_legend_list}{A list of self-defined legends, should be wrapped into a list of \code{\link[grid:grid.grob]{grob}} objects. Normally they are constructed by \code{\link{Legend}}. } |
|
83 |
+ \item{annotation_legend_side}{Side of annotation legends.} |
|
84 |
+ \item{show_annotation_legend}{Whether show annotation legends.} |
|
85 |
+ \item{annotation_legend_list}{A list of self-defined legends, should be wrapped into a list of \code{\link[grid:grid.grob]{grob}} objects. Normally they are constructed by \code{\link{Legend}}.} |
|
86 |
+ \item{ht_gap}{Gap between heatmaps, should be a \code{\link[grid]{unit}} object. It can be a vector of length 1 or the number of heamtaps/annotations.} |
|
87 |
+ \item{main_heatmap}{Name or index for the main heatmap.} |
|
88 |
+ \item{padding}{Padding of the whole plot. The four values correspond to the bottom, left, top and right paddings.} |
|
89 |
+ \item{auto_adjust}{whether apply automatic adjustment? The auto-adjustment includes turning off dendrograms, titles and row/columns for non-main heatmaps.} |
|
90 |
+ \item{row_dend_side}{If auto-adjustment is on, to put the row dendrograms of the main heatmap to the most left side of the heatmap list or the most right side?} |
|
91 |
+ \item{row_sub_title_side}{There can be sub titles generated by the splitting of heatmaps. Similar setting as \code{row_dend_side}.} |
|
92 |
+ \item{column_dend_side}{Similar setting as \code{row_dend_side}.} |
|
93 |
+ \item{column_sub_title_side}{Similar setting as \code{row_sub_title_side}.} |
|
94 |
+ \item{row_gap}{Overwrite the corresponding setting in the main heatmap.} |
|
95 |
+ \item{cluster_rows}{Overwrite the corresponding setting in the main heatmap.} |
|
96 |
+ \item{cluster_row_slices}{Overwrite the corresponding setting in the main heatmap.} |
|
97 |
+ \item{clustering_distance_rows}{Overwrite the corresponding setting in the main heatmap.} |
|
98 |
+ \item{clustering_method_rows}{Overwrite the corresponding setting in the main heatmap.same setting as in \code{\link{Heatmap}}, if it is specified, \code{clustering_method_rows} in main heatmap is ignored.} |
|
99 |
+ \item{row_dend_width}{Overwrite the corresponding setting in the main heatmap.} |
|
100 |
+ \item{show_row_dend}{same Overwrite the corresponding setting in the main heatmap.} |
|
101 |
+ \item{row_dend_reorder}{Overwrite the corresponding setting in the main heatmap.} |
|
102 |
+ \item{row_dend_gp}{Overwrite the corresponding setting in the main heatmap.} |
|
103 |
+ \item{row_order}{Overwrite the corresponding setting in the main heatmap.} |
|
104 |
+ \item{row_km}{Overwrite the corresponding setting in the main heatmap.} |
|
105 |
+ \item{row_km_repeats}{Overwrite the corresponding setting in the main heatmap.} |
|
106 |
+ \item{row_split}{Overwrite the corresponding setting in the main heatmap.} |
|
107 |
+ \item{height}{Overwrite the corresponding setting in the main heatmap.} |
|
108 |
+ \item{heatmap_height}{Overwrite the corresponding setting in the main heatmap.} |
|
109 |
+ \item{column_gap}{Overwrite the corresponding setting in the main heatmap.} |
|
110 |
+ \item{cluster_columns}{Overwrite the corresponding setting in the main heatmap.} |
|
111 |
+ \item{cluster_column_slices}{Overwrite the corresponding setting in the main heatmap.} |
|
112 |
+ \item{clustering_distance_columns}{Overwrite the corresponding setting in the main heatmap.} |
|
113 |
+ \item{clustering_method_columns}{Overwrite the corresponding setting in the main heatmap.} |
|
114 |
+ \item{column_dend_width}{column Overwrite the corresponding setting in the main heatmap.} |
|
115 |
+ \item{show_column_dend}{Overwrite the corresponding setting in the main heatmap.} |
|
116 |
+ \item{column_dend_reorder}{Overwrite the corresponding setting in the main heatmap.} |
|
117 |
+ \item{column_dend_gp}{Overwrite the corresponding setting in the main heatmap.} |
|
118 |
+ \item{column_order}{Overwrite the corresponding setting in the main heatmap.} |
|
119 |
+ \item{column_km}{Overwrite the corresponding setting in the main heatmap.} |
|
120 |
+ \item{column_km_repeats}{Overwrite the corresponding setting in the main heatmap.} |
|
121 |
+ \item{column_split}{Overwrite the corresponding setting in the main heatmap.} |
|
122 |
+ \item{width}{Overwrite the corresponding setting in the main heatmap.} |
|
123 |
+ \item{heatmap_width}{Overwrite the corresponding setting in the main heatmap.} |
|
124 |
+ |
|
125 |
+} |
|
126 |
+\details{ |
|
127 |
+It sets the size of each component of the heatmap list and adjusts graphic |
|
128 |
+parameters for each heatmap if necessary. |
|
129 |
+ |
|
130 |
+This function is only for internal use. |
|
131 |
+} |
|
132 |
+\value{ |
|
133 |
+A \code{\link{HeatmapList-class}} object in which settings for all heatmap are adjusted. |
|
134 |
+} |
|
135 |
+\author{ |
|
136 |
+Zuguang Gu <z.gu@dkfz.de> |
|
137 |
+} |
|
138 |
+\examples{ |
|
139 |
+# There is no example |
|
140 |
+NULL |
|
141 |
+} |