SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting unmapped reads from BAM using Samtools? Lspoor Bioinformatics 17 08-25-2013 12:22 AM
Finding unmapped paired-end mates with samtools newguy Bioinformatics 3 09-11-2012 11:04 AM
unmapped reads in Bowtie causing problems in SAMtools? wimufi SOLiD 9 09-29-2011 06:30 PM
Finding reads where the mate is unmapped Ash Bioinformatics 6 09-15-2011 06:03 AM
% unmapped reads bioinfosm Illumina/Solexa 8 07-05-2010 12:36 AM

Reply
 
Thread Tools
Old 10-28-2010, 03:59 AM   #1
Ash
Member
 
Location: UK

Join Date: Jun 2010
Posts: 15
Default Finding unmapped reads using samtools

Hi guys,

Samtools is truly amazing! However, there's a couple of things I was wondering about...

Is there any way of pulling out those reads in a bam file, using samtools, where one pair of the read has mapped and the other pair of the read has not?

Or those reads where one pair of the read has mapped and the other mapped in a position that was not expected, say for example 5 or 10kb further upstream?

All help gratefully received!

A
Ash is offline   Reply With Quote
Old 10-28-2010, 04:40 AM   #2
drio
Senior Member
 
Location: 4117'49"N / 24'42"E

Join Date: Oct 2008
Posts: 323
Default

Study carefully the SAM specification, particularly the flag field. Once you know
what flag to use, go ahead and use the filter capabilities in samtools view (-f/-F INT)
to extract the reads you are interested on.

For example (show me reads where the mate is ummapped):
Code:
$  samtools view -f 8 foo.bam
__________________
-drd
drio is offline   Reply With Quote
Old 10-28-2010, 07:20 AM   #3
Ash
Member
 
Location: UK

Join Date: Jun 2010
Posts: 15
Default

Many thanks for your response drio. I think it may take me some time deciphering the intricacies of the flag field (a good few posts to read on this site!), so I'll be back with more dumb questions after this!

All the best,

A
Ash 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 09:21 PM.


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