Question: How to compare compare two Sam files to check mapping
2
gravatar for madhu.9124
4 months ago by
madhu.912430
madhu.912430 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 • 262 views
ADD COMMENTlink modified 4 months ago by Devon Ryan78k • written 4 months ago by madhu.912430

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

ADD REPLYlink written 4 months ago by genomax46k
2
gravatar for Devon Ryan
4 months ago by
Devon Ryan78k
Freiburg, Germany
Devon Ryan78k 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 4 months ago by Devon Ryan78k

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

ADD REPLYlink written 4 months ago by madhu.912430

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

ADD REPLYlink written 4 months ago by Devon Ryan78k
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: 614 users visited in the last hour