Question: Computing coverage from BAM file?
0
gravatar for maryamom99
3.3 years ago by
maryamom99 • 0
maryamom99 • 0 wrote:

Hi every one!

I want to compute depth of specific regions from BAM file.I found two solutions like bellow :

samtools depth -r  <region>  my.bam     

and 

samtools view my.bam <region>

that give me two different answers,I was wondering what is exactly the applications of theses two command and which one is more correct answer to computing depth of region?

Thanks a lot!

bam depth covrage • 1.3k views
ADD COMMENT • link • modified 3.3 years ago by Jennifer Hillman Jackson ♦ 25k • written 3.3 years ago by maryamom99 • 0
0
gravatar for Jennifer Hillman Jackson
3.3 years ago by
United States
Jennifer Hillman Jackson ♦ 25k wrote:

Hello,

http://www.htslib.org/doc/samtools.html

"view" will report all data within a particular region
"depth" is the how many reads at the particular position

You might find the tool BEDTools -> Create a BedGraph of genome coverage a useful alternative.

Best, Jen, Galaxy team

 

ADD COMMENT • link written 3.3 years ago by Jennifer Hillman Jackson ♦ 25k

Thanks Jennifer!

ADD REPLY • link written 3.3 years ago by maryamom99 • 0
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 16.09
Traffic: 186 users visited in the last hour