SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   how to filter BWA paired-end alignments? (http://seqanswers.com/forums/showthread.php?t=13677)

guru 08-24-2011 12:36 PM

how to filter BWA paired-end alignments?
 
Hi,

I want to filter my BAM alignments (generated using BWA on paired-end Illumina reads) to retain only those read pairs where at least one of the reads of the pair has unique mapping. Is there a way of doing this using the tag information available in the SAM file? or does anyone know of a tool that does something on these lines? Any suggestion will be greatly appreciated.

Thanks in advance..
Guru.

stefanoberri 08-24-2011 01:07 PM

I'd like to know this answer as well.

As far as I understand, if one of the two has uniq mapping, than the pair has unique mapping (maybe not, it could be that the second one can map in two very close places, quite unusual though). If the pair has unique mapping, than their score is > 0

However, this is my understanding, but I am not quite sure. If anybody has a better explanation, I am eager to listen...

swbarnes2 08-24-2011 01:32 PM

bwa's sampe adds an XT tag to the sam file that indicates if the read is uniquely mapped, or repetitively mapped. So you could pull all of those reads out with awk, get the cluster coordinates, and then pull out all the reads from the .bam that had those coordinates.


All times are GMT -8. The time now is 12:30 PM.

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