Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phatjoe
    Member
    • Aug 2011
    • 13

    #1

    Are these reads aligned to my reference (BWA)?

    I am currently extracting unaligned reads with the syntax below:-

    Code:
    samtools view -f 4 *.bam
    According to http://picard.sourceforge.net/explain-flags.html, unmapped reads are flagged as 77 or 141.

    These are some of the reads that I've extracted
    HTML Code:
    HWI-ST715:180:D0JHKACXX:4:2307:5231:174176	93	4340.m000924	1187	23	76M	=	1187	0	CGATGGCGCCCAAGGCCGAGAAGAAGCCCGCGGAGAAGAAGCCGGCCTCCGATAAA
    CCGGCGGAGGAGAAGGAGAA	<DBBB;@BDCCDBDDDBDDDDDDDDDDDCEDEEECHHGJIIIJJIIIJJJJJJJJHJJJJJJJHHHHHFFFFFCCC	XT:A:U	NM:i:1	SM:i:23	AM:i:0	X0:i:1	X1:i:1	XM:i:1	XO:i:0	XG:i:0	
    MD:Z:0A75	XA:Z:4340.m000879,-671,76M,2;
    HWI-ST715:180:D0JHKACXX:4:1307:20018:59034	77	4340.m000900	388	0	76M	=	388	0	GTTCTCCCCGGCGAACTCGCGAAGCACGCCGTCTCCGAGGGCACTAAGGCTGTTAC
    CAAGTTCACAAGTTCTTGAT	CCCFFFFFHHHHHJJJJJJJJJJJJJJIHHFFDDEEDBDDDDBDCDDDDDDDDDDDDDDDDDDEDDCDCDEEDDDA	XT:A:R	NM:i:1	SM:i:0	AM:i:0	X0:i:2	X1:i:0	XM:i:1	XO:i:0	XG:i:0	
    MD:Z:75A0	XA:Z:4340.m000899,+388,76M,1;
    HWI-ST715:180:D0JHKACXX:4:1206:2590:114359	77	4340.m000900	391	0	76M	=	391	0	CTCCCCGGCGAACTCGCGAAGCACGCCGTCTCCGAGGGCACTAAGGCTGTTACCAA
    GTTCACAAGTTCTTGATCCG	CCCFFFFFHHHHHJJJJJJJJIJIIIJHEFEEEDBDDDDDDDDDDDDDDDDDDDCDDCDEEDDDDCCDECDDDDDA	XT:A:R	NM:i:4	SM:i:0	AM:i:0	X0:i:2	X1:i:0	XM:i:4	XO:i:0	XG:i:0	
    MD:Z:72A0T0G0A0	XA:Z:4340.m000899,+391,76M,4;
    From the XT:AU and XT:AR tags, does this mean that these reads are aligned at unique or at repeated regions? Or are they really unaligned reads? I was under the impression that for unaligned reads, there will be a "*" at the reference column.


    Thanks

    Regards,
    Joanne
  • swbarnes2
    Senior Member
    • May 2008
    • 910

    #2
    There are lots of flags that indicate unmapped reads, not just 77 or 141. If the 4 flag is present, you can't necessarily believe anything else in the sam line. And no, many unmapped reads will NOT show a * in the reference column. SAM specs say that unmapped reads should be given the mapping coordinates of the rimapped mates, where possible.

    But that's not necessarily what's happening here. The flag of 93 indicates that neither end mapped, and if that were really true, both reads would have no mapping coordinates. But that one does. The answer, I bet, is that the reads are hanging off of the sequences. It's a known issue in bwa that it concatenates all your reference sequences, and if a read hangs off of the edge, it will give the mapping coordinates based on the where the read starts, and it will also put the 4 flag in there so you know that something is off.

    So they really were mapped, but that edge effect is causing the 4 flag to be thrown, and it can be hard to automatically know what exactly that means for those reads.

    Comment

    • phatjoe
      Member
      • Aug 2011
      • 13

      #3
      Originally posted by swbarnes2 View Post
      There are lots of flags that indicate unmapped reads, not just 77 or 141. If the 4 flag is present, you can't necessarily believe anything else in the sam line. And no, many unmapped reads will NOT show a * in the reference column. SAM specs say that unmapped reads should be given the mapping coordinates of the rimapped mates, where possible.

      But that's not necessarily what's happening here. The flag of 93 indicates that neither end mapped, and if that were really true, both reads would have no mapping coordinates. But that one does. The answer, I bet, is that the reads are hanging off of the sequences. It's a known issue in bwa that it concatenates all your reference sequences, and if a read hangs off of the edge, it will give the mapping coordinates based on the where the read starts, and it will also put the 4 flag in there so you know that something is off.

      So they really were mapped, but that edge effect is causing the 4 flag to be thrown, and it can be hard to automatically know what exactly that means for those reads.
      Thanks swbarnes2! I think you are right, as my reference is just CDS sequences, the edge-effect would have been more apparent! The scenario was also described here (http://bio-bwa.sourceforge.net/) Is it advisable to use BWA for transcriptome mapping in that case?

      Regards,
      Joanne

      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
      53 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 10:48 AM
      0 responses
      39 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-15-2026, 10:52 AM
      0 responses
      46 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-14-2026, 05:39 AM
      0 responses
      46 views
      0 reactions
      Last Post SEQadmin2  
      Working...