Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Ash
    Member
    • Jun 2010
    • 15

    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
  • drio
    Senior Member
    • Oct 2008
    • 323

    #2
    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

    Comment

    • Ash
      Member
      • Jun 2010
      • 15

      #3
      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

      Comment

      Latest Articles

      Collapse

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 06-09-2026, 11:58 AM
      0 responses
      14 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-05-2026, 10:09 AM
      0 responses
      26 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-04-2026, 08:59 AM
      0 responses
      36 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-02-2026, 12:03 PM
      0 responses
      60 views
      0 reactions
      Last Post SEQadmin2  
      Working...