Hi Kevin, Thanks for your reply. I looked at the bedtools manual for coverage function. If I want per nucleotide coverage for the bed file(as is my case), the command should be like this
bedtools coverage -a mygenes.bed -b test.bam -d
Then this is the output
chr5 10000 23456 10001 14
chr5 10000 23456 10002 16
chr5 10000 23456 10003 21
chr5 10000 23456 10004 22
chr5 10000 23456 10005 23
chr5 10000 23456 10006 24
Thanks