SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to split paired end MiSeq data? akjones Bioinformatics 3 12-04-2013 08:17 AM
Given BAM/SAM file, how to see if it's single-end or paired-end sequencing? xxatbio Bioinformatics 2 08-11-2013 02:51 AM
Convert Paired End Reads BAM file to GRanges ayushraman Bioinformatics 1 10-10-2012 03:06 AM
paired-end, bam-file-format Azazel Bioinformatics 4 06-27-2012 11:09 PM
Filter paired end BAM file based on iSize Leif Bergsagel Bioinformatics 2 12-16-2010 11:50 AM

Reply
 
Thread Tools
Old 12-27-2013, 01:08 AM   #1
Liy
Member
 
Location: Hungary

Join Date: Feb 2012
Posts: 19
Default Split Paired-End bam file

Hi all,

How can I split a paired-end bam file, to separate paired reads?

Paired.bam > Pair_1.bam Pair_2.bam

Thanks!
Liy is offline   Reply With Quote
Old 12-27-2013, 01:36 AM   #2
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

Code:
samtools view -f 0x40 Paired.bam > Pair_1.bam
samtools view -f 0x80 Paired.bam > Pair_2.bam
If you wanted it all in one go you could just script something (gawk/python/perl/etc.).

Last edited by dpryan; 12-27-2013 at 01:41 AM. Reason: I should really proof read
dpryan is offline   Reply With Quote
Old 12-27-2013, 01:37 AM   #3
Liy
Member
 
Location: Hungary

Join Date: Feb 2012
Posts: 19
Default

Thank you!
Liy 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 02:37 AM.


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