View source: R/plot_chromHMM.R
plot_chromHMM | R Documentation |
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
.
plot_chromHMM(
peaklist,
chromHMM_annotation,
genome_build,
cell_line = NULL,
interact = FALSE,
return_data = FALSE
)
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 |
interact |
Default TRUE. By default, the heatmaps are interactive.
If |
return_data |
Return the plot data as in addition to the plot itself. |
ChromHMM heatmap, or a named list.
### 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.