Question: How to calculate average depth for each Amplicon in targeted amplicon sequencing?
0
gravatar for bioinfo89
16 months ago by
bioinfo8940
bioinfo8940 wrote:

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 • 1.5k views
ADD COMMENTlink modified 3 months ago by 60143554310 • written 16 months ago by bioinfo8940
1

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

ADD REPLYlink written 16 months ago by WouterDeCoster40k
5
gravatar for Pierre Lindenbaum
16 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum122k wrote:

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 COMMENTlink written 16 months ago by Pierre Lindenbaum122k

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

ADD REPLYlink written 16 months ago by bioinfo8940

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 REPLYlink written 16 months ago by WouterDeCoster40k
1
0
gravatar for shivupatel19
3 months ago by
shivupatel190 wrote:

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 COMMENTlink written 3 months ago by shivupatel190
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: 827 users visited in the last hour