bedtools 2.25 vs bedtools2.20 coverageBed output not consistent
1
0
Entering edit mode
8.6 years ago
bioguy24 ▴ 230

Hopefully, this edit is more clear in explaining the issue and will help led to a solution. As I am lost as to why there is a difference.

In bedTools 2.20 if I run:

coverageBed -hist -d -abam /home/cmccabe/Desktop/NGS/pool_I_090215/IonXpress_008_150902_newheader.bam -b /home/cmccabe/Desktop/NGS/bed/sorted_unix_5column_xgen_targets.bed > /home/cmccabe/Desktop/NGS/pool_I_090215/output.bam.hist.txt

output.bam.hist.txt

chr11   1785011 1785099 chr11:1785011-1785099   CTSD    1   17
chr11   1785011 1785099 chr11:1785011-1785099   CTSD    2   20
chr11   1785011 1785099 chr11:1785011-1785099   CTSD    3   20

Now in bedTools 2.25 since I can not use -hist and -d together (ERROR: -counts, -d, -mean, and -hist are all mutually exclusive options), I run:

coverageBed -hist -abam /home/cmccabe/Desktop/NGS/pool_I_090215/IonXpress_008_150902_newheader.bam -b /home/cmccabe/Desktop/NGS/bed/sorted_unix_5column_xgen_targets.bed > /home/cmccabe/Desktop/NGS/pool_I_090215/output.bam.hist.txt

output.bam.hist.txt

chr1    14251   14393   X28LU:04862:12482   0   +   14251   14393   0,0,0   1   142,    0,  0   142 142 1.0000000
chr1    16224   16400   X28LU:08504:06628   0   -   16224   16400   0,0,0   1   176,    0,  0   176 176 1.0000000
chr1    16324   16500   X28LU:06201:09146   3   -   16324   16500   0,0,0   1   176,    0,  0   176 176 1.0000000

The two outputs look very different and basically all that I am trying to get is the depth per nucleotide in the target.bed.

target.bed

chr1    955542  955763  +   AGRN:exon.1
chr1    957570  957852  +   AGRN:exon.2
chr1    976034  976270  +   AGRN:exon.2;AGRN:exon.3;AGRN:exon.4

Thank you

EDIT:

I compared the different options in 2.20 and 2.25 and I really only need -d. However the outputs are very different. I use a xeon processor with 64GB of RAM. I included the times and size of the output. Basically, I just need:

chrmosome start end strand gene and exon base read depth (output in 2.20).

I am not sure what changed in 2.25 but it seems to have effected the data. Any suggestions? Thank you

coverageBed -d -abam /home/cmccabe/Desktop/NGS/pool_I_090215/IonXpress_008_150902_newheader.bam -b /home/cmccabe/Desktop/NGS/bed/sorted_unix_5column_xgen_targets.bed > /home/cmccabe/Desktop/NGS/pool_I_090215/output.bam.hist_2.20.txt

2.20 output (720MB) took about 5 minutes to process

chr1    161480613   161480756   +   FCGR2A:exon.3;FCGR2A:exon.5 1   250
chr1    161480613   161480756   +   FCGR2A:exon.3;FCGR2A:exon.5 2   251
chr1    161480613   161480756   +   FCGR2A:exon.3;FCGR2A:exon.5 3   251
coverageBed -d -abam /home/cmccabe/Desktop/NGS/pool_I_090215/IonXpress_008_150902_newheader.bam -b /home/cmccabe/Desktop/NGS/bed/sorted_unix_5column_xgen_targets.bed > /home/cmccabe/Desktop/NGS/pool_I_090215/output.bam.hist_2.25.txt

2.25 output (took ~45 minutes for 425MB file)

chr1    14251   14393   X28LU:04862:12482   0   +   14251   14393   0,0,0   1   142,    0,  1   0
chr1    14251   14393   X28LU:04862:12482   0   +   14251   14393   0,0,0   1   142,    0,  2   0
chr1    14251   14393   X28LU:04862:12482   0   +   14251   14393   0,0,0   1   142,    0,  3   0
ngs bedtools • 4.1k views
ADD COMMENT
2
Entering edit mode
8.6 years ago

On the latest manual page for coverageBed, http://bedtools.readthedocs.org/en/latest/content/tools/coverage.html

It says

"Important

As of version 2.24.0, the coverage tool has changed such that the coverage is computed for the A file, not the B file. This changes the command line interface to be consistent with the other tools. Also, the coverage tool can accept multiple files for the -b option. This allows one to measure coverage between a single query (-a) file and multiple database files (-b) at once!"

Could that be the issue?

ADD COMMENT
0
Entering edit mode

Yes, that was it. Thank you :).

ADD REPLY

Login before adding your answer.

Traffic: 1951 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6