Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • nupurgupta
    Member
    • Aug 2010
    • 29

    SAM flag forward/reverse first/second

    Hello,
    I am a little confused with the interpretation of SAM flags
    From http://ppotato.wordpress.com/2010/08...-paired-reads/

    ...
    0×0010 16 strand of the query (0 for forward; 1 for reverse strand)
    --
    0×0040 64 the read is the first read in a pair
    0×0080 128 the read is the second read in a pair

    What is the difference? Shouldn't forward correspond to first read in a pair and reverse correspond to second read in a pair?

    I have a bam file with paired-unmapped reads- I am trying to extract the reads and mates into separate files. How would I use the SAM flag to figure this out please?

    I have read related stuff about this on the forum, but I am new to this, and cannot quite parse the exact information I need from it. Thank you so much!
  • swbarnes2
    Senior Member
    • May 2008
    • 910

    #2
    What is the difference? Shouldn't forward correspond to first read in a pair and reverse correspond to second read in a pair?
    No, that's not true at all. The DNA usually gets sheared, and then one adaptor goes on one end, and the other goes on the other end, and the adaptors don't know which end is forward according to the convention of your fasta.

    You can use samtools view to filter by flags. All the lines with 64 in the flag came from the first fastq, the ones with 128 came from the second fastq.

    Comment

    • nupurgupta
      Member
      • Aug 2010
      • 29

      #3
      Thanks very much for this!

      Comment

      • ahmedalfahad
        Junior Member
        • Jan 2016
        • 1

        #4
        thank you for this great chance to learn

        Comment

        Latest Articles

        Collapse

        • GATTACAT
          Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
          by GATTACAT
          Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
          07-01-2026, 11:43 AM
        • SEQadmin2
          Nine Things a Sample Prep Scientist Thinks About Before Sequencing
          by SEQadmin2


          I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

          Here are nine questions we think about, in roughly the order they matter, before...
          06-18-2026, 07:11 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, Today, 11:05 AM
        0 responses
        6 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-02-2026, 11:08 AM
        0 responses
        27 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 06-30-2026, 05:37 AM
        0 responses
        25 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 06-26-2026, 11:10 AM
        0 responses
        25 views
        0 reactions
        Last Post SEQadmin2  
        Working...