Go Back   SEQanswers > Bioinformatics > Bioinformatics
Similar Threads
Thread Thread Starter Forum Replies Last Post
how to extract unique hits from a sam file gfmgfm Bioinformatics 10 07-07-2019 07:33 AM
How to extract multi-mapped reads by samtools? mavishou RNA Sequencing 5 12-05-2016 05:27 AM
How to extract mapped and unmapped raw reads from bwa's sam file ? vaibhavvsk Bioinformatics 11 02-07-2013 09:01 AM
SAM/BAM how to retrieve all mapped reads ? Sylphide Bioinformatics 2 05-31-2011 06:57 AM
extract subset (mapped reads) from csfasta and .qual files KevinLam SOLiD 1 01-18-2010 12:38 AM

Thread Tools
Old 07-20-2011, 04:45 AM   #1
Graham Etherington
Location: Norwich, England.

Join Date: Apr 2010
Posts: 22
Default 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,
Graham Etherington is offline   Reply With Quote
Old 07-20-2011, 07:44 AM   #2
Senior Member
Location: Cambridge, UK

Join Date: May 2010
Posts: 311

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.

dariober is offline   Reply With Quote
Old 07-21-2011, 07:27 AM   #3
Nils Homer
nilshomer's Avatar
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO