Skip to content

dsComputeBEDDensity

Gautier RICHARD edited this page Jan 15, 2020 · 3 revisions

Computing BED files features density along the genome

Description of the tool

dsComputeBEDDensity aim is to transform BED files into bedGraphs, by binning the genome into windows of a given size, and by computing the overlap of the BED files features with those bins, hence allowing the computation of BED files features density along the genome.

Command-line help

Command Description
--input -i BED files from which features density will be calculated.
--chromSize -c Tab-delimited file containing chromosome sizes.
--windowSize -w Size of the window used to binify the genome and calculate bed files density. Default: 1000.
--output -o bedGraph file(s) output prefix name(s) ('.bedGraph' is automatically added at the end of the given prefix, one bedGraph per input file).

Example usage

dsComputeBEDDensity -i data/DMRs.bed data/genes.bed -o bedGraphs/DMR bedGraphs/genes -w 10000 -c data/chromsizes

With chromsizes being a tab-delimited file resembling to:

Chr1 20144068
Chr2 8004176
Chr3 7741120
ChrX 44217713

If data/DMRs.bed is containing the following information:

Chr1 0    103
Chr1 130  133
Chr1 4000 4003

Then bedGraphs/DMR.bedGraph will contain the entire Chr1 binned in windows of 10kb with the following first lines:

Chr1 0     10000 3
Chr1 10000 20000 0
Chr1 20000 30000 0
Clone this wiki locally