Description Usage Arguments Details Examples
Automatically generate alter_fun
1 2 3 4 |
graphic |
Graphic to draw. |
width |
Relative width of the rectangle. |
height |
Relative height of the rectangle. |
horiz_margin |
Horizontal margin. E.g. if you want 1mm margin on top and 1mm margin at bottom of the rectangle, set this value to |
vertical_margin |
Vertical margin. |
fill |
Filled color. |
col |
Border color. |
pch |
Pch for points |
... |
Pass to |
This function aims to simplify the definition of functions in alter_fun
. Now it only
supports rectangles and points.
1 2 3 4 5 6 7 8 9 10 11 12 13 | mat = read.table(textConnection(
"s1,s2,s3
g1,snv;indel,snv,indel
g2,,snv;indel,snv
g3,snv,,indel;snv"), row.names = 1, header = TRUE, sep = ",", stringsAsFactors = FALSE)
mat = as.matrix(mat)
col = c(snv = "red", indel = "blue")
oncoPrint(mat,
alter_fun = list(
snv = alter_graphic("rect", width = 0.9, height = 0.9, fill = col["snv"]),
indel = alter_graphic("rect", width = 0.9, height = 0.9, fill = col["indel"])
), col = col)
|
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))
========================================
All mutation types: snv, indel.
`alter_fun` is assumed vectorizable. If it does not generate correct
plot, please set `alter_fun_is_vectorized = FALSE` in `oncoPrint()`.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.