How to plot the output of bedtools genomecov as a histogram using gnuplot?
1
0
Entering edit mode
3.8 years ago
Jee2 ▴ 20

I have genomecov output as

chr1 0 145821816 195123441 0.747331

chr1 1 28676143 195123441 0.146964

chr1 2 6883876 195123441 0.0352796

chr1 3 3340282 195123441 0.0171188

chr1 4 2296338 195123441 0.0117686

chr1 5 1775261 195123441 0.00909814

chr1 6 1423228 195123441 0.00729399

I would like to plot the output as a histogram preferably in gnuplot. How can I do that? Thanks a lot,

genomecov histogram gnuplot • 2.1k views
ADD COMMENT
0
Entering edit mode
3.2 years ago
adynata • 0

if that data is in a file you could do

plot'FILE' u (($3+$4)/2.):5:(($4-$3/2.)) w boxes

the location of the box is (($3+$4)/2.)

the width of the box is ($4-$3)/2

the height of the box is from the 5th column of your file.

if you have large files this will be slow.

cheers

ADD COMMENT

Login before adding your answer.

Traffic: 2734 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6