1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,45 +0,0 @@ |
1 |
-\name{decorate_heatmap_body} |
|
2 |
-\alias{decorate_heatmap_body} |
|
3 |
-\title{ |
|
4 |
-Decorate Heatmap Bodies |
|
5 |
-} |
|
6 |
-\description{ |
|
7 |
-Decorate Heatmap Bodies |
|
8 |
-} |
|
9 |
-\usage{ |
|
10 |
-decorate_heatmap_body(heatmap, code, |
|
11 |
- slice = 1, row_slice = slice, column_slice = 1, |
|
12 |
- envir = new.env(parent = parent.frame())) |
|
13 |
-} |
|
14 |
-\arguments{ |
|
15 |
- |
|
16 |
- \item{heatmap}{Name of the heatmap which is set as \code{name} argument in \code{\link{Heatmap}} function.} |
|
17 |
- \item{code}{Code that adds graphics in the selected heatmap body.} |
|
18 |
- \item{slice}{Index of the row slice in the heatmap.} |
|
19 |
- \item{row_slice}{Index of the row slice in the heatmap.} |
|
20 |
- \item{column_slice}{Index of the column slice in the heatmap.} |
|
21 |
- \item{envir}{Where to look for variables inside \code{code}.} |
|
22 |
- |
|
23 |
-} |
|
24 |
-\details{ |
|
25 |
-There is a viewport for each slice in each heatmap. |
|
26 |
-This function contructs the name of the viewport, |
|
27 |
-goes to the viewport by \code{\link[grid:viewports]{seekViewport}}, runs the code |
|
28 |
-to that viewport and finally goes back to the original viewport. |
|
29 |
-} |
|
30 |
-\value{ |
|
31 |
-This function returns no value. |
|
32 |
-} |
|
33 |
-\seealso{ |
|
34 |
-\url{https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-decoration.html} |
|
35 |
-} |
|
36 |
-\author{ |
|
37 |
-Zuguang Gu <z.gu@dkfz.de> |
|
38 |
-} |
|
39 |
-\examples{ |
|
40 |
-set.seed(123) |
|
41 |
-Heatmap(matrix(rnorm(100), 10), name = "mat") |
|
42 |
-decorate_heatmap_body("mat", { |
|
43 |
- grid.circle(gp = gpar(fill = "#FF000080")) |
|
44 |
-}) |
|
45 |
-} |
... | ... |
@@ -24,7 +24,7 @@ decorate_heatmap_body(heatmap, code, |
24 | 24 |
\details{ |
25 | 25 |
There is a viewport for each slice in each heatmap. |
26 | 26 |
This function contructs the name of the viewport, |
27 |
-goes to the viewport by \code{\link[grid]{seekViewport}}, runs the code |
|
27 |
+goes to the viewport by \code{\link[grid:viewports]{seekViewport}}, runs the code |
|
28 | 28 |
to that viewport and finally goes back to the original viewport. |
29 | 29 |
} |
30 | 30 |
\value{ |
... | ... |
@@ -1,10 +1,10 @@ |
1 | 1 |
\name{decorate_heatmap_body} |
2 | 2 |
\alias{decorate_heatmap_body} |
3 | 3 |
\title{ |
4 |
-Decorate the heatmap body |
|
4 |
+Decorate Heatmap Bodies |
|
5 | 5 |
} |
6 | 6 |
\description{ |
7 |
-Decorate the heatmap body |
|
7 |
+Decorate Heatmap Bodies |
|
8 | 8 |
} |
9 | 9 |
\usage{ |
10 | 10 |
decorate_heatmap_body(heatmap, code, |
... | ... |
@@ -13,23 +13,26 @@ decorate_heatmap_body(heatmap, code, |
13 | 13 |
} |
14 | 14 |
\arguments{ |
15 | 15 |
|
16 |
- \item{heatmap}{name of the heatmap which is set as \code{name} argument in \code{\link{Heatmap}} function.} |
|
17 |
- \item{code}{code that adds graphics in the selected heatmap body.} |
|
18 |
- \item{slice}{index of row slices in the heatmap.} |
|
19 |
- \item{row_slice}{index of row slices in the heatmap.} |
|
20 |
- \item{column_slice}{index of column slices in the heatmap.} |
|
21 |
- \item{envir}{where to look for variables inside \code{code}} |
|
16 |
+ \item{heatmap}{Name of the heatmap which is set as \code{name} argument in \code{\link{Heatmap}} function.} |
|
17 |
+ \item{code}{Code that adds graphics in the selected heatmap body.} |
|
18 |
+ \item{slice}{Index of the row slice in the heatmap.} |
|
19 |
+ \item{row_slice}{Index of the row slice in the heatmap.} |
|
20 |
+ \item{column_slice}{Index of the column slice in the heatmap.} |
|
21 |
+ \item{envir}{Where to look for variables inside \code{code}.} |
|
22 | 22 |
|
23 | 23 |
} |
24 | 24 |
\details{ |
25 |
-There is a viewport for each row slice and each column slice in each heatmap. |
|
25 |
+There is a viewport for each slice in each heatmap. |
|
26 | 26 |
This function contructs the name of the viewport, |
27 |
-goes to the viewport by \code{\link[grid]{seekViewport}} and applies code |
|
28 |
-to that viewport. |
|
27 |
+goes to the viewport by \code{\link[grid]{seekViewport}}, runs the code |
|
28 |
+to that viewport and finally goes back to the original viewport. |
|
29 | 29 |
} |
30 | 30 |
\value{ |
31 | 31 |
This function returns no value. |
32 | 32 |
} |
33 |
+\seealso{ |
|
34 |
+\url{https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-decoration.html} |
|
35 |
+} |
|
33 | 36 |
\author{ |
34 | 37 |
Zuguang Gu <z.gu@dkfz.de> |
35 | 38 |
} |
... | ... |
@@ -13,11 +13,11 @@ decorate_heatmap_body(heatmap, code, |
13 | 13 |
} |
14 | 14 |
\arguments{ |
15 | 15 |
|
16 |
- \item{heatmap}{name of the heatmap which is set as \code{name} argument in \code{\link{Heatmap}} function} |
|
17 |
- \item{code}{code that adds graphics in the selected heatmap body} |
|
18 |
- \item{slice}{index of row slices in the heatmap} |
|
19 |
- \item{row_slice}{index of row slices in the heatmap} |
|
20 |
- \item{column_slice}{index of column slices in the heatmap} |
|
16 |
+ \item{heatmap}{name of the heatmap which is set as \code{name} argument in \code{\link{Heatmap}} function.} |
|
17 |
+ \item{code}{code that adds graphics in the selected heatmap body.} |
|
18 |
+ \item{slice}{index of row slices in the heatmap.} |
|
19 |
+ \item{row_slice}{index of row slices in the heatmap.} |
|
20 |
+ \item{column_slice}{index of column slices in the heatmap.} |
|
21 | 21 |
\item{envir}{where to look for variables inside \code{code}} |
22 | 22 |
|
23 | 23 |
} |
... | ... |
@@ -26,22 +26,6 @@ There is a viewport for each row slice and each column slice in each heatmap. |
26 | 26 |
This function contructs the name of the viewport, |
27 | 27 |
goes to the viewport by \code{\link[grid]{seekViewport}} and applies code |
28 | 28 |
to that viewport. |
29 |
- |
|
30 |
-If you know the number of rows and columns for that row slice, it is |
|
31 |
-simple to calculate the position of every small grid in the row slice. |
|
32 |
-E.g., the position for the grid in i^th row and j^th column is: |
|
33 |
- |
|
34 |
- \preformatted{ |
|
35 |
- # assume nc is the number of columns |
|
36 |
- # and nr is the number of rows in that row slice |
|
37 |
- unit((i-0.5)/nc, "npc") |
|
38 |
- unit((j-0.5)/nr, "npc") |
|
39 |
- |
|
40 |
- # the width is |
|
41 |
- unit(1/nc, "npc") |
|
42 |
- |
|
43 |
- # the height is |
|
44 |
- unit(1/nr, "npc") } |
|
45 | 29 |
} |
46 | 30 |
\value{ |
47 | 31 |
This function returns no value. |
1 | 1 |
old mode 100755 |
2 | 2 |
new mode 100644 |
... | ... |
@@ -7,18 +7,22 @@ Decorate the heatmap body |
7 | 7 |
Decorate the heatmap body |
8 | 8 |
} |
9 | 9 |
\usage{ |
10 |
-decorate_heatmap_body(heatmap, code, slice = 1, envir = new.env(parent = parent.frame())) |
|
10 |
+decorate_heatmap_body(heatmap, code, |
|
11 |
+ slice = 1, row_slice = slice, column_slice = 1, |
|
12 |
+ envir = new.env(parent = parent.frame())) |
|
11 | 13 |
} |
12 | 14 |
\arguments{ |
13 | 15 |
|
14 |
- \item{heatmap}{name of the heatmap which is set as \code{name} option in \code{\link{Heatmap}} function} |
|
16 |
+ \item{heatmap}{name of the heatmap which is set as \code{name} argument in \code{\link{Heatmap}} function} |
|
15 | 17 |
\item{code}{code that adds graphics in the selected heatmap body} |
16 |
- \item{slice}{index of row slices in the heatmap if it is split by rows} |
|
18 |
+ \item{slice}{index of row slices in the heatmap} |
|
19 |
+ \item{row_slice}{index of row slices in the heatmap} |
|
20 |
+ \item{column_slice}{index of column slices in the heatmap} |
|
17 | 21 |
\item{envir}{where to look for variables inside \code{code}} |
18 | 22 |
|
19 | 23 |
} |
20 | 24 |
\details{ |
21 |
-There is a viewport for each row slice in each heatmap. |
|
25 |
+There is a viewport for each row slice and each column slice in each heatmap. |
|
22 | 26 |
This function contructs the name of the viewport, |
23 | 27 |
goes to the viewport by \code{\link[grid]{seekViewport}} and applies code |
24 | 28 |
to that viewport. |
... | ... |
@@ -7,13 +7,14 @@ Decorate the heatmap body |
7 | 7 |
Decorate the heatmap body |
8 | 8 |
} |
9 | 9 |
\usage{ |
10 |
-decorate_heatmap_body(heatmap, code, slice = 1) |
|
10 |
+decorate_heatmap_body(heatmap, code, slice = 1, envir = new.env(parent = parent.frame())) |
|
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
|
14 | 14 |
\item{heatmap}{name of the heatmap which is set as \code{name} option in \code{\link{Heatmap}} function} |
15 | 15 |
\item{code}{code that adds graphics in the selected heatmap body} |
16 | 16 |
\item{slice}{index of row slices in the heatmap if it is split by rows} |
17 |
+ \item{envir}{where to look for variables inside \code{code}} |
|
17 | 18 |
|
18 | 19 |
} |
19 | 20 |
\details{ |
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@114991 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -22,7 +22,7 @@ This function contructs the name of the viewport, |
22 | 22 |
goes to the viewport by \code{\link[grid]{seekViewport}} and applies code |
23 | 23 |
to that viewport. |
24 | 24 |
|
25 |
-Since you know the number of rows and columns for that row slice, it is |
|
25 |
+If you know the number of rows and columns for that row slice, it is |
|
26 | 26 |
simple to calculate the position of every small grid in the row slice. |
27 | 27 |
E.g., the position for the grid in i^th row and j^th column is: |
28 | 28 |
|
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@111684 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -11,9 +11,9 @@ decorate_heatmap_body(heatmap, code, slice = 1) |
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
|
14 |
- \item{heatmap}{name of the heatmap} |
|
14 |
+ \item{heatmap}{name of the heatmap which is set as \code{name} option in \code{\link{Heatmap}} function} |
|
15 | 15 |
\item{code}{code that adds graphics in the selected heatmap body} |
16 |
- \item{slice}{index of row slices in the heatmap} |
|
16 |
+ \item{slice}{index of row slices in the heatmap if it is split by rows} |
|
17 | 17 |
|
18 | 18 |
} |
19 | 19 |
\details{ |
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@108253 bc3139a8-67e5-0310-9ffc-ced21a209358
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@108131 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -7,19 +7,39 @@ Decorate the heatmap body |
7 | 7 |
Decorate the heatmap body |
8 | 8 |
} |
9 | 9 |
\usage{ |
10 |
-decorate_heatmap_body(heatmap, code = {}, slice = 1) |
|
10 |
+decorate_heatmap_body(heatmap, code, slice = 1) |
|
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
|
14 | 14 |
\item{heatmap}{name of the heatmap} |
15 |
- \item{code}{code that is executed in the heatmap body} |
|
15 |
+ \item{code}{code that adds graphics in the selected heatmap body} |
|
16 | 16 |
\item{slice}{index of row slices in the heatmap} |
17 | 17 |
|
18 | 18 |
} |
19 | 19 |
\details{ |
20 |
-This simple function actually contructs the name of the viewport, |
|
20 |
+There is a viewport for each row slice in each heatmap. |
|
21 |
+This function contructs the name of the viewport, |
|
21 | 22 |
goes to the viewport by \code{\link[grid]{seekViewport}} and applies code |
22 | 23 |
to that viewport. |
24 |
+ |
|
25 |
+Since you know the number of rows and columns for that row slice, it is |
|
26 |
+simple to calculate the position of every small grid in the row slice. |
|
27 |
+E.g., the position for the grid in i^th row and j^th column is: |
|
28 |
+ |
|
29 |
+ \preformatted{ |
|
30 |
+ # assume nc is the number of columns |
|
31 |
+ # and nr is the number of rows in that row slice |
|
32 |
+ unit((i-0.5)/nc, "npc") |
|
33 |
+ unit((j-0.5)/nr, "npc") |
|
34 |
+ |
|
35 |
+ # the width is |
|
36 |
+ unit(1/nc, "npc") |
|
37 |
+ |
|
38 |
+ # the height is |
|
39 |
+ unit(1/nr, "npc") } |
|
40 |
+} |
|
41 |
+\value{ |
|
42 |
+This function returns no value. |
|
23 | 43 |
} |
24 | 44 |
\author{ |
25 | 45 |
Zuguang Gu <z.gu@dkfz.de> |
Commit id: 1de356e1d1343725223e03ff696f931d80b2842b
Merge branch 'master' of https://github.com/jokergoo/mheatmap
Commit id: 478962957a34b7a5e87c8336989bae3df54f9559
change default colors
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@107356 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -7,12 +7,14 @@ Decorate the heatmap body |
7 | 7 |
Decorate the heatmap body |
8 | 8 |
} |
9 | 9 |
\usage{ |
10 |
-decorate_heatmap_body(heatmap, code = {}, slice = 1)} |
|
10 |
+decorate_heatmap_body(heatmap, code = {}, slice = 1) |
|
11 |
+} |
|
11 | 12 |
\arguments{ |
12 | 13 |
|
13 | 14 |
\item{heatmap}{name of the heatmap} |
14 | 15 |
\item{code}{code that is executed in the heatmap body} |
15 | 16 |
\item{slice}{index of row slices in the heatmap} |
17 |
+ |
|
16 | 18 |
} |
17 | 19 |
\details{ |
18 | 20 |
This simple function actually contructs the name of the viewport, |
Commit id: f1b195419490dad46029cf7b681508ed21ba8c60
refreshed documentations
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@107316 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -2,11 +2,9 @@ |
2 | 2 |
\alias{decorate_heatmap_body} |
3 | 3 |
\title{ |
4 | 4 |
Decorate the heatmap body |
5 |
- |
|
6 | 5 |
} |
7 | 6 |
\description{ |
8 | 7 |
Decorate the heatmap body |
9 |
- |
|
10 | 8 |
} |
11 | 9 |
\usage{ |
12 | 10 |
decorate_heatmap_body(heatmap, code = {}, slice = 1)} |
... | ... |
@@ -20,11 +18,9 @@ decorate_heatmap_body(heatmap, code = {}, slice = 1)} |
20 | 18 |
This simple function actually contructs the name of the viewport, |
21 | 19 |
goes to the viewport by \code{\link[grid]{seekViewport}} and applies code |
22 | 20 |
to that viewport. |
23 |
- |
|
24 | 21 |
} |
25 | 22 |
\author{ |
26 | 23 |
Zuguang Gu <z.gu@dkfz.de> |
27 |
- |
|
28 | 24 |
} |
29 | 25 |
\examples{ |
30 | 26 |
set.seed(123) |
... | ... |
@@ -32,5 +28,4 @@ Heatmap(matrix(rnorm(100), 10), name = "mat") |
32 | 28 |
decorate_heatmap_body("mat", { |
33 | 29 |
grid.circle(gp = gpar(fill = "#FF000080")) |
34 | 30 |
}) |
35 |
- |
|
36 | 31 |
} |
Commit id: 3429d28233ef2cbeafcd05307042d7c7aa54a2a2
add decorate* family functions
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ComplexHeatmap@107197 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,36 @@ |
1 |
+\name{decorate_heatmap_body} |
|
2 |
+\alias{decorate_heatmap_body} |
|
3 |
+\title{ |
|
4 |
+Decorate the heatmap body |
|
5 |
+ |
|
6 |
+} |
|
7 |
+\description{ |
|
8 |
+Decorate the heatmap body |
|
9 |
+ |
|
10 |
+} |
|
11 |
+\usage{ |
|
12 |
+decorate_heatmap_body(heatmap, code = {}, slice = 1)} |
|
13 |
+\arguments{ |
|
14 |
+ |
|
15 |
+ \item{heatmap}{name of the heatmap} |
|
16 |
+ \item{code}{code that is executed in the heatmap body} |
|
17 |
+ \item{slice}{index of row slices in the heatmap} |
|
18 |
+} |
|
19 |
+\details{ |
|
20 |
+This simple function actually contructs the name of the viewport, |
|
21 |
+goes to the viewport by \code{\link[grid]{seekViewport}} and applies code |
|
22 |
+to that viewport. |
|
23 |
+ |
|
24 |
+} |
|
25 |
+\author{ |
|
26 |
+Zuguang Gu <z.gu@dkfz.de> |
|
27 |
+ |
|
28 |
+} |
|
29 |
+\examples{ |
|
30 |
+set.seed(123) |
|
31 |
+Heatmap(matrix(rnorm(100), 10), name = "mat") |
|
32 |
+decorate_heatmap_body("mat", { |
|
33 |
+ grid.circle(gp = gpar(fill = "#FF000080")) |
|
34 |
+}) |
|
35 |
+ |
|
36 |
+} |