Dual heatmaps with deeptools

555 views
Skip to first unread message

Alberto Riva

unread,
Feb 8, 2019, 9:44:10 PM2/8/19
to deep...@googlegroups.com
Hello,

I'm trying to understand how to generate a two side-by-side heatmaps
displaying two different samples (for example, from WT and mutant)
sorting the regions based on one of the two samples. Specifically, I'm
not sure if I should do this when calling generateMatrix or when
creating the heatmap.

Right now I'm doing the following, assuming that my regions are in
regions.bed and the two bigWig files are WT.bw and MUT.bw:

1. Call "computeMatrix scale-regions -S MUT.bw -R regions.bed
--outFileSortedRegions sorted.bed -o dummy.npz"

2. Call computeMatrix again, this time on both bigWig files, using the
sorted regions from the previous step:

  computeMatrix scale-regions -S MUT.bw WT.bw -R sorted.bed -o matrix.npz

3. Plot the resulting matrix as is:

  plotHeatmap -m matrix.npz -o plot.png


The problem is, I'm not sure this works, and I don't know how to test if
it does. I noticed that plotHeatmap has a sortUsingSamples option, so
I'm wondering if I should instead call computeMatrix on both bw files
normally, and then do:

  plotHeatmap -m matrix.npz --sortUsingSamples 1 -o plot.png

Any suggestions?

Thanks!

Alberto Riva
ICBR Bioinformatics Core
University of Florida


Devon Ryan

unread,
Feb 9, 2019, 3:56:52 AM2/9/19
to Alberto Riva, deep...@googlegroups.com
Hi Alberto,

Please run computeMatrix with both samples and then simply run
plotHeatmap with the --sortUsingSamples option as you suggested.

The alternative method that you outlined would also work, except you
need to manually instruct both computeMatrix and plotHeatmap to not
perform additional sorting (they sort according to the average signal
across all samples by default).

Devon
--
Devon Ryan, PhD
Bioinformatician / Data manager
Bioinformatics Core Facility
Max Planck Institute for Immunobiology and Epigenetics
Email: dpry...@gmail.com

Reply all
Reply to author
Forward
0 new messages