-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
264 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ Package: ComplexHeatmap | |
Type: Package | ||
Title: Make Complex Heatmaps | ||
Version: 2.9.4 | ||
Date: 2021-09-08 | ||
Date: 2021-10-17 | ||
Author: Zuguang Gu | ||
Maintainer: Zuguang Gu <[email protected]> | ||
Depends: R (>= 3.5.0), methods, grid, graphics, stats, grDevices | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
setGeneric('add_heatmap', function(object, ...) standardGeneric('add_heatmap')) | ||
setGeneric('row_dend', function(object, ...) standardGeneric('row_dend')) | ||
setGeneric('set_component_height', function(object, ...) standardGeneric('set_component_height')) | ||
setGeneric('draw_heatmap_list', function(object, ...) standardGeneric('draw_heatmap_list')) | ||
setGeneric('heatmap_legend_size', function(object, ...) standardGeneric('heatmap_legend_size')) | ||
setGeneric('draw_title', function(object, ...) standardGeneric('draw_title')) | ||
setGeneric('set_component_width', function(object, ...) standardGeneric('set_component_width')) | ||
setGeneric('map_to_colors', function(object, ...) standardGeneric('map_to_colors')) | ||
setGeneric('component_width', function(object, ...) standardGeneric('component_width')) | ||
setGeneric('draw_annotation', function(object, ...) standardGeneric('draw_annotation')) | ||
setGeneric('re_size', function(object, ...) standardGeneric('re_size')) | ||
setGeneric('copy_all', function(object, ...) standardGeneric('copy_all')) | ||
setGeneric('make_column_cluster', function(object, ...) standardGeneric('make_column_cluster')) | ||
setGeneric('attach_annotation', function(object, ...) standardGeneric('attach_annotation')) | ||
setGeneric('get_color_mapping_list', function(object, ...) standardGeneric('get_color_mapping_list')) | ||
setGeneric('annotation_legend_size', function(object, ...) standardGeneric('annotation_legend_size')) | ||
setGeneric('make_layout', function(object, ...) standardGeneric('make_layout')) | ||
setGeneric('prepare', function(object, ...) standardGeneric('prepare')) | ||
setGeneric('draw_dimnames', function(object, ...) standardGeneric('draw_dimnames')) | ||
setGeneric('color_mapping_legend', function(object, ...) standardGeneric('color_mapping_legend')) | ||
setGeneric('copy_all', function(object, ...) standardGeneric('copy_all')) | ||
setGeneric('draw_dend', function(object, ...) standardGeneric('draw_dend')) | ||
setGeneric('attach_annotation', function(object, ...) standardGeneric('attach_annotation')) | ||
setGeneric('adjust_heatmap_list', function(object, ...) standardGeneric('adjust_heatmap_list')) | ||
setGeneric('component_height', function(object, ...) standardGeneric('component_height')) | ||
setGeneric('get_color_mapping_list', function(object, ...) standardGeneric('get_color_mapping_list')) | ||
setGeneric('column_order', function(object, ...) standardGeneric('column_order')) | ||
setGeneric('set_component_height', function(object, ...) standardGeneric('set_component_height')) | ||
setGeneric('row_order', function(object, ...) standardGeneric('row_order')) | ||
setGeneric('draw_heatmap_body', function(object, ...) standardGeneric('draw_heatmap_body')) | ||
setGeneric('re_size', function(object, ...) standardGeneric('re_size')) | ||
setGeneric('make_layout', function(object, ...) standardGeneric('make_layout')) | ||
setGeneric('row_dend', function(object, ...) standardGeneric('row_dend')) | ||
setGeneric('draw_heatmap_legend', function(object, ...) standardGeneric('draw_heatmap_legend')) | ||
setGeneric('prepare', function(object, ...) standardGeneric('prepare')) | ||
setGeneric('draw_annotation', function(object, ...) standardGeneric('draw_annotation')) | ||
setGeneric('map_to_colors', function(object, ...) standardGeneric('map_to_colors')) | ||
setGeneric('draw_annotation_legend', function(object, ...) standardGeneric('draw_annotation_legend')) | ||
setGeneric('component_width', function(object, ...) standardGeneric('component_width')) | ||
setGeneric('get_legend_param_list', function(object, ...) standardGeneric('get_legend_param_list')) | ||
setGeneric('column_dend', function(object, ...) standardGeneric('column_dend')) | ||
setGeneric('heatmap_legend_size', function(object, ...) standardGeneric('heatmap_legend_size')) | ||
setGeneric('draw_title', function(object, ...) standardGeneric('draw_title')) | ||
setGeneric('draw_heatmap_list', function(object, ...) standardGeneric('draw_heatmap_list')) | ||
setGeneric('adjust_heatmap_list', function(object, ...) standardGeneric('adjust_heatmap_list')) | ||
setGeneric('draw', function(object, ...) standardGeneric('draw')) | ||
setGeneric('set_component_width', function(object, ...) standardGeneric('set_component_width')) | ||
setGeneric('column_dend', function(object, ...) standardGeneric('column_dend')) | ||
setGeneric('column_order', function(object, ...) standardGeneric('column_order')) | ||
setGeneric('draw_annotation_legend', function(object, ...) standardGeneric('draw_annotation_legend')) | ||
setGeneric('make_row_cluster', function(object, ...) standardGeneric('make_row_cluster')) | ||
setGeneric('row_order', function(object, ...) standardGeneric('row_order')) | ||
setGeneric('make_column_cluster', function(object, ...) standardGeneric('make_column_cluster')) | ||
setGeneric('get_legend_param_list', function(object, ...) standardGeneric('get_legend_param_list')) | ||
setGeneric('draw_dend', function(object, ...) standardGeneric('draw_dend')) | ||
setGeneric('add_heatmap', function(object, ...) standardGeneric('add_heatmap')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
\name{anno_customize} | ||
\alias{anno_customize} | ||
\title{ | ||
Customized annotation | ||
} | ||
\description{ | ||
Customized annotation | ||
} | ||
\usage{ | ||
anno_customize(x, graphics = list(), which = c("column", "row"), | ||
border = TRUE, width = NULL, height = NULL, verbose = TRUE) | ||
} | ||
\arguments{ | ||
|
||
\item{x}{A categorical variable.} | ||
\item{graphics}{A list of functions that define graphics for each level in \code{x}.} | ||
\item{which}{Is it a row annotation or a column annotation?} | ||
\item{width}{Width of the annotation. The value should be an absolute unit. Width is not allowed to be set for column annotation.} | ||
\item{height}{Height of the annotation. The value should be an absolute unit. Height is not allowed to be set for row annotation.} | ||
\item{border}{Whether to draw border.} | ||
\item{verbose}{Whether to print messages.} | ||
|
||
} | ||
\details{ | ||
Functions in \code{graphics} define simple graphics drawn in each annotation cell. The function takes four arguments: | ||
|
||
\describe{ | ||
\item{x,y}{Center of the annotation cell.} | ||
\item{w,h}{Width and height of the annotation cell.} | ||
} | ||
} | ||
\value{ | ||
An annotation function which can be used in \code{\link{HeatmapAnnotation}}. | ||
} | ||
\examples{ | ||
x = sort(sample(letters[1:3], 10, replace = TRUE)) | ||
graphics = list( | ||
"a" = function(x, y, w, h) grid.points(x, y, pch = 16), | ||
"b" = function(x, y, w, h) grid.rect(x, y, w*0.8, h*0.8, gp = gpar(fill = "red")), | ||
"c" = function(x, y, w, h) grid.segments(x - 0.5*w, y - 0.5*h, x + 0.5*w, y + 0.5*h, gp = gpar(lty = 2)) | ||
) | ||
|
||
anno = anno_customize(x, graphics = graphics) | ||
|
||
m = matrix(rnorm(100), 10) | ||
Heatmap(m, top_annotation = HeatmapAnnotation(bar = x, foo = anno)) | ||
|
||
# Add legends for `foo` | ||
ht = Heatmap(m, top_annotation = HeatmapAnnotation(bar = x, foo = anno)) | ||
lgd = Legend(title = "foo", at = names(graphics), graphics = graphics) | ||
draw(ht, annotation_legend_list = list(lgd)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ Draw heatmap annotations | |
\examples{ | ||
# There is no example | ||
NULL | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.