Unconfigured Ad

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

    #1

    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
              Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
              by SEQadmin2



              Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

              Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
              ...
              10-14-2026, 09:55 AM
            • SEQadmin2
              New Genomics Technologies Take Aim at Long-Standing Limits
              by SEQadmin2


              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
              ...
              09-28-2026, 10:25 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 10-22-2026, 11:13 AM
            0 responses
            42 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-22-2026, 10:48 AM
            0 responses
            33 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-15-2026, 10:52 AM
            0 responses
            44 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-14-2026, 05:39 AM
            0 responses
            45 views
            0 reactions
            Last Post SEQadmin2  
            Working...