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. 

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.