Tool To Reduce The Intersection Of Two Bam Files
1
1
Entering edit mode
11.5 years ago

Are there any tools to reduce two bam files to the difference between one and another, dropping all reads that are identically aligned in both? Something like GATK ReduceBAM, but for pairs of files against each other.

bam • 2.7k views
ADD COMMENT
0
Entering edit mode

Same reads in two bam file can differ in the locations they are aligned to. They can also differ in the number of mismatches they have when aligned to slightly different version of the same genome. Though i dont know any tool but I do have some scripts that may work for you depending on your need.

ADD REPLY
0
Entering edit mode

Where can I download those scripts?

ADD REPLY
0
Entering edit mode

Hi You will have to tell me exactly what you need. Right now, my script takes two bam files that are sorted using queryname. Both the bam files should have the same number of reads irrespective of whether they are aligned or not. My script will go through a pair of reads in both the bam files and depending on certain criteria will output reads to different files.

ADD REPLY
0
Entering edit mode

Well, from your description, it is nothing like ReducedBAM, which collapses multiple reads into one pseudo-read. It is not dropping reads at all.

ADD REPLY
0
Entering edit mode

Would you mind providing some context? What are you trying to achieve?

ADD REPLY
0
Entering edit mode

Bamutil diff does what I want (see other answer). It's rather slow though, so I posted another question about it.

ADD REPLY
1
Entering edit mode
11.5 years ago

I found something that does a diff on bam files:
http://genome.sph.umich.edu/wiki/BamUtil:_diff#Usage

ADD COMMENT

Login before adding your answer.

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