Question: Deeptools Sorting for score values
gravatar for groupelmarwolf
3.8 years ago by
groupelmarwolf0 wrote:

I am having a scored bed file with weighted values in the 4th column. I want to use this scored file to as a sorting parameter for another .bam file. However, the input to computeMatrix operation allows only bigWig files to be used in -S option...and creating bigWig files required indexing based on chr# due to which the ranking is lost.

How can I sort the heatmap with a scored BED file ?

computeMatrix reference-point --referencePoint TSS  -a 10 -b 10 -bs 2 -p max --sortRegions keep -R UCSC_Main_on_Human_refGene_hg19_TSS.txt -S -out 8min_sorter_final.txt.gz

plotHeatmap -m 8min_sorter_final.txt.gz \
     -out 8min_sorter_final.png \
     --colorList white,blue \
     --missingDataColor 0 \
     --heatmapHeight 40 \
     --sortRegions no \
     --heatmapWidth 10

This gives completely unsorted heatmap.

I am not sure if I am missing something obvious, but I really cant see a way to use a sorted BED file as a direct parameter to sort the matrix generated by computeMatrix. FWIW, I am using Deeptools 2.

heatmaps sorting deeptools • 1.7k views
ADD COMMENTlink modified 3.8 years ago by Devon Ryan98k • written 3.8 years ago by groupelmarwolf0

Tagging: Devon Ryan

ADD REPLYlink written 3.8 years ago by GenoMax96k
gravatar for Devon Ryan
3.8 years ago by
Devon Ryan98k
Freiburg, Germany
Devon Ryan98k wrote:

A "scored BED file" is presumably a bedGraph file.

Anyway, what exactly are you trying to plot in the end? If you just want the BAM density over your genes, but the genes sorted according to some sort of score, then you'll need to presort your BED file according to that score. You then don't need the "scored BED file" at all in deepTools. --sortRegions keep (this is the default if I remember correctly) in computeMatrix and --sortRegions no in plotHeatmap will then result in a plot with that same ordering.

ADD COMMENTlink written 3.8 years ago by Devon Ryan98k

Thanks Devon for your response !

I am trying to plot Pol2 ChIP Seq but sorted for histone marks. So I have a BED file(or bedGraph) with histone mark tags in the 4th column. I would like to make a heat map of Pol2 (so i take the Pol2 ChipSeq bam file, sorted and indexed as per the chromosome number location) but sort it for histone marks- That is, the regions with highest histone marks should be on top, but I would plot the tags from Pol2 bam file into that region.

in short - I am able to sort Pol2 for the tag density in Pol2 file, but not for tag density from a different experiment (here, histone marks).

ADD REPLYlink written 3.8 years ago by groupelmarwolf0
  1. Use bamCoverage on your PolII BAM files to make bigWig files.
  2. Remove the score from your BedGraph files.
  3. Use the above with computeMatrix (and then plotHeatmap)
ADD REPLYlink written 3.8 years ago by Devon Ryan98k

Perfect ! Works like a charm ! :) Thanks for the excellent advice.

ADD REPLYlink written 3.8 years ago by groupelmarwolf0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1855 users visited in the last hour