Question: How to calculate number of fragment and its coverage from BAM file?
0
gravatar for star
3 days ago by
star260
Netherlands
star260 wrote:

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
ADD COMMENTlink modified 3 days ago • written 3 days ago by star260
2
gravatar for ATpoint
3 days ago by
ATpoint40k
Germany
ATpoint40k wrote:

genomecov is the way to go. You have to decide whether you want to count only the parts of the genome that actually have been sequenced (that would be the default behaviour) or to include the insert size between the pairs as well using the -pc option. In the latter case all bases between start of read1 and end of read2 would be included into the coverage for that fragment. That will give you a bedgraph (-bg) that indicates genome-wide coverage for your experiment.

ADD COMMENTlink modified 3 days ago • written 3 days ago by ATpoint40k

Thanks, ATpoint. I have checked genomecov with -bg -pc and it is similar to bamtobed outputs. But I will go for genomecov as it sums up overlap regions :

The output of bamtobed:

1       785101  785152  1       785152  785203  4
1       824806  824855  1       824932  824983  3
1       932573  932617  1       932652  932701  1
1       947595  947646  1       947664  947715  11
1       966712  966763  1       966828  966876  7
1       1146938 1146989 1       1147130 1147181 16
1       1237055 1237103 1       1237215 1237265 9
1       1237055 1237103 1       1237215 1237266 1
1       1303125 1303176 1       1303311 1303358 24

The genomecov:

1       785101  785203  4
1       824806  824983  3
1       932573  932701  1
 1       947595  947715  11
1       966712  966876  7
1       1146938 1147181 16
1       1237055 1237266 10
1       1303125 1303358 24
ADD REPLYlink modified 3 days ago • written 3 days ago by star260
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1760 users visited in the last hour