Description Usage Arguments Details Value See Also Examples
View source: R/AnnotationFunction-function.R
Link annotation with labels
1 2 3 4 5 6 7 | anno_mark(at, labels, which = c("column", "row"),
side = ifelse(which == "column", "top", "right"),
lines_gp = gpar(), labels_gp = gpar(),
labels_rot = ifelse(which == "column", 90, 0), padding = unit(1, "mm"),
link_width = unit(5, "mm"), link_height = link_width,
link_gp = lines_gp,
extend = unit(0, "mm"))
|
at |
Numeric index from the original matrix. |
labels |
Corresponding labels. |
which |
Whether it is a column annotation or a row annotation? |
side |
Side of the labels. If it is a column annotation, valid values are "top" and "bottom"; If it is a row annotation, valid values are "left" and "right". |
lines_gp |
Please use |
link_gp |
Graphic settings for the segments. |
labels_gp |
Graphic settings for the labels. |
labels_rot |
Rotations of labels, scalar. |
padding |
Padding between neighbouring labels in the plot. |
link_width |
Width of the segments. |
link_height |
Similar as |
extend |
By default, the region for the labels has the same width (if it is a column annotation) or same height (if it is a row annotation) as the heatmap. The size can be extended by this options. The value can be a proportion number or a |
Sometimes there are many rows or columns in the heatmap and we want to mark some of the rows. This annotation function is used to mark these rows and connect labels and corresponding rows with links.
An annotation function which can be used in HeatmapAnnotation
.
https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-annotations.html#mark-annotation
1 2 3 4 5 6 7 | anno = anno_mark(at = c(1:4, 20, 60, 97:100), labels = month.name[1:10], which = "row")
draw(anno, index = 1:100, test = "anno_mark")
m = matrix(1:1000, byrow = TRUE, nr = 100)
anno = anno_mark(at = c(1:4, 20, 60, 97:100), labels = month.name[1:10], which = "row")
Heatmap(m, cluster_rows = FALSE, cluster_columns = FALSE) + rowAnnotation(mark = anno)
Heatmap(m) + rowAnnotation(mark = anno)
|
Loading required package: grid
========================================
ComplexHeatmap version 2.6.2
Bioconductor page: http://bioconductor.org/packages/ComplexHeatmap/
Github page: https://github.com/jokergoo/ComplexHeatmap
Documentation: http://jokergoo.github.io/ComplexHeatmap-reference
If you use it in published research, please cite:
Gu, Z. Complex heatmaps reveal patterns and correlations in multidimensional
genomic data. Bioinformatics 2016.
This message can be suppressed by:
suppressPackageStartupMessages(library(ComplexHeatmap))
========================================
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.