plot_chromHMM: Plot ChromHMM heatmap

View source: R/plot_chromHMM.R

plot_chromHMMR Documentation

Plot ChromHMM heatmap

Description

Creates a heatmap using outputs from ChromHMM using ggplot2.The function takes a list of peakfiles, performs ChromHMM and outputs a heatmap. ChromHMM annotation file must be loaded prior to using this function. ChromHMM annotations are aligned to hg19, and will be automatically lifted over to the genome_build to match the build of the peaklist.

Usage

plot_chromHMM(
  peaklist,
  chromHMM_annotation,
  genome_build,
  cell_line = NULL,
  interact = FALSE,
  return_data = FALSE
)

Arguments

peaklist

A named list of peak files as GRanges object. If list is not named, default names will be assigned.

chromHMM_annotation

ChromHMM annotation list.

genome_build

The human genome reference build used to generate peakfiles. "hg19" or "hg38".

cell_line

If not cell_line, will replace chromHMM_annotation by importing chromHMM data for a given cell line using get_chromHMM_annotation.

interact

Default TRUE. By default, the heatmaps are interactive. IfFALSE, the function generates a static ChromHMM heatmap.

return_data

Return the plot data as in addition to the plot itself.

Value

ChromHMM heatmap, or a named list.

Examples

### Load Data ###
data("CnT_H3K27ac") # example dataset as GRanges object
data("CnR_H3K27ac") # example dataset as GRanges object 
### Create Named Peaklist ###
peaklist <- list(CnT=CnT_H3K27ac, CnR=CnR_H3K27ac) 
### Run ###
my_plot <- plot_chromHMM(peaklist = peaklist,
                         cell_line = "K562",
                         genome_build = "hg19") 

neurogenomics/EpiCompare documentation built on Oct. 18, 2024, 11:04 p.m.