... | ... |
@@ -30,43 +30,50 @@ gheatmap( |
30 | 30 |
|
31 | 31 |
\item{data}{matrix or data.frame} |
32 | 32 |
|
33 |
-\item{offset}{offset of heatmap to tree} |
|
33 |
+\item{offset}{set offset of the heatmap to tree} |
|
34 | 34 |
|
35 |
-\item{width}{total width of heatmap, compare to width of tree} |
|
35 |
+\item{width}{total width of heatmap, compare to width of tree, defaults to 1, |
|
36 |
+which means they are of the same length} |
|
36 | 37 |
|
37 |
-\item{low}{color of lowest value} |
|
38 |
+\item{low}{set color of the lowest value, defaults to "green"} |
|
38 | 39 |
|
39 |
-\item{high}{color of highest value} |
|
40 |
+\item{high}{set color of the highest value, defaults to "red"} |
|
40 | 41 |
|
41 |
-\item{color}{color of heatmap cell border} |
|
42 |
+\item{color}{set color of heatmap cell border, defaults to "white"} |
|
42 | 43 |
|
43 |
-\item{colnames}{logical, add matrix colnames or not} |
|
44 |
+\item{colnames}{logical, whether to add matrix colnames, defaults to "TRUE"} |
|
44 | 45 |
|
45 |
-\item{colnames_position}{one of 'bottom' or 'top'} |
|
46 |
+\item{colnames_position}{set the position of the colnames, one of 'bottom' (default) or 'top'} |
|
46 | 47 |
|
47 |
-\item{colnames_angle}{angle of column names} |
|
48 |
+\item{colnames_angle}{set the angle of colnames} |
|
48 | 49 |
|
49 |
-\item{colnames_level}{levels of colnames} |
|
50 |
+\item{colnames_level}{set levels of colnames} |
|
50 | 51 |
|
51 |
-\item{colnames_offset_x}{x offset for column names} |
|
52 |
+\item{colnames_offset_x}{set x offset for colnames} |
|
52 | 53 |
|
53 |
-\item{colnames_offset_y}{y offset for column names} |
|
54 |
+\item{colnames_offset_y}{set y offset for colnames} |
|
54 | 55 |
|
55 |
-\item{font.size}{font size of matrix colnames} |
|
56 |
+\item{font.size}{set font size of matrix colnames} |
|
56 | 57 |
|
57 |
-\item{family}{font of matrix colnames} |
|
58 |
+\item{family}{font of matrix colnames, can be any supported font} |
|
58 | 59 |
|
59 |
-\item{hjust}{hjust for column names (0: align left, 0.5: align center, 1: align righ)} |
|
60 |
+\item{hjust}{adjust horizonal position of column names (0: align left, 0.5: align center (default), 1: align righ)} |
|
60 | 61 |
|
61 | 62 |
\item{legend_title}{title of fill legend} |
62 | 63 |
|
63 |
-\item{custom_column_labels}{instead of the column names from a matrix, input a custom vector of column labels} |
|
64 |
+\item{custom_column_labels}{instead of using the colnames from the input matrix/data.frame, |
|
65 |
+input a custom vector to be set as column labels} |
|
64 | 66 |
} |
65 | 67 |
\value{ |
66 | 68 |
tree view |
67 | 69 |
} |
68 | 70 |
\description{ |
69 |
-append a heatmap of a matrix to right side of phylogenetic tree |
|
71 |
+append a heatmap of a matrix to the right side of a phylogenetic tree |
|
72 |
+} |
|
73 |
+\references{ |
|
74 |
+For demonstration of this function, please refer to chapter 7.3 of |
|
75 |
+\emph{Data Integration, Manipulation and Visualization of Phylogenetic Trees} |
|
76 |
+\url{http://yulab-smu.top/treedata-book/index.html} by Guangchuang Yu. |
|
70 | 77 |
} |
71 | 78 |
\author{ |
72 | 79 |
Guangchuang Yu |
... | ... |
@@ -21,7 +21,8 @@ gheatmap( |
21 | 21 |
font.size = 4, |
22 | 22 |
family = "", |
23 | 23 |
hjust = 0.5, |
24 |
- legend_title = "value" |
|
24 |
+ legend_title = "value", |
|
25 |
+ custom_column_labels = NULL |
|
25 | 26 |
) |
26 | 27 |
} |
27 | 28 |
\arguments{ |
... | ... |
@@ -58,6 +59,8 @@ gheatmap( |
58 | 59 |
\item{hjust}{hjust for column names (0: align left, 0.5: align center, 1: align righ)} |
59 | 60 |
|
60 | 61 |
\item{legend_title}{title of fill legend} |
62 |
+ |
|
63 |
+\item{custom_column_labels}{instead of the column names from a matrix, input a custom vector of column labels} |
|
61 | 64 |
} |
62 | 65 |
\value{ |
63 | 66 |
tree view |
... | ... |
@@ -19,6 +19,7 @@ gheatmap( |
19 | 19 |
colnames_offset_x = 0, |
20 | 20 |
colnames_offset_y = 0, |
21 | 21 |
font.size = 4, |
22 |
+ family = "", |
|
22 | 23 |
hjust = 0.5, |
23 | 24 |
legend_title = "value" |
24 | 25 |
) |
... | ... |
@@ -52,6 +53,8 @@ gheatmap( |
52 | 53 |
|
53 | 54 |
\item{font.size}{font size of matrix colnames} |
54 | 55 |
|
56 |
+\item{family}{font of matrix colnames} |
|
57 |
+ |
|
55 | 58 |
\item{hjust}{hjust for column names (0: align left, 0.5: align center, 1: align righ)} |
56 | 59 |
|
57 | 60 |
\item{legend_title}{title of fill legend} |
... | ... |
@@ -4,12 +4,24 @@ |
4 | 4 |
\alias{gheatmap} |
5 | 5 |
\title{gheatmap} |
6 | 6 |
\usage{ |
7 |
-gheatmap(p, data, offset = 0, width = 1, low = "green", |
|
8 |
- high = "red", color = "white", colnames = TRUE, |
|
9 |
- colnames_position = "bottom", colnames_angle = 0, |
|
10 |
- colnames_level = NULL, colnames_offset_x = 0, |
|
11 |
- colnames_offset_y = 0, font.size = 4, hjust = 0.5, |
|
12 |
- legend_title = "value") |
|
7 |
+gheatmap( |
|
8 |
+ p, |
|
9 |
+ data, |
|
10 |
+ offset = 0, |
|
11 |
+ width = 1, |
|
12 |
+ low = "green", |
|
13 |
+ high = "red", |
|
14 |
+ color = "white", |
|
15 |
+ colnames = TRUE, |
|
16 |
+ colnames_position = "bottom", |
|
17 |
+ colnames_angle = 0, |
|
18 |
+ colnames_level = NULL, |
|
19 |
+ colnames_offset_x = 0, |
|
20 |
+ colnames_offset_y = 0, |
|
21 |
+ font.size = 4, |
|
22 |
+ hjust = 0.5, |
|
23 |
+ legend_title = "value" |
|
24 |
+) |
|
13 | 25 |
} |
14 | 26 |
\arguments{ |
15 | 27 |
\item{p}{tree view} |
... | ... |
@@ -8,7 +8,8 @@ gheatmap(p, data, offset = 0, width = 1, low = "green", |
8 | 8 |
high = "red", color = "white", colnames = TRUE, |
9 | 9 |
colnames_position = "bottom", colnames_angle = 0, |
10 | 10 |
colnames_level = NULL, colnames_offset_x = 0, |
11 |
- colnames_offset_y = 0, font.size = 4, hjust = 0.5) |
|
11 |
+ colnames_offset_y = 0, font.size = 4, hjust = 0.5, |
|
12 |
+ legend_title = "value") |
|
12 | 13 |
} |
13 | 14 |
\arguments{ |
14 | 15 |
\item{p}{tree view} |
... | ... |
@@ -40,6 +41,8 @@ gheatmap(p, data, offset = 0, width = 1, low = "green", |
40 | 41 |
\item{font.size}{font size of matrix colnames} |
41 | 42 |
|
42 | 43 |
\item{hjust}{hjust for column names (0: align left, 0.5: align center, 1: align righ)} |
44 |
+ |
|
45 |
+\item{legend_title}{title of fill legend} |
|
43 | 46 |
} |
44 | 47 |
\value{ |
45 | 48 |
tree view |
... | ... |
@@ -4,9 +4,10 @@ |
4 | 4 |
\alias{gheatmap} |
5 | 5 |
\title{gheatmap} |
6 | 6 |
\usage{ |
7 |
-gheatmap(p, data, offset = 0, width = 1, low = "green", high = "red", |
|
8 |
- color = "white", colnames = TRUE, colnames_position = "bottom", |
|
9 |
- colnames_angle = 0, colnames_level = NULL, colnames_offset_x = 0, |
|
7 |
+gheatmap(p, data, offset = 0, width = 1, low = "green", |
|
8 |
+ high = "red", color = "white", colnames = TRUE, |
|
9 |
+ colnames_position = "bottom", colnames_angle = 0, |
|
10 |
+ colnames_level = NULL, colnames_offset_x = 0, |
|
10 | 11 |
colnames_offset_y = 0, font.size = 4, hjust = 0.5) |
11 | 12 |
} |
12 | 13 |
\arguments{ |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@120776 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -6,7 +6,8 @@ |
6 | 6 |
\usage{ |
7 | 7 |
gheatmap(p, data, offset = 0, width = 1, low = "green", high = "red", |
8 | 8 |
color = "white", colnames = TRUE, colnames_position = "bottom", |
9 |
- colnames_level = NULL, font.size = 4) |
|
9 |
+ colnames_angle = 0, colnames_level = NULL, colnames_offset_x = 0, |
|
10 |
+ colnames_offset_y = 0, font.size = 4, hjust = 0.5) |
|
10 | 11 |
} |
11 | 12 |
\arguments{ |
12 | 13 |
\item{p}{tree view} |
... | ... |
@@ -27,9 +28,17 @@ gheatmap(p, data, offset = 0, width = 1, low = "green", high = "red", |
27 | 28 |
|
28 | 29 |
\item{colnames_position}{one of 'bottom' or 'top'} |
29 | 30 |
|
31 |
+\item{colnames_angle}{angle of column names} |
|
32 |
+ |
|
30 | 33 |
\item{colnames_level}{levels of colnames} |
31 | 34 |
|
35 |
+\item{colnames_offset_x}{x offset for column names} |
|
36 |
+ |
|
37 |
+\item{colnames_offset_y}{y offset for column names} |
|
38 |
+ |
|
32 | 39 |
\item{font.size}{font size of matrix colnames} |
40 |
+ |
|
41 |
+\item{hjust}{hjust for column names (0: align left, 0.5: align center, 1: align righ)} |
|
33 | 42 |
} |
34 | 43 |
\value{ |
35 | 44 |
tree view |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@113679 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -1,12 +1,12 @@ |
1 | 1 |
% Generated by roxygen2: do not edit by hand |
2 |
-% Please edit documentation in R/gplot.R |
|
2 |
+% Please edit documentation in R/gheatmap.R |
|
3 | 3 |
\name{gheatmap} |
4 | 4 |
\alias{gheatmap} |
5 | 5 |
\title{gheatmap} |
6 | 6 |
\usage{ |
7 | 7 |
gheatmap(p, data, offset = 0, width = 1, low = "green", high = "red", |
8 | 8 |
color = "white", colnames = TRUE, colnames_position = "bottom", |
9 |
- font.size = 4) |
|
9 |
+ colnames_level = NULL, font.size = 4) |
|
10 | 10 |
} |
11 | 11 |
\arguments{ |
12 | 12 |
\item{p}{tree view} |
... | ... |
@@ -27,6 +27,8 @@ gheatmap(p, data, offset = 0, width = 1, low = "green", high = "red", |
27 | 27 |
|
28 | 28 |
\item{colnames_position}{one of 'bottom' or 'top'} |
29 | 29 |
|
30 |
+\item{colnames_level}{levels of colnames} |
|
31 |
+ |
|
30 | 32 |
\item{font.size}{font size of matrix colnames} |
31 | 33 |
} |
32 | 34 |
\value{ |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@111813 bc3139a8-67e5-0310-9ffc-ced21a209358
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@107837 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -5,7 +5,8 @@ |
5 | 5 |
\title{gheatmap} |
6 | 6 |
\usage{ |
7 | 7 |
gheatmap(p, data, offset = 0, width = 1, low = "green", high = "red", |
8 |
- color = "white", colnames = TRUE, font.size = 4) |
|
8 |
+ color = "white", colnames = TRUE, colnames_position = "bottom", |
|
9 |
+ font.size = 4) |
|
9 | 10 |
} |
10 | 11 |
\arguments{ |
11 | 12 |
\item{p}{tree view} |
... | ... |
@@ -24,6 +25,8 @@ gheatmap(p, data, offset = 0, width = 1, low = "green", high = "red", |
24 | 25 |
|
25 | 26 |
\item{colnames}{logical, add matrix colnames or not} |
26 | 27 |
|
28 |
+\item{colnames_position}{one of 'bottom' or 'top'} |
|
29 |
+ |
|
27 | 30 |
\item{font.size}{font size of matrix colnames} |
28 | 31 |
} |
29 | 32 |
\value{ |
Commit id: 7c6eb6f90218928633147306f8bacd86a5cdd944
mask & scale_x_ggtree function
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@104466 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -4,7 +4,7 @@ |
4 | 4 |
\alias{gheatmap} |
5 | 5 |
\title{gheatmap} |
6 | 6 |
\usage{ |
7 |
-gheatmap(p, data, offset = 0, width = NULL, low = "green", high = "red", |
|
7 |
+gheatmap(p, data, offset = 0, width = 1, low = "green", high = "red", |
|
8 | 8 |
color = "white", colnames = TRUE, font.size = 4) |
9 | 9 |
} |
10 | 10 |
\arguments{ |
... | ... |
@@ -14,7 +14,7 @@ gheatmap(p, data, offset = 0, width = NULL, low = "green", high = "red", |
14 | 14 |
|
15 | 15 |
\item{offset}{offset of heatmap to tree} |
16 | 16 |
|
17 |
-\item{width}{width of each cell in heatmap} |
|
17 |
+\item{width}{total width of heatmap, compare to width of tree} |
|
18 | 18 |
|
19 | 19 |
\item{low}{color of lowest value} |
20 | 20 |
|
Commit id: 8450c8e87951a6eafa247c28535dd93b7d9aa9fa
o update add_colorbar <2015-05-21, Thu>
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@104028 bc3139a8-67e5-0310-9ffc-ced21a209358
Commit id: be8421a1e7f3fa220c129ffad6e504004c9c2a8d
update vignette
Commit id: c7eea4289c6eba9f4b8b9ebd94f43434f72a95c3
gheatmap
Commit id: 9ab91767cb73fcf158295ce393a6a3c10c2974bc
add_legend
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@103916 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,38 @@ |
1 |
+% Generated by roxygen2 (4.1.1): do not edit by hand |
|
2 |
+% Please edit documentation in R/gplot.R |
|
3 |
+\name{gheatmap} |
|
4 |
+\alias{gheatmap} |
|
5 |
+\title{gheatmap} |
|
6 |
+\usage{ |
|
7 |
+gheatmap(p, data, offset = 0, width, low = "green", high = "red", |
|
8 |
+ color = "white", colnames = TRUE, font.size = 4) |
|
9 |
+} |
|
10 |
+\arguments{ |
|
11 |
+\item{p}{tree view} |
|
12 |
+ |
|
13 |
+\item{data}{matrix or data.frame} |
|
14 |
+ |
|
15 |
+\item{offset}{offset of heatmap to tree} |
|
16 |
+ |
|
17 |
+\item{width}{width of each cell in heatmap} |
|
18 |
+ |
|
19 |
+\item{low}{color of lowest value} |
|
20 |
+ |
|
21 |
+\item{high}{color of highest value} |
|
22 |
+ |
|
23 |
+\item{color}{color of heatmap cell border} |
|
24 |
+ |
|
25 |
+\item{colnames}{logical, add matrix colnames or not} |
|
26 |
+ |
|
27 |
+\item{font.size}{font size of matrix colnames} |
|
28 |
+} |
|
29 |
+\value{ |
|
30 |
+tree view |
|
31 |
+} |
|
32 |
+\description{ |
|
33 |
+append a heatmap of a matrix to right side of phylogenetic tree |
|
34 |
+} |
|
35 |
+\author{ |
|
36 |
+Guangchuang Yu |
|
37 |
+} |
|
38 |
+ |