Question: How to compare compare two Sam files to check mapping
0
gravatar for madhu.9124
5 weeks ago by
madhu.912410
madhu.912410 wrote:

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 • 143 views
ADD COMMENTlink modified 5 weeks ago by Devon Ryan74k • written 5 weeks ago by madhu.912410

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

ADD REPLYlink written 5 weeks ago by genomax40k
0
gravatar for Devon Ryan
5 weeks ago by
Devon Ryan74k
Freiburg, Germany
Devon Ryan74k wrote:

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 COMMENTlink written 5 weeks ago by Devon Ryan74k

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

ADD REPLYlink written 5 weeks ago by madhu.912410

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

ADD REPLYlink written 5 weeks ago by Devon Ryan74k
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: 609 users visited in the last hour