anno_lines: Lines Annotation

Description Usage Arguments Value See Also Examples

View source: R/AnnotationFunction-function.R

Description

Lines Annotation

Usage

1
2
3
4
anno_lines(x, which = c("column", "row"), border = TRUE, gp = gpar(),
    add_points = smooth, smooth = FALSE, pch = 16, size = unit(2, "mm"), pt_gp = gpar(), ylim = NULL,
    extend = 0.05, axis = TRUE, axis_param = default_axis_param(which),
    width = NULL, height = NULL)

Arguments

x

The value vector. The value can be a vector or a matrix. The length of the vector or the number of rows of the matrix is taken as the number of the observations of the annotation.

which

Whether it is a column annotation or a row annotation?

border

Wether draw borders of the annotation region?

gp

Graphic parameters for lines. The length of each graphic parameter can be 1, or number of columns of x is x is a matrix.

add_points

Whether to add points on the lines?

smooth

If it is TRUE, smoothing by loess is performed. If it is TRUE, add_points is set to TRUE by default.

pch

Point type. The length setting is the same as gp.

size

Point size, the value should be a unit object. The length setting is the same as gp.

pt_gp

Graphic parameters for points. The length setting is the same as gp.

ylim

Data ranges. By default it is range(x).

extend

The extension to both side of ylim. The value is a percent value corresponding to ylim[2] - ylim[1].

axis

Whether to add axis?

axis_param

parameters for controlling axis. See default_axis_param for all possible settings and default 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.

Value

An annotation function which can be used in HeatmapAnnotation.

See Also

https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-annotations.html#lines-annotation

Examples

1
2
3
4
5
6
7
anno = anno_lines(runif(10))
draw(anno, test = "anno_lines")
anno = anno_lines(cbind(c(1:5, 1:5), c(5:1, 5:1)), gp = gpar(col = 2:3))
draw(anno, test = "matrix")
anno = anno_lines(cbind(c(1:5, 1:5), c(5:1, 5:1)), gp = gpar(col = 2:3),
	add_points = TRUE, pt_gp = gpar(col = 5:6), pch = c(1, 16))
draw(anno, test = "matrix")

Example output

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))
========================================

ComplexHeatmap documentation built on Nov. 14, 2020, 2:01 a.m.