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

pheatmap

Translate pheatmap::pheatmap to ComplexHeatmap::Heatmap


Description

Translate pheatmap::pheatmap to ComplexHeatmap::Heatmap

Usage

pheatmap(mat,
    color = colorRampPalette(rev(brewer.pal(n = 7, name = "RdYlBu")))(100),
    kmeans_k = NA,
    breaks = NA,
    border_color = "grey60",
    cellwidth = NA,
    cellheight = NA,
    scale = "none",
    cluster_rows = TRUE,
    cluster_cols = TRUE,
    clustering_distance_rows = "euclidean",
    clustering_distance_cols = "euclidean",
    clustering_method = "complete",
    clustering_callback = NA,
    cutree_rows = NA,
    cutree_cols = NA,
    treeheight_row = ifelse(class(cluster_rows) == "hclust" || cluster_rows, 50, 0),
    treeheight_col = ifelse(class(cluster_cols) == "hclust" || cluster_cols, 50, 0),
    legend = TRUE,
    legend_breaks = NA,
    legend_labels = NA,
    annotation_row = NA,
    annotation_col = NA,
    annotation = NA,
    annotation_colors = NA,
    annotation_legend = TRUE,
    annotation_names_row = TRUE,
    annotation_names_col = TRUE,
    drop_levels = TRUE,
    show_rownames = TRUE,
    show_colnames = TRUE,
    main = NA,
    fontsize = 10,
    fontsize_row = fontsize,
    fontsize_col = fontsize,
    angle_col = c("270", "0", "45", "90", "315"),
    display_numbers = FALSE,
    number_format = "%.2f",
    number_color = "grey30",
    fontsize_number = 0.8 * fontsize,
    gaps_row = NULL,
    gaps_col = NULL,
    labels_row = NULL,
    labels_col = NULL,
    filename = NA,
    width = NA,
    height = NA,
    silent = FALSE,
    na_col = "#DDDDDD",
    name = "Matrix",
    ...)

Arguments

mat

The input matrix.

color

The same as in pheatmap. Here you don't necessarily need to generate a long color vector. The discrete colors sent to colorRampPalette are also OK here. E.g. colorRampPalette(rev(brewer.pal(n = 7, name = "RdYlBu")))(100) can be simply replaced as rev(brewer.pal(n = 7, name = "RdYlBu")).

kmeans_k

Not supported.

breaks

The same as in pheatmap.

border_color

The same as in pheatmap.

cellwidth

The same as in pheatmap.

cellheight

The same as in pheatmap.

scale

The same as in pheatmap.

cluster_rows

The same as in pheatmap.

cluster_cols

The same as in pheatmap.

clustering_distance_rows

The same as in pheatmap.

clustering_distance_cols

The same as in pheatmap.

clustering_method

The same as in pheatmap.

clustering_callback

The same as in pheatmap.

cutree_rows

The same as in pheatmap.

cutree_cols

The same as in pheatmap.

treeheight_row

The same as in pheatmap.

treeheight_col

The same as in pheatmap.

legend

The same as in pheatmap.

legend_breaks

The same as in pheatmap.

legend_labels

The same as in pheatmap.

annotation_row

The same as in pheatmap.

annotation_col

The same as in pheatmap.

annotation

The same as in pheatmap.

annotation_colors

The same as in pheatmap.

annotation_legend

The same as in pheatmap.

annotation_names_row

The same as in pheatmap.

annotation_names_col

The same as in pheatmap.

drop_levels

Enforced to be TRUE.

show_rownames

The same as in pheatmap.

show_colnames

The same as in pheatmap.

main

The same as in pheatmap.

fontsize

The same as in pheatmap.

fontsize_row

The same as in pheatmap.

fontsize_col

The same as in pheatmap.

angle_col

The same as in pheatmap.

display_numbers

The same as in pheatmap.

number_format

The same as in pheatmap.

number_color

The same as in pheatmap.

fontsize_number

The same as in pheatmap.

gaps_row

The same as in pheatmap.

gaps_col

The same as in pheatmap.

labels_row

The same as in pheatmap.

labels_col

The same as in pheatmap.

filename

Not supported.

width

Not supported.

height

Not supported.

silent

Not supported.

na_col

The same as in pheatmap.

name

Name of the heatmap. This argument is passed to Heatmap.

...

Other arguments passed to Heatmap.

Details

Value

A Heatmap-class object.

See Also

compare_pheatmap that ompares heatmaps between pheatmap::pheatmap() and ComplexHeatmap::pheatmap().

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.