Description Usage Arguments Details Value See Also Examples
Summary Annotation
1 2 3 4 5 |
which |
Whether it is a column annotation or a row annotation? |
border |
Wether draw borders of the annotation region? |
bar_width |
Relative width of the bars. The value should be smaller than one. |
axis |
Whether to add axis? |
axis_param |
parameters for controlling axis. See |
ylim |
Data ranges. |
extend |
The extension to both side of |
outline |
Whether draw outline of boxplots? |
box_width |
Relative width of boxes. The value should be smaller than one. |
pch |
Point style. |
size |
Point size. |
gp |
Graphic parameters. |
width |
Width of the annotation. The value should be an absolute unit. Width is not allowed to be set for column annotation. |
height |
Height of the annotation. The value should be an absolute unit. Height is not allowed to be set for row annotation. |
anno_summary
is a special annotation function that it only works for one-column or one-row heatmap.
It shows the summary of the values in the heatmap. If the values in the heatmap is discrete,
the proportion of each level (the sum is normalized to 1) is visualized as stacked barplot. If the heatmap
is split into multiple slices, multiple bars are put in the annotation. If the value is continuous, boxplot is used.
In the barplot, the color schema is used as the same as the heatmap, while for the boxplot, the color needs
to be controlled by gp
.
An annotation function which can be used in HeatmapAnnotation
.
https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-annotations.html#summary-annotation
1 2 3 4 5 6 7 8 | ha = HeatmapAnnotation(summary = anno_summary(height = unit(4, "cm")))
v = sample(letters[1:2], 50, replace = TRUE)
split = sample(letters[1:2], 50, replace = TRUE)
Heatmap(v, top_annotation = ha, width = unit(1, "cm"), split = split)
ha = HeatmapAnnotation(summary = anno_summary(gp = gpar(fill = 2:3), height = unit(4, "cm")))
v = rnorm(50)
Heatmap(v, top_annotation = ha, width = unit(1, "cm"), split = split)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.