Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

test_alter_fun

Test alter_fun for oncoPrint()


Description

Test alter_fun for oncoPrint()

Usage

test_alter_fun(fun, type, asp_ratio = 1)

Arguments

fun

The alter_fun for oncoPrint. The value can be a list of functions or a single function. See https://jokergoo.github.io/ComplexHeatmap-reference/book/oncoprint.html#define-the-alter-fun

type

A vector of alteration types. It is only used when fun is a single function.

asp_ratio

The aspect ratio (width/height) for the small rectangles.

Details

This function helps you to have a quick view of how the graphics for each alteration type and combinations look like.

Examples

alter_fun = list(
	mut1 = function(x, y, w, h) grid.rect(x, y, w, h, gp = gpar(fill = "red", col = NA)),
	mut2 = function(x, y, w, h) grid.rect(x, y, w, h, gp = gpar(fill = "blue", col = NA)),
	mut3 = function(x, y, w, h) grid.rect(x, y, w, h, gp = gpar(fill = "yellow", col = NA)),
	mut4 = function(x, y, w, h) grid.rect(x, y, w, h, gp = gpar(fill = "purple", col = NA)),
	mut5 = function(x, y, w, h) grid.rect(x, y, w, h, gp = gpar(lwd = 2)),
	mut6 = function(x, y, w, h) grid.points(x, y, pch = 16),
	mut7 = function(x, y, w, h) grid.segments(x - w*0.5, y - h*0.5, x + w*0.5, y + h*0.5, gp = gpar(lwd = 2))
)
test_alter_fun(alter_fun)

ComplexHeatmap

Make Complex Heatmaps

v2.6.2
MIT + file LICENSE
Authors
Zuguang Gu
Initial release
2020-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.