How to calculate average depth for each Amplicon in targeted amplicon sequencing?
3
0
Entering edit mode
4.6 years ago
bioinfo89 ▴ 50

Hello,

I am working with targeted amplicon sequencing data for 200 samples! I want to calculate the average depth per amplicon? I tried bedtools coverage, but it gives total number of reads which map to the target region and I am not sure if that is the average depth. It is little confusing to me.

command used:

/home/tools/bedtools2/bin/bedtools coverage -a ../../amplicon_coords.bed -b sample1_RG_sorted_indexed.bam

Is there any other way or any modified way to use bedtools coverage option to calculate the average depth per amplicon?

Any help will be appreciated.

Thanks!!

next-gen bedtools • 3.8k views
ADD COMMENT
1
Entering edit mode

I recently saw some things about ampvis2, which might be of interest for you, see for example this blog post.

ADD REPLY
5
Entering edit mode
4.6 years ago

I wrote bamstats04: http://lindenb.github.io/jvarkit/BamStats04.html

$ java -jar dist/bamstats04.jar -B src/test/resources/toy.bed.gz src/test/resources/toy.bam 2> /dev/null | column -t 

#chrom  start  end  length  sample  mincov  maxcov  meancov  mediancov  nocoveragebp  percentcovered
ref     10     13   3       S1      3       3       3.0      3.0        0             100
ref2    1      2    1       S1      2       2       2.0      2.0        0             100
ref2    13     14   1       S1      6       6       6.0      6.0        0             100
ref2    16     17   1       S1      6       6       6.0      6.0        0             100
ADD COMMENT
0
Entering edit mode

Thanks @Pierre Kindenbaum!! It is very helpful!! Also easy to understand!

ADD REPLY
0
Entering edit mode

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.
Upvote|Bookmark|Accept

ADD REPLY
0
Entering edit mode
3.5 years ago

I am getting this type of results by following your command of bamstats... am confused with the coverage..how can i describe it. please help

#chrom start end length  sample mincov maxcov avgcov_0 mediancov_0 nocoveragebp_0 percentcovered_0
chr6  88278254 88278533 279     44      104     207   183.3763440860215      206.0      0     100
chr6  88278254 88278533 279     88      120     244   210.26164874551972     241.0      0     100
chr6  88278254 88278533 279     45      70      142   122.12544802867383     142.0      0     100
ADD COMMENT

Login before adding your answer.

Traffic: 1365 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