Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zxybl
    Member
    • Apr 2010
    • 13

    #1

    a question about tophat sam file

    I am trying tophat to map pairend reads to the contigs and had some tophat sam files. but I found in all these sam files, the column7(RNEXT) is "=" or "*". that means the next segment is on the same contigs or unmapped. is this normatl?
    my command is like this(I tried both tophat and tophat2):
    tophat --segment-length 15 --keep-tmp --min-coverage-intron 30 --library-type fr-firststrand -r 2850 --no-convert-bam -o mydocuments 454AllContigs fastq_end1 fastq_end2
    is there something I missed in my command? how can I find the next segment from the alignments?

    Thanks
    Xu
    Last edited by zxybl; 05-21-2012, 05:44 AM.
  • cedance
    Senior Member
    • Feb 2011
    • 108

    #2
    The column 7 RNEXT tells you, in case of paired end reads a "=" and in case of single end reads a "*" (or equivalently if a pair of your paired end read was removed pre-mapping by you or tophat as a filtering step).
    A read is unmapped if your flag (2nd column of sam file I believe) when performed a bitwise AND with 4 gives 4 back, meaning the unmapped read bit is set. And this alone is the way to be sure if a read is unmapped or not.

    Comment

    • zxybl
      Member
      • Apr 2010
      • 13

      #3
      my purpose is to use these cdna pairend reads to double check my genome scaffolds. so what I want to know from this alignment is which contigs the pairend reads mapped on if they mapped on different contigs. but from the sam file, it only shows the pairend reads mapped on same contigs("="). the others are all "*". it is not important to me that "*" means unmapped or no information. I am wondering whether tophat can provide the next segment information in column7(RNEXT).
      Last edited by zxybl; 05-23-2012, 05:57 AM.

      Comment

      • cedance
        Senior Member
        • Feb 2011
        • 108

        #4
        Hi zxybl,
        It would be great if you could paste 1/a few lines of your sam file that seems to have issues.

        Comment

        • zxybl
          Member
          • Apr 2010
          • 13

          #5
          HWI-EAS324_106750168:3:1:8674:5678 65 contig00001 5552 255 24M2I74M = 5615 163 TTCGGGGACCCAAATTTGAAAAAAAAATAGTGCTCTTCAAACTGGTTCCATAGGACCTGGGTGATTCAAGAAGCAAATCACCTGAAGAAGTAAGCAGGGT E<FCDDEGGDGGGHDEGHHFCHFFHHHBFGHHHHBHHHHHGHHHDHHHHHHHHHGHHHHHHHEHHHHHHHHHHHHHHHHEHHHHHHHHHHHHBHHHHHHH AS:i:-11 XN:i:0 XM:i:0 XO:i:1 XG:i:2 NM:i:2 MD:Z:98 YT:Z:UU NH:i:1 XS:A:-
          HWI-EAS324_106750168:3:5:9461:20574 65 contig00001 5552 255 24M2I74M = 5615 163 TTCGGGGACCCAAATTTGAAAAAAAAATAGTGCTCTTCAAACTGGTTCCATAGGACCTGGGTGATTCAAGAAGCAAATCACCTGAAGAAGTAAGCAGGGT >=E?EDEEEEEEHHBEECFFHHIFHGHBHGIHIFEHIIHIGIHIHIIIHIDIIIGHGIIIIHHIHIIIIIIIIEIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:-11 XN:i:0 XM:i:0 XO:i:1 XG:i:2 NM:i:2 MD:Z:98 YT:Z:UU NH:i:1 XS:A:-
          HWI-EAS324_106750168:3:5:9472:20590 65 contig00001 5552 255 24M2I74M = 5615 163 TTCGGGGACCCAAATTTGAAAAAAAAATAGTGCTCTTCAAACTGGTTCCATAGGACCTGGGTGATTCAAGAAGCAAATCACCTGAAGAAGTAAGCAGGGT 8@AD@D>FCFAEAA80DD0DDDDDG<=:77@GD2GBGDGD?A;?>A2EABD@DD>EEBBEDGDBGGDGGD:?=@7<<DE<GG<GGGGDGEGGDBEGG@GG AS:i:-11 XN:i:0 XM:i:0 XO:i:1 XG:i:2 NM:i:2 MD:Z:98 YT:Z:UU NH:i:1 XS:A:-
          HWI-EAS324_106750168:3:9:5143:3861 65 contig00001 5552 255 25M2I73M = 5615 163 TTCGGGGACCCAAATTTGAAAAAAAAATAGTGCTCTTCAAACTGGTTCCATAGGACCTGGGTGATTCAAGAAGCAAATCACCTGAAGAAGTAAGCAGGGT D@GCDGEDGDEHGHDEGHFHEHECHGFBEFFEFD@FEIHFDIGDIIIEIIDGIIEIFIIIIIDGIIIIIIIIIIIIIIIGIIIIIIIIIIIIIIIIIIII AS:i:-11 XN:i:0 XM:i:0 XO:i:1 XG:i:2 NM:i:2 MD:Z:98 YT:Z:UU NH:i:1 XS:A:-
          HWI-EAS324_106750168:3:16:2480:4742 65 contig00001 5552 255 25M2I73M = 5615 163 TTCGGGGACCCAAATTTGAAAAAAAAATAGTGCTCTTCAAACTGGTTCCATAGGACCTGGGTGATTCAAGAAGCAAATCACCTGAAGAAGTAAGCAGGGT <F>CEEE@C=BDB>BFDHFCCDDD>GI<HHIHIDIGIIHHDGIIHGDDEE@GGGCIIGIIIIIGFIEIIHGGIGIIIHHHHFIIIGHIIIFGIIIIHHII AS:i:-11 XN:i:0 XM:i:0 XO:i:1 XG:i:2 NM:i:2 MD:Z:98 YT:Z:UU NH:i:1 XS:A:-
          HWI-EAS324_106750168:3:22:8741:20021 65 contig00001 5552 255 24M2I74M = 5615 163 TTCGGGGACCCAAATTTGAAAAAAAAATAGTGCTCTTCAAACTGGTTCCATAGGACCTGGGTGATTCAAGAAGCAAATCACCTGAAGAAGTAAGCAGGGT E>GGDDED@EEHGHEDECHHFHHHHHH>FDHFIGIHIIIHFIFIFDEIIIBIIEIIIIIIIIIIHHHIIIGGG<GIIGIEIIIIIIIIIIIIIIIHIIIH AS:i:-11 XN:i:0 XM:i:0 XO:i:1 XG:i:2 NM:i:2 MD:Z:98 YT:Z:UU NH:i:1 XS:A:-
          HWI-EAS324_106750168:3:5:18827:15083 73 contig00001 5587 255 100M * 0 0 CAAACTGGTTCCATAGGACCTGGGTGATTCAAGAAGCAAATCACCTGAAGAAGTAAGCAGGGTAGCGAAGATGTGAGTACTAGCCCTCCTATAAGGCTAT HHHHHGHHHGHHH@GHHHHHBGGGBGHHHHHHGDHHEHHHHHGGDHHHCEEHFCEHGHFHEE@GEBB>DB><C;AEC@EBBEBEBAA@CABC8B>,@;>; AS:i:-4 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:98G1 YT:Z:UU NH:i:1 XS:A:-
          HWI-EAS324_106750168:3:17:2514:9275 73 contig00001 5598 255 100M * 0 0 CATAGGACCTGGGTGATTCAAGAAGCAAATCACCTGAAGAAGTAAGCAGGGTAGCGAAGATGTGAGTACTAGCCCTCCTATAAGGCTATATAGGGTGTCT IIIIIG>GGGGGGDGIIIIIIIIIIIIIIIIIIHIIIIIIHIIIIIHGIIIHIIIIFFIFIDHIHIEIFIIHBEHHHFIIIGGBEFIDI<IEEEEBEFFE AS:i:-5 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:87G12 YT:Z:UU NH:i:1 XS:A:-

          Comment

          • cedance
            Senior Member
            • Feb 2011
            • 108

            #6
            Okay it seems to be as I expected (and mentioned above). You can go here and type in the flag (2nd column) to see what the value indicates.

            What is happening here? In all the reads you have shown above, the ones with "=", the flag seems to be 65. This means, "read is paired" and "read is first in pair". And all the ones where you seem to have a "*", it says "73" which is "read is paired", "read is first in pair" AND "MATE UNMAPPED" (excuse the caps lock). So the read for which you see a "*" having a flag "73" means that one of the pairs maps to this location shown and the other pair doesn't map anywhere. When the other pair doesn't map anywhere, how do you expect the location of the next read to be indicated in this read's appropriate column?

            Did I get you right this time and does this convince you?

            Comment

            • zxybl
              Member
              • Apr 2010
              • 13

              #7
              thanks. I got it

              I found something that is what I want. I think I did something wrong when I check the "=" and "*" number in column7.

              thank you very much.

              Xu

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