How to compare compare two Sam files to check mapping
1
2
Entering edit mode
6.4 years ago
madhu.9124 ▴ 60

Hi, I have two output reads in Sam format generated from mapping to a reference genome, I would like to know if any tools or command available to compare the two generated sam files. This comparison is done to check if the mappings are same in both the sam files. Kindly help.

Thanks Madhu

alignment • 3.2k views
ADD COMMENT
0
Entering edit mode

This is going to be always tricky but this recent thread may be of help: BAM file comparison

ADD REPLY
2
Entering edit mode
6.4 years ago

I happened to write something a while back to compare equivalently sorted files from different aligners (or with different settings, or with/without post-processing) to see which alignments differ and why. It currently compares chromosome, position, and the cigar string and prints out information about the differences. If you happen to know C then this could be modified to return something else.

Aside from that, you can at least use bamhash to see if both files have the same reads (though the alignments themselves aren't checked).

ADD COMMENT
0
Entering edit mode

I tried it, it was throwing up lot of errors.

ADD REPLY
0
Entering edit mode

It was likely printing a lot of output (assuming you got it compiled).

ADD REPLY

Login before adding your answer.

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