Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Hope you got the answer..

    Comment


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

      Comment


      • #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


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

          Best,
          Christopher

          Comment


          • #6
            Dear Chris

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


            cheers
            Raja

            Comment

            Latest Articles

            Collapse

            • seqadmin
              Strategies for Sequencing Challenging Samples
              by seqadmin


              Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
              03-22-2024, 06:39 AM
            • seqadmin
              Techniques and Challenges in Conservation Genomics
              by seqadmin



              The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

              Avian Conservation
              Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
              03-08-2024, 10:41 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, Yesterday, 06:37 PM
            0 responses
            10 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, Yesterday, 06:07 PM
            0 responses
            9 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 03-22-2024, 10:03 AM
            0 responses
            49 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 03-21-2024, 07:32 AM
            0 responses
            67 views
            0 likes
            Last Post seqadmin  
            Working...
            X