Announcement

Collapse

Welcome to the New Seqanswers!

Welcome to the new Seqanswers! We'd love your feedback, please post any you have to this topic: New Seqanswers Feedback.
See more
See less

Split Paired-End bam file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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, 02:41 AM. Reason: I should really proof read

    Comment


    • #3
      Thank you!

      Comment

      Working...
      X