Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mashbaugh
    Junior Member
    • Oct 2014
    • 4

    #1

    Extracting RNAseq read names from Tophat accepted hits

    Hi all,
    I'm trying to extract what gene each of my RNA seq reads mapped to from the tophat acceptedhits_bam file. Ideally I want a list of each RNA seq read name and the corresponding gene it mapped to. Do any of you know a way to get this information from the bam file? Any info would be much appreciated.
    Thanks,
    Melissa
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    That's not usually in the BAM file. Use htseq-count with the -o option on the file.

    Comment

    • mashbaugh
      Junior Member
      • Oct 2014
      • 4

      #3
      Thank you Devon.
      Htseq-count shows me how many transcripts mapped to each gene. What I want, however, is the opposite; a list of transcripts an what genes they mapped to. Any idea if Htseq-count is capable of getting that information? Tophat must retain the read and alignment information, I just can't figure out how to get that information.
      -Melissa

      Comment

      • zinky
        Member
        • Dec 2011
        • 48

        #4
        Originally posted by mashbaugh View Post
        Thank you Devon.
        Htseq-count shows me how many transcripts mapped to each gene. What I want, however, is the opposite; a list of transcripts an what genes they mapped to. Any idea if Htseq-count is capable of getting that information? Tophat must retain the read and alignment information, I just can't figure out how to get that information.
        -Melissa
        I don't know the reference used in your tophat mapping procedure, gene level or chromosome level. If chromosome level, you may also need a gene annotation file with .gff suffixed. Then the htseq-count command can help you to finish what u want; If your reference was gene level, a samtools view command can read bamfile into samfile. This file is readable and you can write a text process script to count the reads in each gene.
        PS: Since the output bamfile of tophat contains mapped reads only, you can just count the reads without filtering flags

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          You seem to be using "transcript" when you mean "alignments". There's a very fundamental difference between the two concepts. I'll assume that you meant to write "alignments".

          Htseq-count will normally produce a table of how many reads/pairs mapped to each gene. With the -o option, it will also produce a SAM file with each alignment annotated as to which gene (if any) it overlaps (assuming it overlaps only one gene). You can then simply use "grep" to find all alignments for each gene of interest, should you want to do that.

          Comment

          • mashbaugh
            Junior Member
            • Oct 2014
            • 4

            #6
            Thank you for pointing that out Devon, I do in fact mean read alignments rather than transcripts. Within the HTseq-count SAM output file my alignments are still being identified on the chromosome level rather than the gene level, even though it does also produce the normal table you described. Is there any way to get the gene information into the SAM file?

            Comment

            • dpryan
              Devon Ryan
              • Jul 2011
              • 3478

              #7
              It should be adding an XF:Z:some_gene_name auxiliary tag to the output SAM file. The coordinates will still be genomic, of course. If you really want things with transcript-centric coordinates, then just align against the transcriptome with bowtie2 or bwa.

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