Tutorial:Using EnrichedHeatmap for visualization of NGS experiments
0
22
Entering edit mode
5.3 years ago
ATpoint 85k

This tutorial contains some example code to produce visually-appealing enrichment heatmaps using the R/Bioconductor package EnrichedHeatmap. (BioC, Publication). The package depends on its "parent" ComplexHeatmap from the same developer. It is therefore advisable to read the documentation (which is extensive) from both packages to get started with the underlying logic and concepts. The tutorial is in no way comprehensive towards the full functionality of the package, nor will it ever be. It is intended to provide some basic code to get started with, hoping to encourage users to dig deeper themselves. It may indeed require a bit of effort to get your head around the package(s) as they offer a large amount of options to customize your heatmaps, at least it did for me. Please go into the documentation and use google in case you need information. Most of the time the same question has already been asked before somewhere, be it on communities or via a Github issue.

Below is the heatmap we want to produce, starting from a BED file that contains peak regions (which are called targets in EnrichedHeatmap language) and a bigwig file that contains the read counts (called signals in EH language).

The required data for the example code can be downloaded from GSE111902. Go to the bottom of the page, click custom next to GSE111902_RAW.tar and then select the first two files which is GSM3045250_N_ATAC_Kaech_1.bw (a bigwig file with read counts) and GSM3045250_N_ATAC_Kaech_1_peaks.broadPeak.gz (a set of genomic regions / peaks from that experiment, here ATAC-seq).

Enriched Heatmap

R code for the heatmap:

heatmap chip-seq atac-seq EnrichedHeatmap • 8.2k views
ADD COMMENT
0
Entering edit mode

Hi, Thanks. Does V1, V2, and V3 indicates column-1, 2 and 3 respectively in the "GSM3045250_N_ATAC_Kaech_1_peaks.broadPeak.gz" file in the following code? Please let me know. targets <- makeGRangesFromDataFrame( df = fread("GSM3045250_N_ATAC_Kaech_1_peaks.broadPeak.gz", header = FALSE, data.table = FALSE), seqnames.field = "V1", start.field = "V2", end.field = "V3")

ADD REPLY
1
Entering edit mode

These are the default colnames that data.table::fread gives objects without headers (=colnames). On disk this is a plain text file without colnames. Does that answer your question?

ADD REPLY
0
Entering edit mode

Thank you. Yes. I have one more question. Can I create a file only with first three columns (col-1: Chr1; col-2: Start; col-3: end) and explore a bigwig files using that grange?. The context is, I have a set of 50-100 gene coordinates and I want to explore only those targets in a bigwig file. Just to get a heatmap of those 50-100 genes alone. Please let me know. Thanks in advance.

ADD REPLY
1
Entering edit mode

I guess so. You can subset the targets file to whatever you want. If you have these gene coordinates as GRanges then probably subsetByOverlaps on the target file will do the job.

ADD REPLY

Login before adding your answer.

Traffic: 1880 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6