SEQanswers (
-   Bioinformatics (
-   -   Extract perfectly mapped reads from SAM/BAM file (

Graham Etherington 07-20-2011 04:45 AM

Extract perfectly mapped reads from SAM/BAM file
Given a SAM or BAM file, does anyone know how to identify which paired-sequences map perfectly to the reference? By perfectly mapped, I mean that the query is identical to the the reference (or its reverse complement).
I'm fine using either command-line tools or programming.
Many thanks,

dariober 07-20-2011 07:44 AM

I think you can look at the NM tag in the SAM/BAM file. If both reads of a pair have NM:i:0 than the match is perfect.


nilshomer 07-21-2011 07:27 AM

Make sure that there is also no soft-clipping in the cigar if you want the full read aligned.

All times are GMT -8. The time now is 04:30 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.