Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • the format of SAM

    hello, I do not understand the FLAG in SAM. could someone explain it. In paper " The Sequence Alignment/Map format and SAMtools", it says that According to FLAG
    163(=1+2+32+ 128), the read mapped to position 7 is the second read in
    the pair (128) and regarded as properly paired (1 + 2); its mate is mapped to
    37 on the reverse strand (32).
    and each bit in the FLAG field is defined as:
    Flag Description
    0x0001 Paired in sequencing
    0x0002 Mapped in proper read pair
    0x0004 Query unmapped
    0x0008 Mate unmapped
    0x0010 Strand of the query (1 for reverse)
    0x0020 Strand of the mate (1 for reverse)
    0x0040 First read in the pair
    0x0080 Second read in the pair
    0x0100 Secondary alignment
    0x0200 QC failure
    0x0400 Optical or PCR duplicates
    how to explain it. thanks in advance.

  • #2
    Hi,
    Play with : http://picard.sourceforge.net/explain-flags.html
    163(=1+2+32+ 128) is in decimal
    0x00.. are hexadecimal (base 16, not 10)

    0,0010 is equivalent to the decimal 16^1 so 16.

    Comment


    • #3
      biocc,

      I created a little cheat sheet for myself to be able to quickly decipher the flags in a SAM output. The bottom row lists decimal values as they would appear in the FLAG field of the SAM file and the top row provides the interpretation of the that FLAG value. In between shows the specific elements which added up to the final value (as you showed in your example.
      Attached Files

      Comment


      • #4
        you can also use the samtools view -X option which transforms the flag to a string, human readable.
        samtools view -? for details

        Gerald

        Comment


        • #5
          thanks for everyone. i understand the FLAG now.

          Comment


          • #6
            Dear all,
            Thanks for the posts above, that was exactly my question. I also have a additional question. I am trying to do remove duplicates with PICARD. I get an error because my input file has secondary alignments and MarkDuplicates does not take into account the secondary alignment flag. Anyone have an idea of how to remove them?

            Any help would be really appreciated

            Comment


            • #7
              Originally posted by kmcarr View Post
              biocc,

              I created a little cheat sheet for myself to be able to quickly decipher the flags in a SAM output. The bottom row lists decimal values as they would appear in the FLAG field of the SAM file and the top row provides the interpretation of the that FLAG value. In between shows the specific elements which added up to the final value (as you showed in your example.
              Brilliant!

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Essential Discoveries and Tools in Epitranscriptomics
                by seqadmin




                The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                04-22-2024, 07:01 AM
              • seqadmin
                Current Approaches to Protein Sequencing
                by seqadmin


                Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                04-04-2024, 04:25 PM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, Yesterday, 11:49 AM
              0 responses
              15 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-24-2024, 08:47 AM
              0 responses
              16 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-11-2024, 12:08 PM
              0 responses
              61 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-10-2024, 10:19 PM
              0 responses
              60 views
              0 likes
              Last Post seqadmin  
              Working...
              X