I have a bam file like, It is the Paired-End sequenced data with the length 50 bp.
I would like to count the number of the fragment (e.g: chromosome,start-read1,end-read2) and its coverage.
I have used Bamtobed
and Genomecoverage
, but I am confused about which one gives me the correct number.
Many thanks in advance!
Based on BamtoBed tool -bedpe:
1 785101 785152 1 785152 785203 4
1 824806 824855 1 824932 824983 3
1 932573 932617 1 932652 932701 1
Based on GenomeCoverage:
1 785101 785203 4
1 824806 824855 3
1 824932 824983 3
1 932573 932617 1
1 932652 932701 1
Thanks, ATpoint. I have checked
genomecov
with -bg -pc and it is similar tobamtobed
outputs. But I will go forgenomecov
as it sums up overlap regions :The output of bamtobed:
The genomecov: