Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Deb
    Junior Member
    • Nov 2011
    • 4

    #1

    SAM file and unpaired reads

    I've been using bowtie to map reads and RSEM for expression analysis. I posted this on the RSEM listserv but didn't receive any helpful responses. I thought I might have better luck here.

    I have a sam file generated with bowtie using paired-end reads. When I try to run it through 'convert-sam-for-rsem' I receive the following error: "Number of first and second mates in read HWI-ST261:376:AD0D1MABXX:1:1:10000:106304:R1's full alignments (both mates are aligned) are not matched"!

    From my understanding, this means that both mates in the pair are not present in the file. However, when I looked for the particular reads in my file, I find the following:

    HWI-ST261:376:AD0D1MABXX:1:1:10000:106304:R2 163 comp3699_c0_seq2 1774 255 93M = 1837 156

    HWI-ST261:376:AD0D1MABXX:1:1:10000:106304:R1 83 comp3699_c0_seq2 1837 255 93M = 1774 156

    Both mates are present and the starting coordinate for each match. I want to write a script to remove the problematic reads but am not sure what 'convert-sam-for-rsem' considers an unmatched read.

    Thanks for your help.
    Deb
  • Richard Finney
    Senior Member
    • Feb 2009
    • 701

    #2
    Look at your sam flags (second field)
    Binary for 1774 is 11011101110
    Binary for 1837 is 11100101101
    First bit is at the far right.
    See explanation for bit flags at:
    http://samtools.sourceforge.net/SAM1.pdf

    Starting at the first bit we can see there's a problem. Bit1 (first bit) is contradictory.
    "Read is paired" ... but ... "it's not paired" (???)

    You can use this website : http://picard.sourceforge.net/explain-flags.html
    to help you figure out what 1774 and 1837 mean.

    The flags don't make any sense.
    first read is ...
    Summary:
    read mapped in proper pair
    read unmapped
    mate unmapped
    mate reverse strand
    first in pair
    second in pair
    read fails platform/vendor quality checks
    read is PCR or optical duplicate

    Second read is ...
    Summary:
    read paired
    read unmapped
    mate unmapped
    mate reverse strand
    not primary alignment
    read fails platform/vendor quality checks
    read is PCR or optical duplicate

    You may want to doctor the flags or filter reads with funny flags.
    Playing around you can figure out what's best.
    Not all sam output producing software takes these flags seriously; but some software that takes sam as input does take it seriously. Making them play nice takes a bit of dirty work.

    I'm not sure if there's an additional problem of ... the software can't figure out that ****:R1 read pairs with ***:R2.
    Last edited by Richard Finney; 08-09-2012, 02:48 PM.

    Comment

    • Deb
      Junior Member
      • Nov 2011
      • 4

      #3
      Thanks for your reply Richard but I think you are confusing fields. My bit flags are 163/83. The fields that you listed (1774/1837) should be the positional coordinates, unless I am misreading it.

      Thanks for the explain-flags site; I wasn't familiar with it.

      Comment

      • kmcarr
        Senior Member
        • May 2008
        • 1181

        #4
        Deb,

        The problem is the :R1 and :R2 extensions to the names. The SAM spec states the the names of both mates should be identical. Read 1 or read 2 status is recorded in the flag.

        Comment

        • Deb
          Junior Member
          • Nov 2011
          • 4

          #5
          Thank you to you both! I am going to try remapping without the :R1 and:R1 to see if that solves my problem.

          Comment

          • Richard Finney
            Senior Member
            • Feb 2009
            • 701

            #6
            yep. I missed the flags field completely. 163 and 83 do make sense.
            Cutting off R1 and R2 will probably do the trick for you .

            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
              ...
              Yesterday, 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, Yesterday, 05:39 AM
            0 responses
            11 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-13-2026, 09:56 AM
            0 responses
            14 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-09-2026, 11:14 AM
            0 responses
            27 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 09-29-2026, 09:51 AM
            0 responses
            77 views
            0 reactions
            Last Post SEQadmin2  
            Working...