HeatMap NOT SORTING in Descending order

229 views
Skip to first unread message

Unmesh Jadhav

unread,
Sep 14, 2016, 7:06:59 PM9/14/16
to deepTools
Hi,

I have used DeepTools for long time now and like the tools a lot. I have a specific trouble with recent heatmaps. 

I ComputeMatrix using signal in a BigWig file and about 30 thousand regions (in a single bed file) to plot. I use center of regions as reference point and 1500bp up/down from there. When I use heatmapper to plot the heatmap, I use all default parameters including the descending order.

The heatmap created seems to have ordering/sorting gone wrong: It looks like the matrix is created fine, although for some reason while plotting the heatmap, the 30 thousand regions are split into two groups .An example is attached as image. I can not think of anything that is wrong in how I am using the tool. I would appreciate any feedback.

Thank you, 

UJ
Galaxy61.png

Devon Ryan

unread,
Sep 15, 2016, 2:49:22 AM9/15/16
to Unmesh Jadhav, deepTools
Hi UJ,

You forgot to use the "Convert missing values to 0?" option in
computeMatrix. Consequently, you have "NaN" values that need to be
plotted and any row with an NaN will have the maximum value. I've made
two new items in your history, the first (#65) a rerun of #60 with
"Convert missing values to 0?" set to "Yes" and the second (#66)
plotHeatmap on that. Everything should then look how you were
expecting.

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
> --
> 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.

Unmesh Jadhav

unread,
Sep 15, 2016, 7:59:53 AM9/15/16
to deepTools, unm...@gmail.com, dpr...@dpryan.com
Hello Devon,

Thank you very much for your prompt reply and resolving my query. 

Best regards,

UJ

Unmesh Jadhav

unread,
Sep 22, 2016, 12:58:56 AM9/22/16
to deepTools, unm...@gmail.com, dpr...@dpryan.com
Hello Devon,

I have a related question regarding sorting in the ComputeMatrix. 

I want to plot heatmap of signal from bigwig file for regions in a bed file WITHOUT changing the order of the regions as in the bed file. I have done this before by setting the 'sort regions' option in ComputeMatrix and Heatmapper to 'no ordering'. Although with the new parameters introduced to DeepTools, I think I am missing something as I always get a changed order of regions in the ComputeMatrix output, which in effect changes the HeatMap.

In my History, as you have seen recently, I have regions bed file (#68) and I am trying to plot BigWig signal (#2) within 1500bp Up/Down from the center of bed regions WITHOUT changing the order. I ran ComputeMatrix (#91) with 'no ordering'. The output of ComputeMatrix however shows different ordering (#92). Below are first 6 lines each from: 

from #69: Original/required order 

chrX 72759160 72761016
chr12 34114097 34115672
chr15 96373282 96374526
chr12 56224624 56340260
chrX 131134170 131137232
chr10 79711321 79713121

from #92: ComputeMatrix output order

chr14 24821930 24825080
chr15 53043587 53048550
chr13 85426664 85430794
chr6 120865876 120868310
chr1 89652140 89654064
chr13 48964253 48967606

I even tried running ComputeMatrix again using the output of the first run (#92) to see if there is anything wrong with my Bed file. It changed the order of the regions again (#96). Why am I not able to maintain the order of the regions?

I would appreciate if could help me resolve this. 

Thanks,

UJ 

Devon Ryan

unread,
Sep 22, 2016, 4:10:43 AM9/22/16
to Unmesh Jadhav, deepTools, dpr...@dpryan.com
If you want the order of entries to be maintained in Galaxy then you'll need use a version before 2.3 (you can select a version in the upper right). On the command line there's a script to reorder things. Starting with 2.4, there will be a full tool for this in Galaxy and the command line. 

Sent from my iPhone

Unmesh Jadhav

unread,
Sep 22, 2016, 11:30:20 AM9/22/16
to Devon Ryan, deepTools, dpr...@dpryan.com
Hi Devon, 

Thanks for your reply.

Does this mean presently on the command line, there is no other option but to go back to earlier version if I want to plot with pre-decided order of bed file? In that case any suggestion on how we role back the version of deeptools? Its not very easy to uninstall.

Best regards,

UJ

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

Devon Ryan

unread,
Sep 23, 2016, 3:03:04 AM9/23/16
to Unmesh Jadhav, deepTools, dpr...@dpryan.com
On the command line you can use the "subsetMatrix" file that was under scripts/ on github. If you need an earlier version, you can "pip uninstall deeptools". 

Devon

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages