Question: Coveragebed, Depth/Breadth Of Coverage
1
gravatar for Newbionf
7.5 years ago by
Newbionf10
Newbionf10 wrote:

I'm using coverageBed to calculate the depth and breadth of coverage, but I'm not sure I'm doing this right. I want to calculate the two values for each human chromosome.

For example, I've created a bed file with 1 chromosome. When I input my BAM file and the BED file, I get the following output:

chr1    0       249250621       103718897       224950839       249250621       0.9025086

I know the first 3 fields are from my chr BED file, the 4th field is the # of reads, 5th is # of bases covered, 6th is length of chromosome (redundant to field 3), and the last column is the fraction of bases covered (5th field/6th field).

So the 7th/last field gives the breadth of coverage, but I don't see a depth of coverage value. How do I get a depth of coverage?

bedtools coverage • 8.0k views
ADD COMMENTlink modified 7.5 years ago by Istvan Albert ♦♦ 78k • written 7.5 years ago by Newbionf10

I see you are looking for coverage on the entire human chrom1. The genomeCoverageBed tool is better suited to "genome scale" coverage statistics. coverageBed is designed for arbitrary BED intervals.

ADD REPLYlink written 7.5 years ago by Aaronquinlan10k

Hello Newbionf. I just read this thread and am interested in how do you create a BED file per chromosome. Thanks. GP.

ADD REPLYlink written 6.5 years ago by GPR310
1
gravatar for Istvan Albert
7.5 years ago by
Istvan Albert ♦♦ 78k
University Park, USA
Istvan Albert ♦♦ 78k wrote:

You will most likely need to pass another flag to customize the output. See the BEDTools manual::

One should use the “-hist” option to create, for each interval in B, a histogram of coverage of the features in A across B.

ADD COMMENTlink written 7.5 years ago by Istvan Albert ♦♦ 78k

I've done this for a 10kb region of chr1 on human and get the following output:

$ more chr1.bed chr1 0 249250621

[golharam@vail 8b-coverage]$ more S.chr1.10kb.coverage chr1 0 10000 0 9989 10000 0.9989000 chr1 0 10000 1 8 10000 0.0008000 chr1 0 10000 2 1 10000 0.0001000 chr1 0 10000 5 1 10000 0.0001000 chr1 0 10000 41 1 10000 0.0001000 all 0 9989 10000 0.9989000 all 1 8 10000 0.0008000 all 2 1 10000 0.0001000 ...

ADD REPLYlink written 7.5 years ago by Newbionf10

I've done this for a 10kb region on chr1 and get the followng output:

$ more S.chr1.10kb.coverage chr1 0 10000 0 9989 10000 0.9989000 chr1 0 10000 1 8 10000 0.0008000 chr1 0 10000 2 1 10000 0.0001000 chr1 0 10000 5 1 10000 0.0001000 chr1 0 10000 41 1 10000 0.0001000 all 0 9989 10000 0.9989000 all 1 8 10000 0.0008000 all 2 1 10000 0.0001000 all 5 1 10000 0.0001000 all 41 1 10000 0.0001000

ADD REPLYlink written 7.5 years ago by Newbionf10
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: 1018 users visited in the last hour