plotDataFrame: Quickly visualize a data frame

Description Usage Arguments Details Value Author(s) Examples

Description

Quickly visualize a data frame

Usage

1
2
3
4
plotDataFrame(df, overlap = 0.25, nlevel = 30, show_row_names = TRUE,
    show_column_names = TRUE, group = NULL, group_names = names(group),
    main_heatmap = NULL, km = 1, split = NULL, cluster_rows = TRUE,
    cluster_columns = TRUE, row_order = NULL, ...)

Arguments

df

a data frame.

overlap

how to group numeric columns. If the overlapping rate between the ranges in the current column and previous numeric column is larger than this value, the two columns are treated as under same measurement and should be grouped.

nlevel

If the number of levels of a character column is larger than this value, the column will be excluded, because it doesn't make any sense to visualize a character vector or matrix that contains huge number of unique elements through a heatmap.

show_row_names

whether show row names after the last heatmap if there are row names.

show_column_names

whether show column names for all heatmaps.

group

a list of index that defines the groupping.

group_names

names for each group.

main_heatmap

which group is the main heatmap?

km

a value larger than 1 means applying k-means clustering on rows for the main heatmap.

split

one or multiple variables that split the rows.

cluster_rows

whether perform clustering on rows of the main heatmap.

cluster_columns

whether perform clustering on columns for all heatmaps.

row_order

order of rows, remember to turn off cluster_rows

...

pass to draw,HeatmapList-method or make_layout,HeatmapList-method

Details

The data frame contains heterogeneous information. The plotDataFrame function provides a simple and quick way to visualize information that are stored in a data frame.

There are only a few settings in this function, so the heamtap generated by this functioin may look ugly (in most of the time). However, users can customize the style of the heatmaps by manually constructing a HeatmapList object.

Value

A HeatmapList object.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

1
2
3
4
5
6
7
8
df = data.frame(matrix(rnorm(40), nrow = 10, dimnames = list(letters[1:10], letters[1:4])),
                large = runif(10)*100,
                t1 = sample(letters[1:3], 10, replace = TRUE),
                matrix(runif(60), nrow = 10, dimnames = list(LETTERS[1:10], LETTERS[1:6])),
                t2 = sample(LETTERS[1:3], 10, replace = TRUE))
plotDataFrame(df)
plotDataFrame(df, group = list(1:4, 5, 6, 7:12, 13), group_names = c("mat1", "large", "t1", "mat2", "t2"),
    main_heatmap = 4, km = 2, column_title = "column title", row_title = "row title")

eilslabs/ComplexHeatmap documentation built on May 16, 2019, 1:21 a.m.