Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • how to get uniquely aligned reads from bowtie

    hi
    i have rum bowtie 2 using —very-sensitive option and got result like this

    Code:
    14559177 reads; of these:
      14559177 (100.00%) were unpaired; of these:
        4317487 (29.65%) aligned 0 times
        7816644 (53.69%) aligned exactly 1 time
        2425046 (16.66%) aligned >1 times
    70.35% overall alignment rate
    i just want to get the uniquely aligned reads alone i,e., 53.69% of reads (78126644). but my output file (sam format) seems to have the those which are aligned>1 times how to get rid of them?

    in previous versions of bowtie i use to use -m option for that

  • #2
    Filter based on having the same read name (1st column) at multiple rows, or based on the mapping quality (5th column).

    Comment


    • #3
      filter on the 5th column, only retain reads with a q score of 255. This is the score given to all reads that are uniquely mappable. If you have bam files you can use

      samtools view -q 255 your.bam > your_filtered.sam

      Comment


      • #4
        Originally posted by anurupa View Post
        hi
        i have rum bowtie 2 using —very-sensitive option

        i just want to get the uniquely aligned reads alone i,e., 53.69% of reads (78126644). but my output file (sam format) seems to have the those which are aligned>1 times how to get rid of them?

        in previous versions of bowtie i use to use -m option for that
        Bonjour anurupa,

        I'm encountering the same trouble following switching from bowtie1 to bowtie2. Did you find out a satisfying solution ?

        I'm not sure that a filtering based on MAPQ using [samtools view -q] gives the desired result, as a condition for "uniqueness" for a given read is that its MAPQ is high on the best mapped position AND "much" higher than in any other mapped position.

        Mathieu

        Comment


        • #5
          Bowtie2 must somehow define what is a unique alignment (may it be related to the MAPQ or not). This definition remains unclear to me.

          Mathieu

          Comment


          • #6
            SAM files created by bowtie contains a 'XS:' tag for reporting secondary alignments for a given read.

            You can check that the number of lines containing the 'XS:' tag corresponds to the number of reads showing >1 alignment(s) :
            Code:
            grep 'XS:' your_alignment_file.sam | wc -l
            A working solution consists in removing the lines containing the ':XS' tag using sed :
            Code:
            sed '/XS:/d' your_alignment_file.sam > your_alignment_file_1alignmentonly.sam
            (Thanks go to Christelle, our group's everyday-very-valuable bioinformatician...).

            Comment


            • #7
              you are correct MGineste. I have filtered my reads by
              Code:
               grep -v XS:i: my file>output

              Comment


              • #8
                Removing the lines with "XS:" will leave the corresponding headers behind, which could create a problem to SAM/BAM viewers. That happened in my case.

                Comment

                Latest Articles

                Collapse

                • seqadmin
                  Current Approaches to Protein Sequencing
                  by seqadmin


                  Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                  04-04-2024, 04:25 PM
                • 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

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, 04-11-2024, 12:08 PM
                0 responses
                27 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 04-10-2024, 10:19 PM
                0 responses
                31 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 04-10-2024, 09:21 AM
                0 responses
                27 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 04-04-2024, 09:00 AM
                0 responses
                52 views
                0 likes
                Last Post seqadmin  
                Working...
                X