compute count of position coverage with bedtools
I have a bed files with several regions :
exons.bed
chr4 4 200
chr5 3 100
chr5 90 110
I want to get the number of position covered by this bed file. For the exemple, I want : (200-4) + (100-3) + 10
• 2,338 views
•
link
1 answer
For now, I success with this oneliner :
bedtools merge -i test.bed|awk '{print $3-$2}'|paste -sd+|bc
• 0 views
•
link
Log in to answer this question.
You could use R: