add_matrix_metadata: Add metadata to matrix for ComplexHeatmap

Description Usage Arguments Value Examples

View source: R/matrix.R

Description

Add metadata to matrix for ComplexHeatmap

Usage

1
add_matrix_metadata(m, gr, target_name, signal_name)

Arguments

m

The matrix to update.

gr

A GRanges corresponding to the regions to subset the coverages. All the regions must have the same width (see ?GenomicRanges::resize to resize regions).

target_name

The name of the center region of the matrix. Will be shown at the bottom of the matrix.

signal_name

The name of the matrix. Will be shown on top of the matrix.

Value

A normalizedMatrix ready to be used with ComplexHeatmap.

Examples

1
2
3
4
5
6
filenames <- get_demo_bedGraph_files()
cov <- import_bedgraphs(filenames)

gr <- import_peaks(get_demo_peaks_file())
m <- coverage_2_matrix(cov[[1]], gr)
m <- add_matrix_metadata(m, gr, "TSS", "Peaks")

CharlesJB/hmwrap documentation built on March 19, 2018, 4:08 a.m.