Deeptools Sorting for score values
1
1
Entering edit mode
5.1 years ago

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 8min_sorter_final.bw -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.

Deeptools Heatmaps Sorting • 2.3k views
0
Entering edit mode

Tagging: Devon Ryan

4
Entering edit mode
5.1 years ago

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.

0
Entering edit mode

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

1
Entering edit mode
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)
0
Entering edit mode

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