Question: Difference in BAM coverage between bedtools output and IGV coverage track
0
gravatar for myology
4 months ago by
myology0
myology0 wrote:

Hi, I’m using bedtools to find regions of<20x coverage of target areas for a .BAM generated by IonTorrent server. The result obtained is different from the coverage track in IGV for a given .BAM – often a couple of reads more for a given position obtained by bedtools. Thus, my regions of <20x coverage are smaller than what I see in IGV. I’m assuming that coverage track in IGV doesn’t take into account filtered reads while bedtools does? Can I run bedtools only on filtered reads? How can I see all reads in IGV? thanks!

bam iontorrent bedtools • 281 views
ADD COMMENTlink modified 3 months ago by Biostar ♦♦ 20 • written 4 months ago by myology0

I'm a little confused by your question, but if you are viewing a BAM with IGV, then you are seeing all reads. The BAM file will have all of your reads unless you filtered the BAM file, but I don't think you did.

ADD REPLYlink written 4 months ago by goodez380

Please paste the BEDTools command, and also explain how you have produced the BAMs in the first place.

There will rarely be agreement between different programs in relation to coverage metrics. The default status should be to not expect agreement.

ADD REPLYlink written 4 months ago by Kevin Blighe32k

$bedtools genomecov -ibam IonXpress.bam -bga > test-genomecov.bed $wc -l test-genomecov.bed 8631278 $awk '$4<20' test-genomecov.bed > less20x-genomecov.bed 3705841 $sort -k1,1 -k2,2n my-regions.bed > my-regions-sort.bed $bedtools intersect -a less20x-genomecov.bed -b my-regions-sort.bed > regions-less20x.bed 5504 regions-less20x.bed

The BAM was generated by Torrent Suite 5.8.0 with the following component versions: ‣ ion-analysis 5.8.17-1 ‣ ion-dbreports 5.8.54-1 ‣ ion-docs 5.8.0 ‣ ion-gpu 5.8.1-1 ‣ ion-pipeline 5.8.7-1 ‣ ion-publishers 5.8.1-1 ‣ ion-referencelibrary 2.2.0 ‣ ion-rsmts 5.6.1-1 ‣ ion-sampledata 1.2.0-1 ‣ ion-torrentpy 5.8.17-1 ‣ ion-torrentr 5.8.17-1 ‣ ion-tsconfig 5.8.4-1 ‣ ion-plugins 5.8.32-1

Alignment Args tmap mapall ... stage1 map4 IonStats Args ionstats alignment Analysis Parameters default

and here's what I found for map4 option: http://129.130.90.13/ion-docs/GUID-434FA408-A73E-4158-8CC4-AE34EA63B663.html

ADD REPLYlink written 4 months ago by myology0

I could see how coverage metrics for a given position would be different if BAMs are generated differently. However, in my case it's the same BAM. So I don't really understand why I see 15 reads in IGV at a certain position, but bedtools tells me there are 19...

ADD REPLYlink written 4 months ago by myology0

Please take a look at the SAM flags so that you can have an idea of the different combinations that programs can use for the purposes of determining read depth over a particular position.

ADD REPLYlink written 4 months ago by Kevin Blighe32k

Thanks, I'm going to look into this...

ADD REPLYlink written 4 months ago by myology0

Is your data single- or pair-ended ? Is it strand-specific ? Does it comes from RNA or DNA samples ?

One notable difference between the two programs is that by default, bedtools counts increment the coverage from the left-most to the right-most read position (regardless of whether the read is split to accomodate for introns). IGV and bedtools in -split mode does not.

ADD REPLYlink modified 4 months ago • written 4 months ago by Carlo Yague4.3k

DNA, single pair, not strand-specific...

ADD REPLYlink written 4 months ago by myology0
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: 1391 users visited in the last hour