Friday, November 28, 2014

Create distribution plots for two bed files

If you want to use HOMER perl script annotatePeaks.pl to create distribution plots of two bed files you would need first to convert one of them into the bedgraph file (the one you want to plot the distribution of) using bedtools, see previous post http://milospjanic.blogspot.com/2014/11/how-to-convert-bed-to-bedgraph.html

After you have finished this you would need to run annotatePeaks.pl script:

annotatePeaks.pl file1.bed hg19 -size 400 -hist 1 -bedGraph file2.bg > outputfile

The command above will calculate distribution of the regions in the bedgraph file (file2.bg) within 400 bp centered on each peak in the bed file (file1.bed) with the resolution of 1 bp.

You can calculate distribution for as many bedgraph files as you need using the command below:

annotatePeaks.pl file1.bed hg19 -size 400 -hist 1 -bedGraph file2.bg file3.bg file4.bg file5.bg file6.bg > outputfile


No comments:

Post a Comment