Finding difference in read depth between two BAM files
2
0
Entering edit mode
7.0 years ago
gtasource ▴ 60

Hello,

I am looking to find the difference in read depth between two bam files (A, B.) My initial idea was to use Bedtools, find the total coverage of A and B, and then use Bedtools intersect to compare where they overlap and do not. However, I'm just curious if anybody has alternative suggestions or better software tools to use.

sequencing bam bedtools • 1.8k views
ADD COMMENT
0
Entering edit mode

What data it is ? ChIP ? WGS ? RNA ?

ADD REPLY
2
Entering edit mode
7.0 years ago

using samtools mpileup and two bam files:

samtools mpileup -f ref.fasta in1.bam in2.bam | cut -f 1,2,4,7

1   101766  19  29
1   101767  19  30
1   101768  19  29
1   101769  123 188
1   101770  122 187
1   101771  122 189
1   101772  122 189

output is : chrom/pos/depth-bam1/depth-bam2

ADD COMMENT
0
Entering edit mode

update:

samtools depth in1.bam in2.bam
ADD REPLY
0
Entering edit mode
7.0 years ago
Hussain Ather ▴ 990

There are a few methods....

  • genomeCoverageBedtools
  • samtools depth
  • deeptools bamcoverage
  • Rsamtools
ADD COMMENT

Login before adding your answer.

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