SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to extract mapped and unmapped raw reads from bwa's sam file ? vaibhavvsk Bioinformatics 11 02-07-2013 09:01 AM
Extract perfectly mapped reads from SAM/BAM file Graham Etherington Bioinformatics 2 07-21-2011 07:27 AM
SAM/BAM how to retrieve all mapped reads ? Sylphide Bioinformatics 2 05-31-2011 06:57 AM
Filter paired end BAM file based on iSize Leif Bergsagel Bioinformatics 2 12-16-2010 11:50 AM
How to filter rRNA reads in SAM file. townway Bioinformatics 3 07-15-2010 07:54 AM

Reply
 
Thread Tools
Old 06-18-2012, 12:36 AM   #1
pirates.genome
Member
 
Location: Earth

Join Date: Mar 2012
Posts: 11
Question Filter paired & mapped reads from SAM/BAM file

Hi,
I have SAM/BAM files of paired end Illumina sequencing obtained by BWA.

I want to filter out all reads having "proper pair" and both the reads of pair aligned to references. How can I filter them?

Thanks in advance...
pirates.genome is offline   Reply With Quote
Old 06-18-2012, 06:13 AM   #2
dariober
Senior Member
 
Location: Cambridge, UK

Join Date: May 2010
Posts: 311
Default

Hi- This should filter out all the reads where both mates are mapped and the mates face each other (---> <---). (Make sure it does what you want!).

Code:
samtools view -F 2 input.bam > output.sam
Best

Dario
dariober is offline   Reply With Quote
Old 06-19-2012, 01:21 AM   #3
pirates.genome
Member
 
Location: Earth

Join Date: Mar 2012
Posts: 11
Default Thats what I was looking for!

Thank you Dario for the reply. I was looking for the same.
pirates.genome is offline   Reply With Quote
Reply

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 03:15 PM.


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