Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chris_bioinfo
    Junior Member
    • Aug 2012
    • 8

    #1

    extracting reads from sam/bam file gene wise

    Dear All,

    I have aligned Illumina transcriptome data ( paired-end 100bp) onto genes using bowtie2, which consists of ~10,000 genes.

    Now I want to know for EACH GENE,

    1) how many reads are aligned concordantly
    2) how many reads are aligned discordantly
    3) how many reads are aligned as single-end reads

    Any help is appreciated.

    Thank you,
    Christopher
  • sivasubramani
    Member
    • Apr 2011
    • 13

    #2
    Hope you got the answer..

    Comment

    • kushald
      Member
      • Mar 2013
      • 42

      #3
      I had the same question Chris. Please let me know if you get know the answers. Cheers mate.

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        There are a number of ways to do this, depending on your comfort in coding. One way would be to write a shell script to read in the SAM/BAM header with samtools to parse out the gene list and then use "samtools view -f XX aligned.bam gene" on each of those genes with an appropriate flag option for each of your cases.

        A better method would be to just write a script in python/C/R/whatever to read through the SAM/BAM file once and tally accordingly as it goes. That's pretty straight-forward to do if you can program (if not, you'll need to learn anyway).

        Comment

        • chris_bioinfo
          Junior Member
          • Aug 2012
          • 8

          #5
          Thanks guys, I wrote a perl program for this and it's working fine

          Best,
          Christopher

          Comment

          • rajamoturi
            Junior Member
            • May 2011
            • 4

            #6
            Dear Chris

            Please share the code if you can it will be very helpful to us


            cheers
            Raja

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