Help with plotHeatmap function on two bigWig files

199 views
Skip to first unread message

Sharvari Gujja

unread,
Feb 18, 2018, 9:00:08 AM2/18/18
to deep...@googlegroups.com
Hi,

I am writing to seek your help in generating enriched heat map for ChIP-Seq data from two different conditions in the same order of genes:

control1 vs. test1
control2 vs. test2

The steps that I have run to generate the heat map are:

bamCompare -b1 test1.bam -b2 control1.bam -o test1-ctrl1_log2ratio.bw &

bamCompare -b1 test2.bam -b2 control2.bam -o test2-ctrl2_log2ratio.bw &


computeMatrix reference-point -p max/2 --referencePoint TSS -b 5000 -a 5000 -R genes.bed -S test1-ctrl1_log2ratio.bw --skipZeros -o matrix1_test1_TSS_new.gz --outFileSortedRegions regions1_test1_genes.bed  -bs 25 —missingDataAsZero

computeMatrix reference-point -p max/2 --referencePoint TSS -b 5000 -a 5000 -R genes.bed -S test2-ctrl2_log2ratio.bw --skipZeros -o matrix1_test2_TSS_new.gz --outFileSortedRegions regions1_test2_genes.bed -bs 25  —missingDataAsZero


plotHeatmap -m matrix1_test1_TSS.gz -o test1_log2ratio.hm_bw.png --zMin -2 --zMax 2 --boxAroundHeatmaps no --colorList white,black --outFileSortedRegions test1_log2ratio.hm_bw.regions.bed —outFileNameMatrix  test1_log2ratio.hm_bw.matrix.tab

plotHeatmap -m matrix1_test2_TSS.gz -o test2_log2ratio.hm_bw.png --zMin -2 --zMax 2 --boxAroundHeatmaps no --colorList white,black --outFileSortedRegions test2_log2ratio.hm_bw.regions.bed —outFileNameMatrix  test2_log2ratio.hm_bw.matrix.tab


The order of genes for test1 and test2 seem different.


Is there a way to plot genes in the same order for both conditions.


Appreciate all the help.


Thanks

Shar

 

Sharvari Gujja

Assistant Director, Advanced Artificial

Intelligence Research Laboratory

–– 

unknown.png

Leading Genomics 
C: 617.444.9040

Devon Ryan

unread,
Feb 18, 2018, 9:29:04 AM2/18/18
to Sharvari Gujja, deep...@googlegroups.com

The simplest procedure is to run computeMatrix with both bigwig files at once:

computeMatrix reference-point -p max/2 --referencePoint TSS -b 5000 -a 5000 -R genes.bed -S test1-ctrl1_log2ratio.bw test2-ctrl2_log2ratio.bw --skipZeros -o matrix12_test12_TSS_new.gz --outFileSortedRegions regions12_test12_genes.bed  -bs 25 —missingDataAsZero

If you run plotHeatmap on that you'll get both conditions side by side and sorted exactly the same way.

Devon

--
You received this message because you are subscribed to the Google Groups "deepTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deeptools+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

Sharvari Gujja

unread,
Feb 18, 2018, 9:45:59 AM2/18/18
to Devon Ryan, deep...@googlegroups.com
Hello Devon,

Thank you so much for the reply.

Your suggestion worked like a charm. :)

I just wanted to clarify  a few things on the interpretation of the heatmap.
  1. Based on the line plot, is it correct to say that the read density for the sample on the left is higher than the sample on the right? 
  2. The regions bed output file *log2ratio.hm.regions.bed lists the order of the genes as in the heat map?
Appreciate your feedback.

Thanks
Shar

 

Sharvari Gujja

Assistant Director, Advanced Artificial

Intelligence Research Laboratory

–– 

unknown.png

Leading Genomics 
C: 617.444.9040

Screen Shot 2018-02-18 at 9.41.35 AM.png

Devon Ryan

unread,
Feb 19, 2018, 3:24:51 AM2/19/18
to Sharvari Gujja, deep...@googlegroups.com
1. I would prefer the following phrasing: The signal enrichment on the left is higher than on the right.
2. Correct, the should be the exact same order

Devon

--
Devon Ryan, Ph.D.
Email: dpr...@dpryan.com
Data Manager/Bioinformatician
Max Planck Institute of Immunobiology and Epigenetics
Stübeweg 51
79108 Freiburg
Germany

To unsubscribe from this group and stop receiving emails from it, send an email to deeptools+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages