Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • foxyg
    Member
    • May 2010
    • 54

    #1

    can somene explain how BWA do its trimming

    In BWA manual, there is a -q option.

    Parameter for read trimming. BWA trims a read down to argmax_x{\sum_{i=x+1}^l(INT-q_i)} if q_l<INT where l is the original read length.


    I am not really sure what this means. If I say -q 15, what does it really mean?
  • dawe
    Senior Member
    • Apr 2009
    • 258

    #2
    Originally posted by foxyg View Post
    In BWA manual, there is a -q option.

    Parameter for read trimming. BWA trims a read down to argmax_x{\sum_{i=x+1}^l(INT-q_i)} if q_l<INT where l is the original read length.


    I am not really sure what this means. If I say -q 15, what does it really mean?
    I believe it tries to find local maxima in the (INT-q_i) function, and chooses the rightmost maximum. That means that it trims when the quality starts to decrease monotonically below your threshold. This is pretty smart: suppose you have two/three bad qualities at the beginning of your read (say from 5 to 8 bp): hard trimming below a certain threshold results in a 5 bp long read. bwa method actually checks if you have better qualities after that and trims later.

    d

    Comment

    • foxyg
      Member
      • May 2010
      • 54

      #3
      So does BWA start scanning from left or right?

      Also what is the common trim parameter here I should use if I have offset 64 FASTQ data?

      Comment

      • lh3
        Senior Member
        • Feb 2008
        • 686

        #4
        bwa learned from phred.

        @foxyg

        Use Sanger fastq. That is the standard. Use -q15 or -q20. Usually the threshold does not matter too much.

        Comment

        • dawe
          Senior Member
          • Apr 2009
          • 258

          #5
          Hi again!

          Originally posted by foxyg View Post
          So does BWA start scanning from left or right?
          Well... How else? :-)

          Originally posted by foxyg View Post
          Also what is the common trim parameter here I should use if I have offset 64 FASTQ data?
          As pointed by lh3 you should always have your scores in Sanger format and then you may apply a filter to 15-20 (which corresponds to a ~0.03-0.01 probability).
          BTW, if you have your fastq in Illumina (Pipieline 1.3+) you may try this patch I've written. It enables a '-I' option to bwa aln so that you can use Illumina reads and trim (and output) as they were in Sanger scale.

          d

          Comment

          • ElMichael
            Member
            • Jun 2009
            • 31

            #6
            Originally posted by lh3 View Post
            bwa learned from phred.
            Use Sanger fastq. That is the standard. Use -q15 or -q20. Usually the threshold does not matter too much.
            Hi,
            I wonder when does the threshold matter too much? And could anybody explain why it usually doesn't matter?
            Thanks!

            Comment

            • Orr Shomroni
              Member
              • Oct 2011
              • 26

              #7
              Originally posted by dawe View Post
              As pointed by lh3 you should always have your scores in Sanger format and then you may apply a filter to 15-20 (which corresponds to a ~0.03-0.01 probability).
              lh3 also pointed out that
              Originally posted by lh3 View Post
              Usually the threshold does not matter too much.
              So on the same tone of ElMichael, why would the threshold not matter? I mean, if the quality threshold is higher, you would select fewer bases, as the overall quality would decrease, right?

              Dawe, what did you base your choice of read trimming threshold (15-20) upon? Is there a specific paper saying "this is a commonly used threshold value", like the use of p-value=0.05 for hypothesis testing? I just want to have some confirmation of the threshold selection.
              "Though it may seem that all's been said and done, originality still lives on" - some unoriginal guy who had nothing better to write as his signature

              Comment

              • carmeyeii
                Senior Member
                • Mar 2011
                • 137

                #8
                I suppose if the probability of a base call being wrong is less than .01, you'd still want to keep it.

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                  by SEQadmin2




                  NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
                  Today, 06:46 AM
                • 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

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, 10-28-2026, 09:57 AM
                0 responses
                23 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-28-2026, 09:51 AM
                0 responses
                15 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-22-2026, 11:13 AM
                0 responses
                68 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-22-2026, 10:48 AM
                0 responses
                48 views
                0 reactions
                Last Post SEQadmin2  
                Working...