Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shmibble
    Member
    • May 2015
    • 23

    #1

    Quality trimming with bwa-mem

    Hi,
    When using bwa-mem, is it necessary to use a different program for quality trimming prior to alignment? Since FASTX toolkit doesn't work with paired end reads I was thinking trimmomatic perhaps. But is this even necessary since bwa-mem has the -q flag for quality trimming?
    And if I should use trimmomatic, how do I align the output with bwa-mem? Because as I understand it creates outputs for mapped reads and unmapped reads seperately.
    Hope my question makes sense. I'm kinda new at this.

    Thanks!
  • dariober
    Senior Member
    • May 2010
    • 311

    #2
    For adapter and quality trimming in paired-end reads you can use cutadapt 1.8+:

    For example:

    Code:
    cutadapt -a AGATCGGAAGAGC -A AGATCGGAAGAGC -q 15 -o fq1.trim.fq -p fq2.trim.fq fq1.fq fq2.fq
    However, it's seems with bwa mem is not necessary to trim for quality. In fact it's not necessary to trim adapters either. I think the GATK guidelines do not recommend adapter & quality trimming.

    Comment

    • shmibble
      Member
      • May 2015
      • 23

      #3
      Thanks for the reply. So You're saying bwa mem should work better without trimming at all before using it?

      Comment

      • dariober
        Senior Member
        • May 2010
        • 311

        #4
        I haven't done any benchmark. Personally I do trim adapters and recently I do not quality trim. But yes, bwa mem should handle raw reads with adapters and bad quality ends "correctly" (...for some definition of correct!). Try aligning a bunch of reads with and without trimming and see what happens...

        Comment

        • GenoMax
          Senior Member
          • Feb 2008
          • 7142

          #5
          NGS aligners will work without trimming. As to whether they will work "better" that is hard to say. Most aligners will "soft"-clip reads (parts that don't align). That said you want to start with minimal (ideally none) extraneous sequence that does not belong to your sample when you start the analysis.

          Trimmomatic/BBDuk.sh from BBMap suite are additional examples of trimming programs that will accept paired-end files and maintain the read order post trimming.

          Comment

          • shmibble
            Member
            • May 2015
            • 23

            #6
            Great. Will do. Thanks!

            Comment

            • Brian Bushnell
              Super Moderator
              • Jan 2014
              • 2709

              #7
              I would always recommend adapter-trimming; adapter sequence at the ends of reads will never help you in mapping, and can only hurt. Quality-trimming is much more case-by-case, depending on your data quality, intended use, and specific software. I don't generally recommend it before mapping unless you have sufficiently low-quality data that it is reducing your mapping rate. Even low-quality bases can increase the ability to uniquely place a read, or to distinguish between substitutions and indels.

              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
              24 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...