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

oncoPrint

Make oncoPrint


Description

Make oncoPrint

Usage

oncoPrint(mat,
    get_type = default_get_type,
    alter_fun,
    alter_fun_is_vectorized = NULL,
    col = NULL,
    
    top_annotation = HeatmapAnnotation(cbar = anno_oncoprint_barplot()),
    right_annotation = rowAnnotation(rbar = anno_oncoprint_barplot()),
    left_annotation = NULL,
    bottom_annotation = NULL,
    
    show_pct = TRUE,
    pct_gp = gpar(fontsize = 10),
    pct_digits = 0,
    pct_side = "left",
    
    row_labels = NULL,
    show_row_names = TRUE,
    row_names_side = "right",
    row_names_gp = pct_gp,
    row_split = NULL,
    
    column_labels = NULL,
    column_names_gp = gpar(fontsize = 10),
    column_split = NULL,
    
    row_order = NULL,
    column_order = NULL,
    cluster_rows = FALSE,
    cluster_columns = FALSE,
    
    remove_empty_columns = FALSE,
    remove_empty_rows = FALSE,
    show_column_names = FALSE,
    heatmap_legend_param = NULL,
    ...)

Arguments

mat

The value should be a character matrix which encodes mulitple alterations or a list of matrices for which every matrix contains binary value representing whether the alteration is present or absent. When the value is a list, the names of the list represent alteration types. You can use unify_mat_list to make all matrix having same row names and column names.

get_type

If different alterations are encoded in the matrix as complex strings, this self-defined function determines how to extract them. It only works when mat is a matrix. The default value is default_get_type.

alter_fun

A single function or a list of functions which defines how to add graphics for different alterations. You can use alter_graphic to automatically generate for rectangles and points.

alter_fun_is_vectorized

Whether alter_fun is implemented vectorized. Internally the function will guess.

col

A vector of color for which names correspond to alteration types.

top_annotation

Annotation put on top of the oncoPrint. By default it is barplot which shows the number of genes with a certain alteration in each sample.

right_annotation

Annotation put on the right of the oncoPrint. By default it is barplot which shows the number of samples with a certain alteration in each gene.

left_annotation

Annotation put on the left of the oncoPrint.

bottom_annotation

Annotation put at the bottom of the oncoPrint.

show_pct

whether show percent values on the left of the oncoprint?

pct_gp

Graphic paramters for percent values

pct_digits

Digits for the percent values.

pct_side

Side of the percent values to the oncoPrint. This argument is currently disabled.

row_labels

Labels as the row names of the oncoPrint.

show_row_names

Whether show row names?

row_names_side

Side of the row names to the oncoPrint. This argument is currently disabled.

row_names_gp

Graphic parameters for the row names.

row_split

Pass to Heatmap.

column_labels

Pass to Heatmap.

column_names_gp

Pass to Heatmap.

column_split

Pass to Heatmap.

row_order

Order of rows. By default rows are sorted by the number of occurence of the alterations.

cluster_rows

If it is set, it must be a dendrogram/hclust object.

cluster_columns

If it is set, it must be a dendrogram/hclust object.

column_order

Order of columns. By default the columns are sorted to show the mutual exclusivity of alterations.

remove_empty_columns

If there is no alteration in some samples, whether remove them on the oncoPrint?

remove_empty_rows

If there is no alteration in some samples, whether remove them on the oncoPrint?

show_column_names

Whether show column names?

heatmap_legend_param

pass to Heatmap.

...

Pass to Heatmap.

Details

The 'memo sort' method is from https://gist.github.com/armish/564a65ab874a770e2c26 . Thanks to B. Arman Aksoy for contributing the code.

Value

A Heatmap-class object which means you can add other heatmaps or annotations to it.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

# There is no example
NULL

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.