Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • lesander
    Junior Member
    • Apr 2009
    • 2

    Samtools Flag to identify outward facing (mate-pair not paired end) reads

    Hi,
    Can someone tell me what flag I should grep for in order to
    obtain reads that are outward facing (mate pairs: <--- && ---> ) and what
    flags I should grep for in order to obtain reads that are inward facing (paired ends: --> && <---)?
    many thanks
    Les
    p.s. I have consulted the picard's useful site at http://picard.sourceforge.net/explain-flags.html
    but what confuses is me that the definition of "proper pair" etc which is dependent on the aligner's definition based on the insert size.
  • maubp
    Peter (Biopython etc)
    • Jul 2009
    • 1544

    #2
    Right now, I don't think this is possible.

    The FLAG doesn't record the pairing direction, just if the aligner/assembler says it was correct or not.

    In principle this could be recorded as part of the read group @RG line, but I don't think that has been standardised yet. You could raise this on the samtools-devel mailing list.

    Comment

    • lesander
      Junior Member
      • Apr 2009
      • 2

      #3
      Originally posted by maubp View Post
      Right now, I don't think this is possible.

      The FLAG doesn't record the pairing direction, just if the aligner/assembler says it was correct or not.

      In principle this could be recorded as part of the read group @RG line, but I don't think that has been standardised yet. You could raise this on the samtools-devel mailing list.
      Can someone please confirm if the following is correct:

      I thought, 99,147 and 83,163 are the flags for "proper pair" (i.e. --> <--)
      within insert size.

      For mate-pair (outward facing) the flag is 115, 179 for concordant (within insert size)
      and 113,177 for discordant.

      thanks

      Comment

      • maubp
        Peter (Biopython etc)
        • Jul 2009
        • 1544

        #4
        The problem is "proper pair" is context dependent, it could be --> <-- for Illumina paired end, <-- --> for Illumina mate pairs, or --> --> for Roche pairs, or --> --> ---> ... --> for strobed reads.

        What you can do is look at the FLAG as see for any pair of reads were they --> <-- etc, and if they were "properly paired", but that just tells you how they mapped, not what the library construction should have been. This also won't help for when only one of a pair is mapped, or neither.

        Perhaps I misunderstood you - that may be all you want to do?

        Comment

        • swbarnes2
          Senior Member
          • May 2008
          • 910

          #5
          Originally posted by lesander View Post
          Can someone please confirm if the following is correct:

          I thought, 99,147 and 83,163 are the flags for "proper pair" (i.e. --> <--)
          within insert size.

          For mate-pair (outward facing) the flag is 115, 179 for concordant (within insert size)
          and 113,177 for discordant.

          thanks
          That second set of numbers doesn't correspond to how I thought mate pairs work. I thought that mate pairs were always outward-running. So the numbers would be 97,145,81, and 161, if your aligner is expacting ordinary paired-end reads. If you rev-comped your reads, they'd be inward running, and would look like ordinary paired end reads.

          Comment

          • kmcarr
            Senior Member
            • May 2008
            • 1181

            #6
            Originally posted by lesander View Post
            Can someone please confirm if the following is correct:

            I thought, 99,147 and 83,163 are the flags for "proper pair" (i.e. --> <--)
            within insert size.

            For mate-pair (outward facing) the flag is 115, 179 for concordant (within insert size)
            and 113,177 for discordant.

            thanks
            No, 115 & 179 (or 113 & 177) are nonsensical if you are expecting outward facing mate-pairs. Those flag values would have both read 1 and read 2 aligned to the minus strand. A proper mate-pair would have the reads on opposite strands.

            A proper set of mate-pair reads would have exactly the same flag values as a proper set of paired-end reads (83,163 or 99,147). It is up to the alignment software to decide whether the pair is proper based on relative orientation and distance of reads 1 & 2 and the stated methodology.

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
              by SEQadmin2


              Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

              The systematic characterization of the human proteome has
              ...
              07-20-2026, 11:48 AM
            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM
            • SEQadmin2
              Cancer Drug Resistance: The Lingering Barrier to Rising Survival
              by SEQadmin2



              Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

              There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
              07-08-2026, 05:17 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 07-24-2026, 12:17 PM
            0 responses
            34 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-23-2026, 11:41 AM
            0 responses
            25 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-20-2026, 11:10 AM
            0 responses
            217 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-13-2026, 10:26 AM
            0 responses
            81 views
            0 reactions
            Last Post SEQadmin2  
            Working...