SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
samtools mpileup min depth option? jmhenke Bioinformatics 1 07-23-2014 08:00 AM
samtools mpileup -C option xinxinding Bioinformatics 0 05-25-2013 03:00 PM
samtools Option to get genotype likelihood (GL) hansdd Bioinformatics 7 11-01-2011 06:04 AM
idxstats option for samtools GenoMax Bioinformatics 0 08-10-2011 06:42 AM
samtools pileup c-option changes read quality DNAjunk Bioinformatics 1 08-01-2011 01:24 AM

Reply
 
Thread Tools
Old 01-23-2015, 04:56 AM   #1
illinu
Member
 
Location: US

Join Date: Jul 2013
Posts: 55
Default samtools F option

Hi,

Can someone explain here what the -F option in samtools means?
-F INT Skip alignments with bits present in INTwhat does it mean an alignment with for example 4 bits and why would you want to skip it?
illinu is offline   Reply With Quote
Old 01-23-2015, 05:06 AM   #2
sarvidsson
Senior Member
 
Location: Berlin, Germany

Join Date: Jan 2015
Posts: 137
Default

Check the SAM specification, page 4 in http://samtools.github.io/hts-specs/SAMv1.pdf; the FLAG field bits can be filtered upon with samtools view -F/-f.
0x4 means unmapped - that way you can remove unaligned reads from your BAM (in a rather quick and dirty way, since you'll break half-mapped pairs).
sarvidsson is offline   Reply With Quote
Old 01-23-2015, 05:32 AM   #3
illinu
Member
 
Location: US

Join Date: Jul 2013
Posts: 55
Default

This is the document I needed, the Manual doesnt explain much on this. Thank you

Is there a way to extract only paired unaligned reads?
illinu is offline   Reply With Quote
Old 01-23-2015, 05:46 AM   #4
sarvidsson
Senior Member
 
Location: Berlin, Germany

Join Date: Jan 2015
Posts: 137
Default

Code:
samtools view -f 13
should give you all completely non-aligning pairs as output; -F 13 would give you the inverse (all but the completely non-aligning pairs). At least on the GSNAP output data I happened to have at hand.

If the BAM contains a mixture of paired and single reads you might need several passes to retrieve all completely unmapped fragment sequences.
sarvidsson 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 06:38 PM.


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