SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samtools: Mapped reads and unmapped reads shadow19c Bioinformatics 1 09-27-2013 01:57 AM
extracting unmapped reads from BAM using Samtools? Lspoor Bioinformatics 17 08-25-2013 12:22 AM
unmapped reads in Bowtie causing problems in SAMtools? wimufi SOLiD 9 09-29-2011 06:30 PM
using filter in Samtools emilyjia2000 Bioinformatics 1 08-01-2011 01:50 PM
Finding unmapped reads using samtools Ash Bioinformatics 2 10-28-2010 07:20 AM

Reply
 
Thread Tools
Old 10-18-2013, 04:25 PM   #1
maimaiti2008
Member
 
Location: university

Join Date: Apr 2013
Posts: 16
Default How can I filter out reads who or whose pairs are unmapped in samtools?

How can I filter out reads who or whose pairs are unmapped in samtools?

I tried using "samtools view -F 4 -F 8 SAMFILE". However, this command just allows filtering out those whose pairs are unmapped (only "-F 8" is effective).

I wonder if it is possible to do the job in one command.
maimaiti2008 is offline   Reply With Quote
Old 10-19-2013, 04:18 PM   #2
jimmybee
Senior Member
 
Location: Adelaide, Australia

Join Date: Sep 2010
Posts: 119
Default

Quote:
Originally Posted by maimaiti2008 View Post
How can I filter out reads who or whose pairs are unmapped in samtools?

I tried using "samtools view -F 4 -F 8 SAMFILE". However, this command just allows filtering out those whose pairs are unmapped (only "-F 8" is effective).

I wonder if it is possible to do the job in one command.
um do them one at a time

samtools view -bS -F 4 -o OUTBAM_mapped SAMFILE
samtools view -bS -F 8 -o OUTBAM_unmapped SAMFILE

you can do "samtools merge" to combine them for analysis if thats what you're after
jimmybee is offline   Reply With Quote
Reply

Tags
filtering, flag, flags, samtools

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 01:10 PM.


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